diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2015-10-01 13:02:15 (GMT) |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-10-02 16:17:02 (GMT) |
commit | 35efa5c489de63a9bdbb7ea4e66dcfadcca951b4 (patch) | |
tree | a98efe040828fd558c58dd2ad9e4c61d19878013 /sound/firewire/tascam/tascam.c | |
parent | 47faeea25ef3a39f2224377a1fc76581cd18c044 (diff) | |
download | linux-35efa5c489de63a9bdbb7ea4e66dcfadcca951b4.tar.xz |
ALSA: firewire-tascam: add streaming functionality
This commit adds streaming functionality for both direction. To utilize
the sequence of the number of data blocks in packets, full duplex with
synchronization is applied.
Besides, TASCAM FireWire series allows drivers to decide which PCM data
channels are enabled. For convenience, this driver always enable whole the
data channels.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/tascam/tascam.c')
-rw-r--r-- | sound/firewire/tascam/tascam.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sound/firewire/tascam/tascam.c b/sound/firewire/tascam/tascam.c index d7418c0..c256360 100644 --- a/sound/firewire/tascam/tascam.c +++ b/sound/firewire/tascam/tascam.c @@ -82,6 +82,8 @@ static void tscm_card_free(struct snd_card *card) { struct snd_tscm *tscm = card->private_data; + snd_tscm_stream_destroy_duplex(tscm); + fw_unit_put(tscm->unit); mutex_destroy(&tscm->mutex); @@ -115,6 +117,10 @@ static int snd_tscm_probe(struct fw_unit *unit, snd_tscm_proc_init(tscm); + err = snd_tscm_stream_init_duplex(tscm); + if (err < 0) + goto error; + err = snd_card_register(card); if (err < 0) goto error; @@ -129,7 +135,11 @@ error: static void snd_tscm_update(struct fw_unit *unit) { - return; + struct snd_tscm *tscm = dev_get_drvdata(&unit->device); + + mutex_lock(&tscm->mutex); + snd_tscm_stream_update_duplex(tscm); + mutex_unlock(&tscm->mutex); } static void snd_tscm_remove(struct fw_unit *unit) |