diff options
author | Takashi Sakamoto | 2015-10-01 22:02:15 +0900 |
---|---|---|
committer | Takashi Iwai | 2015-10-02 18:17:02 +0200 |
commit | 35efa5c489de63a9bdbb7ea4e66dcfadcca951b4 (patch) | |
tree | a98efe040828fd558c58dd2ad9e4c61d19878013 /sound/firewire/tascam/tascam.c | |
parent | 47faeea25ef3a39f2224377a1fc76581cd18c044 (diff) |
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 d7418c065f4e..c2563606ac70 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) |