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>
This commit is contained in:

committed by
Takashi Iwai

parent
4b316436ab
commit
f656edd5fb
@@ -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
|
||||
|
Reference in New Issue
Block a user