diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2017-03-31 22:06:11 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-04-05 21:31:49 +0200 |
commit | f656edd5fb33d889561978b81ec2897087c2f4ca (patch) | |
tree | 5c023947956c83b1f27326f89a4039b7e24388e7 /sound/firewire/fireface/ff.h | |
parent | 4b316436ab2e0b74e4986fc66b7cd7902cfd7054 (diff) | |
download | lwn-f656edd5fb33d889561978b81ec2897087c2f4ca.tar.gz lwn-f656edd5fb33d889561978b81ec2897087c2f4ca.zip |
ALSA: fireface: add hwdep interface
This commit adds hwdep interface so as the other drivers for audio and
music units on IEEE 1394 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/fireface/ff.h')
-rw-r--r-- | sound/firewire/fireface/ff.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/firewire/fireface/ff.h b/sound/firewire/fireface/ff.h index 0d5228c905ea..a143b5ab8b71 100644 --- a/sound/firewire/fireface/ff.h +++ b/sound/firewire/fireface/ff.h @@ -17,12 +17,15 @@ #include <linux/mutex.h> #include <linux/slab.h> #include <linux/compat.h> +#include <linux/sched/signal.h> #include <sound/core.h> #include <sound/info.h> #include <sound/rawmidi.h> #include <sound/pcm.h> #include <sound/pcm_params.h> +#include <sound/hwdep.h> +#include <sound/firewire.h> #include "../lib.h" #include "../amdtp-stream.h" @@ -77,6 +80,10 @@ struct snd_ff { struct amdtp_stream rx_stream; struct fw_iso_resources tx_resources; struct fw_iso_resources rx_resources; + + int dev_lock_count; + bool dev_lock_changed; + wait_queue_head_t hwdep_wait; }; enum snd_ff_clock_src { @@ -122,10 +129,16 @@ int snd_ff_stream_start_duplex(struct snd_ff *ff, unsigned int rate); void snd_ff_stream_stop_duplex(struct snd_ff *ff); void snd_ff_stream_update_duplex(struct snd_ff *ff); +void snd_ff_stream_lock_changed(struct snd_ff *ff); +int snd_ff_stream_lock_try(struct snd_ff *ff); +void snd_ff_stream_lock_release(struct snd_ff *ff); + void snd_ff_proc_init(struct snd_ff *ff); int snd_ff_create_midi_devices(struct snd_ff *ff); int snd_ff_create_pcm_devices(struct snd_ff *ff); +int snd_ff_create_hwdep_devices(struct snd_ff *ff); + #endif |