summaryrefslogtreecommitdiff
path: root/sound/firewire/digi00x/digi00x.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2015-09-30 00:39:21 (GMT)
committerTakashi Iwai <tiwai@suse.de>2015-09-30 13:36:56 (GMT)
commit660dd3d52ead45b8e60dcf966daf304de2121a28 (patch)
tree0c2a7adb65ad0651a1a890b1c0e7653da9470f2f /sound/firewire/digi00x/digi00x.c
parent0120d0f1fe3bbf6c6a450056be56a70c409cf7a3 (diff)
downloadlinux-660dd3d52ead45b8e60dcf966daf304de2121a28.tar.xz
ALSA: firewire-digi00x: 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/digi00x/digi00x.c')
-rw-r--r--sound/firewire/digi00x/digi00x.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/firewire/digi00x/digi00x.c b/sound/firewire/digi00x/digi00x.c
index 166c1d4..cd93030 100644
--- a/sound/firewire/digi00x/digi00x.c
+++ b/sound/firewire/digi00x/digi00x.c
@@ -72,6 +72,8 @@ static int snd_dg00x_probe(struct fw_unit *unit,
dg00x->unit = fw_unit_get(unit);
mutex_init(&dg00x->mutex);
+ spin_lock_init(&dg00x->lock);
+ init_waitqueue_head(&dg00x->hwdep_wait);
err = name_card(dg00x);
if (err < 0)
@@ -87,6 +89,10 @@ static int snd_dg00x_probe(struct fw_unit *unit,
if (err < 0)
goto error;
+ err = snd_dg00x_create_hwdep_device(dg00x);
+ if (err < 0)
+ goto error;
+
err = snd_card_register(card);
if (err < 0)
goto error;