diff options
Diffstat (limited to 'sound/firewire/dice/dice.h')
-rw-r--r-- | sound/firewire/dice/dice.h | 25 |
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 | ||
66 | enum 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 | |||
73 | struct snd_dice; | ||
74 | typedef int (*snd_dice_detect_formats_t)(struct snd_dice *dice); | ||
75 | |||
66 | struct snd_dice { | 76 | struct 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 | ||
105 | enum snd_dice_addr_type { | 118 | enum 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 |
191 | extern const unsigned int snd_dice_rates[SND_DICE_RATES_COUNT]; | 204 | extern const unsigned int snd_dice_rates[SND_DICE_RATES_COUNT]; |
192 | 205 | ||
206 | int snd_dice_stream_get_rate_mode(struct snd_dice *dice, unsigned int rate, | ||
207 | enum snd_dice_rate_mode *mode); | ||
193 | int snd_dice_stream_start_duplex(struct snd_dice *dice, unsigned int rate); | 208 | int snd_dice_stream_start_duplex(struct snd_dice *dice, unsigned int rate); |
194 | void snd_dice_stream_stop_duplex(struct snd_dice *dice); | 209 | void snd_dice_stream_stop_duplex(struct snd_dice *dice); |
195 | int snd_dice_stream_init_duplex(struct snd_dice *dice); | 210 | int snd_dice_stream_init_duplex(struct snd_dice *dice); |
196 | void snd_dice_stream_destroy_duplex(struct snd_dice *dice); | 211 | void snd_dice_stream_destroy_duplex(struct snd_dice *dice); |
197 | void snd_dice_stream_update_duplex(struct snd_dice *dice); | 212 | void snd_dice_stream_update_duplex(struct snd_dice *dice); |
213 | int snd_dice_stream_detect_current_formats(struct snd_dice *dice); | ||
198 | 214 | ||
199 | int snd_dice_stream_lock_try(struct snd_dice *dice); | 215 | int snd_dice_stream_lock_try(struct snd_dice *dice); |
200 | void snd_dice_stream_lock_release(struct snd_dice *dice); | 216 | void snd_dice_stream_lock_release(struct snd_dice *dice); |
@@ -207,4 +223,9 @@ void snd_dice_create_proc(struct snd_dice *dice); | |||
207 | 223 | ||
208 | int snd_dice_create_midi(struct snd_dice *dice); | 224 | int snd_dice_create_midi(struct snd_dice *dice); |
209 | 225 | ||
226 | int snd_dice_detect_tcelectronic_formats(struct snd_dice *dice); | ||
227 | int snd_dice_detect_alesis_formats(struct snd_dice *dice); | ||
228 | int snd_dice_detect_extension_formats(struct snd_dice *dice); | ||
229 | int snd_dice_detect_mytek_formats(struct snd_dice *dice); | ||
230 | |||
210 | #endif | 231 | #endif |