diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2015-10-01 22:02:17 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-10-02 18:17:04 +0200 |
commit | e5e0c3dd257bf34cf001e10422943f90437f0f1b (patch) | |
tree | 3a4dfafb1815f996d9bf0366c2f9b95353a09199 /sound/firewire/tascam/tascam.h | |
parent | e453df44f0d6574e99fae990c89a22c6ec6bbb62 (diff) | |
download | blackbird-op-linux-e5e0c3dd257bf34cf001e10422943f90437f0f1b.tar.gz blackbird-op-linux-e5e0c3dd257bf34cf001e10422943f90437f0f1b.zip |
ALSA: firewire-tascam: add hwdep interface
This commit adds hwdep interface so as the other IEEE 1394 sound devices
has.
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/tascam/tascam.h')
-rw-r--r-- | sound/firewire/tascam/tascam.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/firewire/tascam/tascam.h b/sound/firewire/tascam/tascam.h index 28c875f7808c..75a3b9a81fea 100644 --- a/sound/firewire/tascam/tascam.h +++ b/sound/firewire/tascam/tascam.h @@ -23,6 +23,8 @@ #include <sound/info.h> #include <sound/pcm.h> #include <sound/pcm_params.h> +#include <sound/firewire.h> +#include <sound/hwdep.h> #include "../lib.h" #include "../amdtp-stream.h" @@ -44,6 +46,7 @@ struct snd_tscm { struct fw_unit *unit; struct mutex mutex; + spinlock_t lock; const struct snd_tscm_spec *spec; @@ -52,6 +55,10 @@ struct snd_tscm { struct amdtp_stream tx_stream; struct amdtp_stream rx_stream; unsigned int substreams_counter; + + int dev_lock_count; + bool dev_lock_changed; + wait_queue_head_t hwdep_wait; }; #define TSCM_ADDR_BASE 0xffff00000000ull @@ -97,8 +104,14 @@ void snd_tscm_stream_destroy_duplex(struct snd_tscm *tscm); int snd_tscm_stream_start_duplex(struct snd_tscm *tscm, unsigned int rate); void snd_tscm_stream_stop_duplex(struct snd_tscm *tscm); +void snd_tscm_stream_lock_changed(struct snd_tscm *tscm); +int snd_tscm_stream_lock_try(struct snd_tscm *tscm); +void snd_tscm_stream_lock_release(struct snd_tscm *tscm); + void snd_tscm_proc_init(struct snd_tscm *tscm); int snd_tscm_create_pcm_devices(struct snd_tscm *tscm); +int snd_tscm_create_hwdep_device(struct snd_tscm *tscm); + #endif |