#ifndef SOUND_DICE_H_INCLUDED
#define SOUND_DICE_H_INCLUDED
#include <linux/compat.h>
#include <linux/completion.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/firewire.h>
#include <linux/firewire-constants.h>
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/wait.h>
#include <linux/sched/signal.h>
#include <sound/control.h>
#include <sound/core.h>
#include <sound/firewire.h>
#include <sound/hwdep.h>
#include <sound/info.h>
#include <sound/initval.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/rawmidi.h>
#include "../amdtp-am824.h"
#include "../iso-resources.h"
#include "../lib.h"
#include "dice-interface.h"
#define MAX_STREAMS …
enum snd_dice_rate_mode { … };
struct snd_dice;
snd_dice_detect_formats_t;
struct snd_dice { … };
enum snd_dice_addr_type { … };
int snd_dice_transaction_write(struct snd_dice *dice,
enum snd_dice_addr_type type,
unsigned int offset,
void *buf, unsigned int len);
int snd_dice_transaction_read(struct snd_dice *dice,
enum snd_dice_addr_type type, unsigned int offset,
void *buf, unsigned int len);
static inline int snd_dice_transaction_write_global(struct snd_dice *dice,
unsigned int offset,
void *buf, unsigned int len)
{ … }
static inline int snd_dice_transaction_read_global(struct snd_dice *dice,
unsigned int offset,
void *buf, unsigned int len)
{ … }
static inline int snd_dice_transaction_write_tx(struct snd_dice *dice,
unsigned int offset,
void *buf, unsigned int len)
{ … }
static inline int snd_dice_transaction_read_tx(struct snd_dice *dice,
unsigned int offset,
void *buf, unsigned int len)
{ … }
static inline int snd_dice_transaction_write_rx(struct snd_dice *dice,
unsigned int offset,
void *buf, unsigned int len)
{ … }
static inline int snd_dice_transaction_read_rx(struct snd_dice *dice,
unsigned int offset,
void *buf, unsigned int len)
{ … }
static inline int snd_dice_transaction_write_sync(struct snd_dice *dice,
unsigned int offset,
void *buf, unsigned int len)
{ … }
static inline int snd_dice_transaction_read_sync(struct snd_dice *dice,
unsigned int offset,
void *buf, unsigned int len)
{ … }
int snd_dice_transaction_get_clock_source(struct snd_dice *dice,
unsigned int *source);
int snd_dice_transaction_get_rate(struct snd_dice *dice, unsigned int *rate);
int snd_dice_transaction_set_enable(struct snd_dice *dice);
void snd_dice_transaction_clear_enable(struct snd_dice *dice);
int snd_dice_transaction_init(struct snd_dice *dice);
int snd_dice_transaction_reinit(struct snd_dice *dice);
void snd_dice_transaction_destroy(struct snd_dice *dice);
#define SND_DICE_RATES_COUNT …
extern const unsigned int snd_dice_rates[SND_DICE_RATES_COUNT];
int snd_dice_stream_get_rate_mode(struct snd_dice *dice, unsigned int rate,
enum snd_dice_rate_mode *mode);
int snd_dice_stream_start_duplex(struct snd_dice *dice);
void snd_dice_stream_stop_duplex(struct snd_dice *dice);
int snd_dice_stream_init_duplex(struct snd_dice *dice);
void snd_dice_stream_destroy_duplex(struct snd_dice *dice);
int snd_dice_stream_reserve_duplex(struct snd_dice *dice, unsigned int rate,
unsigned int events_per_period,
unsigned int events_per_buffer);
void snd_dice_stream_update_duplex(struct snd_dice *dice);
int snd_dice_stream_detect_current_formats(struct snd_dice *dice);
int snd_dice_stream_lock_try(struct snd_dice *dice);
void snd_dice_stream_lock_release(struct snd_dice *dice);
int snd_dice_create_pcm(struct snd_dice *dice);
int snd_dice_create_hwdep(struct snd_dice *dice);
void snd_dice_create_proc(struct snd_dice *dice);
int snd_dice_create_midi(struct snd_dice *dice);
int snd_dice_detect_tcelectronic_formats(struct snd_dice *dice);
int snd_dice_detect_alesis_formats(struct snd_dice *dice);
int snd_dice_detect_alesis_mastercontrol_formats(struct snd_dice *dice);
int snd_dice_detect_extension_formats(struct snd_dice *dice);
int snd_dice_detect_mytek_formats(struct snd_dice *dice);
int snd_dice_detect_presonus_formats(struct snd_dice *dice);
int snd_dice_detect_harman_formats(struct snd_dice *dice);
int snd_dice_detect_focusrite_pro40_tcd3070_formats(struct snd_dice *dice);
int snd_dice_detect_weiss_formats(struct snd_dice *dice);
#endif