diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2015-09-30 00:39:18 (GMT) |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-09-30 13:34:55 (GMT) |
commit | 3a2a17974eef10766ffbd7d3e9f5191fbb3c9f33 (patch) | |
tree | d1e56b7af5ee295e68b9ff89b99b9491df4bc20f /sound/firewire/digi00x/digi00x.c | |
parent | 163ae6f3f3f059ab44311792af5a73f70f747263 (diff) | |
download | linux-3a2a17974eef10766ffbd7d3e9f5191fbb3c9f33.tar.xz |
ALSA: firewire-digi00x: add stream functionality
This commit adds a functionality to manage streaming.
The streaming is not controlled by CMP in IEC 61883-6. It's controlled by
IEEE 1394 write transaction to certain addresses.
Several clock sources are available, while there're no differences about
packet transmission. The value of SYT field in transmitted packets is
always zero. Thus, streams in both direction don't build synchronization.
And the device always requires received packets to transmit packets. This
driver keeps to transfer outgoing stream even if they're not required.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/digi00x/digi00x.c')
-rw-r--r-- | sound/firewire/digi00x/digi00x.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sound/firewire/digi00x/digi00x.c b/sound/firewire/digi00x/digi00x.c index 260967e..5bda4c4 100644 --- a/sound/firewire/digi00x/digi00x.c +++ b/sound/firewire/digi00x/digi00x.c @@ -45,6 +45,8 @@ static void dg00x_card_free(struct snd_card *card) { struct snd_dg00x *dg00x = card->private_data; + snd_dg00x_stream_destroy_duplex(dg00x); + fw_unit_put(dg00x->unit); mutex_destroy(&dg00x->mutex); @@ -75,6 +77,10 @@ static int snd_dg00x_probe(struct fw_unit *unit, if (err < 0) goto error; + err = snd_dg00x_stream_init_duplex(dg00x); + if (err < 0) + goto error; + err = snd_card_register(card); if (err < 0) goto error; @@ -89,7 +95,11 @@ error: static void snd_dg00x_update(struct fw_unit *unit) { - return; + struct snd_dg00x *dg00x = dev_get_drvdata(&unit->device); + + mutex_lock(&dg00x->mutex); + snd_dg00x_stream_update_duplex(dg00x); + mutex_unlock(&dg00x->mutex); } static void snd_dg00x_remove(struct fw_unit *unit) |