summaryrefslogtreecommitdiffstats
path: root/sound/virtio/virtio_card.h
diff options
context:
space:
mode:
authorAnton Yakovlev <anton.yakovlev@opensynergy.com>2021-03-02 17:47:07 +0100
committerTakashi Iwai <tiwai@suse.de>2021-03-07 09:08:11 +0100
commitca61a41f389c80db091db9d4ad5a651e2b4c9f70 (patch)
treee82ebceca851a8ed9bac5d0fc920945fdebae2c3 /sound/virtio/virtio_card.h
parentda76e9f3e43a7195c69d370ee514cccae6517c76 (diff)
downloadlinux-ca61a41f389c80db091db9d4ad5a651e2b4c9f70.tar.gz
linux-ca61a41f389c80db091db9d4ad5a651e2b4c9f70.tar.bz2
linux-ca61a41f389c80db091db9d4ad5a651e2b4c9f70.zip
ALSA: virtio: introduce jack support
Enumerate all available jacks and create ALSA controls. At the moment jacks have a simple implementation and can only be used to receive notifications about a plugged in/out device. Signed-off-by: Anton Yakovlev <anton.yakovlev@opensynergy.com> Link: https://lore.kernel.org/r/20210302164709.3142702-8-anton.yakovlev@opensynergy.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/virtio/virtio_card.h')
-rw-r--r--sound/virtio/virtio_card.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/virtio/virtio_card.h b/sound/virtio/virtio_card.h
index c43f9744d362..f154313c79fd 100644
--- a/sound/virtio/virtio_card.h
+++ b/sound/virtio/virtio_card.h
@@ -18,6 +18,7 @@
#define VIRTIO_SND_CARD_NAME "VirtIO SoundCard"
#define VIRTIO_SND_PCM_NAME "VirtIO PCM"
+struct virtio_jack;
struct virtio_pcm_substream;
/**
@@ -38,6 +39,8 @@ struct virtio_snd_queue {
* @ctl_msgs: Pending control request list.
* @event_msgs: Device events.
* @pcm_list: VirtIO PCM device list.
+ * @jacks: VirtIO jacks.
+ * @njacks: Number of jacks.
* @substreams: VirtIO PCM substreams.
* @nsubstreams: Number of PCM substreams.
*/
@@ -48,6 +51,8 @@ struct virtio_snd {
struct list_head ctl_msgs;
struct virtio_snd_event *event_msgs;
struct list_head pcm_list;
+ struct virtio_jack *jacks;
+ u32 njacks;
struct virtio_pcm_substream *substreams;
u32 nsubstreams;
};
@@ -88,4 +93,11 @@ virtsnd_pcm_queue(struct virtio_pcm_substream *vss)
return virtsnd_rx_queue(vss->snd);
}
+int virtsnd_jack_parse_cfg(struct virtio_snd *snd);
+
+int virtsnd_jack_build_devs(struct virtio_snd *snd);
+
+void virtsnd_jack_event(struct virtio_snd *snd,
+ struct virtio_snd_event *event);
+
#endif /* VIRTIO_SND_CARD_H */