Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 618eabea authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai
Browse files

ALSA: bebob: Add hwdep interface



This interface is designed for mixer/control application. By using hwdep
interface, the application can get information about firewire node, can
lock/unlock kernel streaming and can get notification at starting/stopping
kernel streaming.

Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent fbbebd2c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -95,9 +95,10 @@ enum {
	SNDRV_HWDEP_IFACE_USB_STREAM,	/* direct access to usb stream */
	SNDRV_HWDEP_IFACE_FW_DICE,	/* TC DICE FireWire device */
	SNDRV_HWDEP_IFACE_FW_FIREWORKS,	/* Echo Audio Fireworks based device */
	SNDRV_HWDEP_IFACE_FW_BEBOB,	/* BridgeCo BeBoB based device */

	/* Don't forget to change the following: */
	SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_FW_FIREWORKS
	SNDRV_HWDEP_IFACE_LAST = SNDRV_HWDEP_IFACE_FW_BEBOB
};

struct snd_hwdep_info {
+1 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ union snd_firewire_event {

#define SNDRV_FIREWIRE_TYPE_DICE	1
#define SNDRV_FIREWIRE_TYPE_FIREWORKS	2
#define SNDRV_FIREWIRE_TYPE_BEBOB	3
/* AV/C, RME, MOTU, ... */

struct snd_firewire_get_info {
+1 −0
Original line number Diff line number Diff line
@@ -84,6 +84,7 @@ config SND_BEBOB
	select SND_FIREWIRE_LIB
	select SND_RAWMIDI
	select SND_PCM
	select SND_HWDEP
        help
	 Say Y here to include support for FireWire devices based
	 on BridgeCo DM1000/DM1100/DM1500 with BeBoB firmware:
+1 −1
Original line number Diff line number Diff line
snd-bebob-objs := bebob_command.o bebob_stream.o bebob_proc.o bebob_midi.o \
		  bebob_pcm.o \
		  bebob_pcm.o bebob_hwdep.o \
		  bebob.o
obj-m += snd-bebob.o
+5 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@ bebob_probe(struct fw_unit *unit,
	bebob->unit = unit;
	mutex_init(&bebob->mutex);
	spin_lock_init(&bebob->lock);
	init_waitqueue_head(&bebob->hwdep_wait);

	err = name_device(bebob, entry->vendor_id);
	if (err < 0)
@@ -175,6 +176,10 @@ bebob_probe(struct fw_unit *unit,
	if (err < 0)
		goto error;

	err = snd_bebob_create_hwdep_device(bebob);
	if (err < 0)
		goto error;

	err = snd_bebob_stream_init_duplex(bebob);
	if (err < 0)
		goto error;
Loading