diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2015-09-30 03:39:21 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-09-30 16:36:56 +0300 |
commit | 660dd3d52ead45b8e60dcf966daf304de2121a28 (patch) | |
tree | 0c2a7adb65ad0651a1a890b1c0e7653da9470f2f /sound/firewire/digi00x/digi00x.h | |
parent | 0120d0f1fe3bbf6c6a450056be56a70c409cf7a3 (diff) | |
download | linux-660dd3d52ead45b8e60dcf966daf304de2121a28.tar.xz |
ALSA: firewire-digi00x: 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/digi00x/digi00x.h')
-rw-r--r-- | sound/firewire/digi00x/digi00x.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sound/firewire/digi00x/digi00x.h b/sound/firewire/digi00x/digi00x.h index 199064504a55..5ba531806262 100644 --- a/sound/firewire/digi00x/digi00x.h +++ b/sound/firewire/digi00x/digi00x.h @@ -22,6 +22,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 "../iso-resources.h" @@ -32,6 +34,7 @@ struct snd_dg00x { struct fw_unit *unit; struct mutex mutex; + spinlock_t lock; struct amdtp_stream tx_stream; struct fw_iso_resources tx_resources; @@ -40,6 +43,12 @@ struct snd_dg00x { struct fw_iso_resources rx_resources; unsigned int substreams_counter; + + /* for uapi */ + int dev_lock_count; + bool dev_lock_changed; + wait_queue_head_t hwdep_wait; + }; #define DG00X_ADDR_BASE 0xffffe0000000ull @@ -118,8 +127,13 @@ void snd_dg00x_stream_stop_duplex(struct snd_dg00x *dg00x); void snd_dg00x_stream_update_duplex(struct snd_dg00x *dg00x); void snd_dg00x_stream_destroy_duplex(struct snd_dg00x *dg00x); +void snd_dg00x_stream_lock_changed(struct snd_dg00x *dg00x); +int snd_dg00x_stream_lock_try(struct snd_dg00x *dg00x); +void snd_dg00x_stream_lock_release(struct snd_dg00x *dg00x); + void snd_dg00x_proc_init(struct snd_dg00x *dg00x); int snd_dg00x_create_pcm_devices(struct snd_dg00x *dg00x); +int snd_dg00x_create_hwdep_device(struct snd_dg00x *dg00x); #endif |