aboutsummaryrefslogtreecommitdiff
path: root/sound/firewire/motu/motu.c
diff options
context:
space:
mode:
authorGravatar Takashi Sakamoto <o-takashi@sakamocchi.jp> 2017-03-22 21:30:24 +0900
committerGravatar Takashi Iwai <tiwai@suse.de> 2017-03-28 12:34:02 +0200
commit71c3797779d3cd8378767f5b2d8cfd3b2f88c5c1 (patch)
treeb64eeb67394492017bb55b3123ad11a13e7de202 /sound/firewire/motu/motu.c
parentALSA: firewire-motu: add MIDI functionality (diff)
downloadlinux-71c3797779d3cd8378767f5b2d8cfd3b2f88c5c1.tar.gz
linux-71c3797779d3cd8378767f5b2d8cfd3b2f88c5c1.tar.bz2
linux-71c3797779d3cd8378767f5b2d8cfd3b2f88c5c1.zip
ALSA: firewire-motu: add hwdep interface
This commit adds hwdep interface so as the other sound drivers for units on IEEE 1394 bus have. This interface is designed for mixer/control applications. By using this interface, an application can get information about firewire node, can lock/unlock kernel streaming and can get notification at starting/stopping kernel streaming. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/motu/motu.c')
-rw-r--r--sound/firewire/motu/motu.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/firewire/motu/motu.c b/sound/firewire/motu/motu.c
index d4da1377fa50..619554b9dbef 100644
--- a/sound/firewire/motu/motu.c
+++ b/sound/firewire/motu/motu.c
@@ -109,6 +109,10 @@ static void do_registration(struct work_struct *work)
goto error;
}
+ err = snd_motu_create_hwdep_device(motu);
+ if (err < 0)
+ goto error;
+
err = snd_card_register(motu->card);
if (err < 0)
goto error;
@@ -145,6 +149,7 @@ static int motu_probe(struct fw_unit *unit,
mutex_init(&motu->mutex);
spin_lock_init(&motu->lock);
+ init_waitqueue_head(&motu->hwdep_wait);
/* Allocate and register this sound card later. */
INIT_DEFERRABLE_WORK(&motu->dwork, do_registration);