summaryrefslogtreecommitdiffstats
path: root/sound/firewire/fireface/ff.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2018-12-16 17:32:32 +0900
committerTakashi Iwai <tiwai@suse.de>2018-12-16 10:18:29 +0100
commitfc716397a5c7a20247a39c9347fb7a543e0ae4ad (patch)
treef50cf536a53640388de63bdfb2b602279b29a215 /sound/firewire/fireface/ff.c
parent365c00d0b91bb347945982845c9af1b7c0f2bdce (diff)
ALSA: fireface: add support for packet streaming on Fireface 800
This commit adds a functionality to multiplex PCM frames into isochronous packets and demultiplex PCM frames from isochronous packets for ALSA PCM applications. Fireface 800 voluntarily maintains resources for tx isochronous communication. It performs reservation of isochronous channel and allocation/update of bandwidth in some cases below: - at a first request to allocation after bus resets - at requests to allocation when further bandwidth is required When request is grant and the unit is prepared, read data from 0x0000801c0008 represents isochronous channel for tx stream, then the unit can handle requests to start communication. If driver send the request without checking the register, the unit takes panic to continue bus resets. The unit starts transmission of tx packets after receiving several rx packets from driver. I note that the unit can process tx/rx packets and generate/record sound regardless of HOST LED. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/fireface/ff.c')
-rw-r--r--sound/firewire/fireface/ff.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/sound/firewire/fireface/ff.c b/sound/firewire/fireface/ff.c
index d486984c0e5b..f7a752930060 100644
--- a/sound/firewire/fireface/ff.c
+++ b/sound/firewire/fireface/ff.c
@@ -31,8 +31,7 @@ static void ff_card_free(struct snd_card *card)
{
struct snd_ff *ff = card->private_data;
- if (ff->spec->protocol->begin_session)
- snd_ff_stream_destroy_duplex(ff);
+ snd_ff_stream_destroy_duplex(ff);
snd_ff_transaction_unregister(ff);
}
@@ -57,11 +56,9 @@ static void do_registration(struct work_struct *work)
name_card(ff);
- if (ff->spec->protocol->begin_session) {
- err = snd_ff_stream_init_duplex(ff);
- if (err < 0)
- goto error;
- }
+ err = snd_ff_stream_init_duplex(ff);
+ if (err < 0)
+ goto error;
snd_ff_proc_init(ff);
@@ -69,15 +66,13 @@ static void do_registration(struct work_struct *work)
if (err < 0)
goto error;
- if (ff->spec->protocol->begin_session) {
- err = snd_ff_create_pcm_devices(ff);
- if (err < 0)
- goto error;
+ err = snd_ff_create_pcm_devices(ff);
+ if (err < 0)
+ goto error;
- err = snd_ff_create_hwdep_devices(ff);
- if (err < 0)
- goto error;
- }
+ err = snd_ff_create_hwdep_devices(ff);
+ if (err < 0)
+ goto error;
err = snd_card_register(ff->card);
if (err < 0)
@@ -126,7 +121,7 @@ static void snd_ff_update(struct fw_unit *unit)
snd_ff_transaction_reregister(ff);
- if (ff->registered && ff->spec->protocol->begin_session)
+ if (ff->registered)
snd_ff_stream_update_duplex(ff);
}
@@ -152,6 +147,8 @@ static void snd_ff_remove(struct fw_unit *unit)
static const struct snd_ff_spec spec_ff800 = {
.name = "Fireface800",
+ .pcm_capture_channels = {28, 20, 12},
+ .pcm_playback_channels = {28, 20, 12},
.midi_in_ports = 1,
.midi_out_ports = 1,
.protocol = &snd_ff_protocol_ff800,