aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/firewire/digi00x/digi00x.h
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2015-09-30 09:39:21 +0900
committerTakashi Iwai <tiwai@suse.de>2015-09-30 15:36:56 +0200
commit660dd3d52ead45b8e60dcf966daf304de2121a28 (patch)
tree0c2a7adb65ad0651a1a890b1c0e7653da9470f2f /sound/firewire/digi00x/digi00x.h
parentALSA: firewire-digi00x: add PCM functionality (diff)
downloadwireguard-linux-660dd3d52ead45b8e60dcf966daf304de2121a28.tar.xz
wireguard-linux-660dd3d52ead45b8e60dcf966daf304de2121a28.zip
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.h14
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