summaryrefslogtreecommitdiff
path: root/sound/firewire/bebob/bebob.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2014-04-25 22:45:15 +0900
committerTakashi Iwai <tiwai@suse.de>2014-05-26 14:29:29 +0200
commiteb7b3a056cd8130e45c4494fb27de54d53ce9f31 (patch)
tree13971a8c6d72473e1c53b1a092041a148db176ed /sound/firewire/bebob/bebob.c
parentfd6f4b0dc167c6329a153ceeeb95bc41307156f3 (diff)
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 <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/bebob/bebob.c')
-rw-r--r--sound/firewire/bebob/bebob.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sound/firewire/bebob/bebob.c b/sound/firewire/bebob/bebob.c
index b5644ab473c6..180284db84c9 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);
}