From eb7b3a056cd8130e45c4494fb27de54d53ce9f31 Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Fri, 25 Apr 2014 22:45:15 +0900 Subject: ALSA: bebob: Add commands and connections/streams management This commit adds management functionality for connections and streams. BeBoB uses CMP to manage connections and uses AMDTP for streams. This commit also adds some BridgeCo's AV/C extension commands. There are some BridgeCo's AV/C extension commands but this commit just uses below commands to get device's capability and status: 1.Extended Plug Info commands - Plug Channel Position Specific Data - Plug Type Specific Data - Cluster(Section) Info Specific Data - Plug Input Specific Data 2.Extended Stream Format Information commands - Extended Stream Format Information Command - List Request For Extended Plug Info commands for Cluster Info Specific Data, I pick up 'section' instead of 'cluster' from document to prevent from misunderstanding because 'cluster' is also used in IEC 61883-6. Signed-off-by: Takashi Sakamoto Signed-off-by: Takashi Iwai --- sound/firewire/bebob/bebob.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'sound/firewire/bebob/bebob.c') diff --git a/sound/firewire/bebob/bebob.c b/sound/firewire/bebob/bebob.c index b5644ab..180284d 100644 --- a/sound/firewire/bebob/bebob.c +++ b/sound/firewire/bebob/bebob.c @@ -158,9 +158,20 @@ bebob_probe(struct fw_unit *unit, if (err < 0) goto error; - err = snd_card_register(card); + err = snd_bebob_stream_discover(bebob); if (err < 0) goto error; + + err = snd_bebob_stream_init_duplex(bebob); + if (err < 0) + goto error; + + err = snd_card_register(card); + if (err < 0) { + snd_bebob_stream_destroy_duplex(bebob); + goto error; + } + dev_set_drvdata(&unit->device, bebob); end: mutex_unlock(&devices_mutex); @@ -176,11 +187,13 @@ bebob_update(struct fw_unit *unit) { struct snd_bebob *bebob = dev_get_drvdata(&unit->device); fcp_bus_reset(bebob->unit); + snd_bebob_stream_update_duplex(bebob); } static void bebob_remove(struct fw_unit *unit) { struct snd_bebob *bebob = dev_get_drvdata(&unit->device); + snd_bebob_stream_destroy_duplex(bebob); snd_card_disconnect(bebob->card); snd_card_free_when_closed(bebob->card); } -- cgit v1.1