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

Commit 594ddced authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai
Browse files

ALSA: fireworks: Add hwdep interface



This interface is designed for mixer/control application. To use 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 aa02bb6e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -94,9 +94,10 @@ enum {
	SNDRV_HWDEP_IFACE_HDA,		/* HD-audio */
	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 */

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

struct snd_hwdep_info {
+2 −1
Original line number Diff line number Diff line
@@ -34,7 +34,8 @@ union snd_firewire_event {
#define SNDRV_FIREWIRE_IOCTL_UNLOCK    _IO('H', 0xfa)

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

struct snd_firewire_get_info {
	unsigned int type; /* SNDRV_FIREWIRE_TYPE_xxx */
+1 −0
Original line number Diff line number Diff line
@@ -66,6 +66,7 @@ config SND_FIREWORKS
	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 Echo Digital Audio Fireworks board:
+1 −1
Original line number Diff line number Diff line
snd-fireworks-objs := fireworks_transaction.o fireworks_command.o \
		      fireworks_stream.o fireworks_proc.o fireworks_midi.o \
		      fireworks_pcm.o fireworks.o
		      fireworks_pcm.o fireworks_hwdep.o fireworks.o
obj-m += snd-fireworks.o
+5 −0
Original line number Diff line number Diff line
@@ -217,6 +217,7 @@ efw_probe(struct fw_unit *unit,
	efw->unit = unit;
	mutex_init(&efw->mutex);
	spin_lock_init(&efw->lock);
	init_waitqueue_head(&efw->hwdep_wait);

	err = get_hardware_info(efw);
	if (err < 0)
@@ -236,6 +237,10 @@ efw_probe(struct fw_unit *unit,
	if (err < 0)
		goto error;

	err = snd_efw_create_hwdep_device(efw);
	if (err < 0)
		goto error;

	err = snd_efw_stream_init_duplex(efw);
	if (err < 0)
		goto error;
Loading