aboutsummaryrefslogtreecommitdiffstats
path: root/sound/firewire/dice/dice.h
diff options
context:
space:
mode:
Diffstat (limited to 'sound/firewire/dice/dice.h')
-rw-r--r--sound/firewire/dice/dice.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/sound/firewire/dice/dice.h b/sound/firewire/dice/dice.h
index da00e75e09d4..83353a3559e8 100644
--- a/sound/firewire/dice/dice.h
+++ b/sound/firewire/dice/dice.h
@@ -63,6 +63,16 @@
63 */ 63 */
64#define MAX_STREAMS 2 64#define MAX_STREAMS 2
65 65
66enum snd_dice_rate_mode {
67 SND_DICE_RATE_MODE_LOW = 0,
68 SND_DICE_RATE_MODE_MIDDLE,
69 SND_DICE_RATE_MODE_HIGH,
70 SND_DICE_RATE_MODE_COUNT,
71};
72
73struct snd_dice;
74typedef int (*snd_dice_detect_formats_t)(struct snd_dice *dice);
75
66struct snd_dice { 76struct snd_dice {
67 struct snd_card *card; 77 struct snd_card *card;
68 struct fw_unit *unit; 78 struct fw_unit *unit;
@@ -80,6 +90,11 @@ struct snd_dice {
80 unsigned int rsrv_offset; 90 unsigned int rsrv_offset;
81 91
82 unsigned int clock_caps; 92 unsigned int clock_caps;
93 unsigned int tx_pcm_chs[MAX_STREAMS][SND_DICE_RATE_MODE_COUNT];
94 unsigned int rx_pcm_chs[MAX_STREAMS][SND_DICE_RATE_MODE_COUNT];
95 unsigned int tx_midi_ports[MAX_STREAMS];
96 unsigned int rx_midi_ports[MAX_STREAMS];
97 snd_dice_detect_formats_t detect_formats;
83 98
84 struct fw_address_handler notification_handler; 99 struct fw_address_handler notification_handler;
85 int owner_generation; 100 int owner_generation;
@@ -98,8 +113,6 @@ struct snd_dice {
98 bool global_enabled; 113 bool global_enabled;
99 struct completion clock_accepted; 114 struct completion clock_accepted;
100 unsigned int substreams_counter; 115 unsigned int substreams_counter;
101
102 bool force_two_pcms;
103}; 116};
104 117
105enum snd_dice_addr_type { 118enum snd_dice_addr_type {
@@ -190,11 +203,14 @@ void snd_dice_transaction_destroy(struct snd_dice *dice);
190#define SND_DICE_RATES_COUNT 7 203#define SND_DICE_RATES_COUNT 7
191extern const unsigned int snd_dice_rates[SND_DICE_RATES_COUNT]; 204extern const unsigned int snd_dice_rates[SND_DICE_RATES_COUNT];
192 205
206int snd_dice_stream_get_rate_mode(struct snd_dice *dice, unsigned int rate,
207 enum snd_dice_rate_mode *mode);
193int snd_dice_stream_start_duplex(struct snd_dice *dice, unsigned int rate); 208int snd_dice_stream_start_duplex(struct snd_dice *dice, unsigned int rate);
194void snd_dice_stream_stop_duplex(struct snd_dice *dice); 209void snd_dice_stream_stop_duplex(struct snd_dice *dice);
195int snd_dice_stream_init_duplex(struct snd_dice *dice); 210int snd_dice_stream_init_duplex(struct snd_dice *dice);
196void snd_dice_stream_destroy_duplex(struct snd_dice *dice); 211void snd_dice_stream_destroy_duplex(struct snd_dice *dice);
197void snd_dice_stream_update_duplex(struct snd_dice *dice); 212void snd_dice_stream_update_duplex(struct snd_dice *dice);
213int snd_dice_stream_detect_current_formats(struct snd_dice *dice);
198 214
199int snd_dice_stream_lock_try(struct snd_dice *dice); 215int snd_dice_stream_lock_try(struct snd_dice *dice);
200void snd_dice_stream_lock_release(struct snd_dice *dice); 216void snd_dice_stream_lock_release(struct snd_dice *dice);
@@ -207,4 +223,9 @@ void snd_dice_create_proc(struct snd_dice *dice);
207 223
208int snd_dice_create_midi(struct snd_dice *dice); 224int snd_dice_create_midi(struct snd_dice *dice);
209 225
226int snd_dice_detect_tcelectronic_formats(struct snd_dice *dice);
227int snd_dice_detect_alesis_formats(struct snd_dice *dice);
228int snd_dice_detect_extension_formats(struct snd_dice *dice);
229int snd_dice_detect_mytek_formats(struct snd_dice *dice);
230
210#endif 231#endif