diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2017-03-22 15:30:24 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-03-28 13:34:02 +0300 |
commit | 71c3797779d3cd8378767f5b2d8cfd3b2f88c5c1 (patch) | |
tree | b64eeb67394492017bb55b3123ad11a13e7de202 /sound/firewire/motu/motu.h | |
parent | 9e796e7d59e71f8a556cfbdc2ffa3aff0555dd0e (diff) | |
download | linux-71c3797779d3cd8378767f5b2d8cfd3b2f88c5c1.tar.xz |
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.h')
-rw-r--r-- | sound/firewire/motu/motu.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/firewire/motu/motu.h b/sound/firewire/motu/motu.h index 338b35193001..7b1d85f29b49 100644 --- a/sound/firewire/motu/motu.h +++ b/sound/firewire/motu/motu.h @@ -16,12 +16,16 @@ #include <linux/mod_devicetable.h> #include <linux/mutex.h> #include <linux/slab.h> +#include <linux/compat.h> +#include <linux/sched/signal.h> #include <sound/control.h> #include <sound/core.h> #include <sound/pcm.h> #include <sound/info.h> #include <sound/rawmidi.h> +#include <sound/firewire.h> +#include <sound/hwdep.h> #include "../lib.h" #include "../amdtp-stream.h" @@ -62,6 +66,11 @@ struct snd_motu { /* For notification. */ struct fw_address_handler async_handler; u32 msg; + + /* For uapi */ + int dev_lock_count; + bool dev_lock_changed; + wait_queue_head_t hwdep_wait; }; enum snd_motu_spec_flags { @@ -136,10 +145,14 @@ int snd_motu_stream_init_duplex(struct snd_motu *motu); void snd_motu_stream_destroy_duplex(struct snd_motu *motu); int snd_motu_stream_start_duplex(struct snd_motu *motu, unsigned int rate); void snd_motu_stream_stop_duplex(struct snd_motu *motu); +int snd_motu_stream_lock_try(struct snd_motu *motu); +void snd_motu_stream_lock_release(struct snd_motu *motu); void snd_motu_proc_init(struct snd_motu *motu); int snd_motu_create_pcm_devices(struct snd_motu *motu); int snd_motu_create_midi_devices(struct snd_motu *motu); + +int snd_motu_create_hwdep_device(struct snd_motu *motu); #endif |