summaryrefslogtreecommitdiff
path: root/sound/firewire/dice/dice.h
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2014-11-29 00:59:14 +0900
committerTakashi Iwai <tiwai@suse.de>2014-11-29 20:07:33 +0100
commit6eb6c81eee2a6270b39ca02a446f3ccece24b6f8 (patch)
tree6efd40876f0512948be02e153c77afe3917e24a7 /sound/firewire/dice/dice.h
parent7c2d4c0cf5bacb42bc3079e61d299dfaa3dbdde5 (diff)
ALSA: dice: Split stream functionality into a file
This commit adds a file with some helper functions for streaming, and move some codes into the file with some arrangements. Well-known CMP is not used to start/stop streams for Dice chipset. It's achieved by writing to specific address. We call this way as 'enable'. When devices are 'enabled', streaming starts in registered isochronous channel. Some helper functions are already implemented in previous commit. Basically, the stream is compliant to IEC 61883-6, so-called as AMDTP. But Dice has a specific quirk, so called-as 'Dual Wire'. This quirk is applied at 176.4/192.0kHz. In this mode, each packet includes double number of events than number in the specification, and stream runs at a half of sampling rate. There is another quirk at bus reset. Dice chipset handles drivers' request but don't re-enable streaming. So stream should be stopped. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/dice/dice.h')
-rw-r--r--sound/firewire/dice/dice.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sound/firewire/dice/dice.h b/sound/firewire/dice/dice.h
index c756e62ea4ec..ca4090d881e6 100644
--- a/sound/firewire/dice/dice.h
+++ b/sound/firewire/dice/dice.h
@@ -157,4 +157,18 @@ void snd_dice_transaction_destroy(struct snd_dice *dice);
#define SND_DICE_RATES_COUNT 7
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, unsigned int *mode);
+
+int snd_dice_stream_start_packets(struct snd_dice *dice);
+int snd_dice_stream_start(struct snd_dice *dice);
+void snd_dice_stream_stop_packets(struct snd_dice *dice);
+void snd_dice_stream_stop(struct snd_dice *dice);
+int snd_dice_stream_init(struct snd_dice *dice);
+void snd_dice_stream_destroy(struct snd_dice *dice);
+void snd_dice_stream_update(struct snd_dice *dice);
+
+int snd_dice_stream_lock_try(struct snd_dice *dice);
+void snd_dice_stream_lock_release(struct snd_dice *dice);
+
#endif