summaryrefslogtreecommitdiff
path: root/sound/virtio/virtio_card.h
diff options
context:
space:
mode:
authorAnton Yakovlev <anton.yakovlev@opensynergy.com>2021-03-02 17:47:04 +0100
committerTakashi Iwai <tiwai@suse.de>2021-03-07 09:07:35 +0100
commit29b96bf50ba958eb5f097cdc3fbd4c1acf9547a2 (patch)
tree09d7e5e39da138635f43a967b302ff85013c6b54 /sound/virtio/virtio_card.h
parent9d45e514da88ff74fc24ffb34e7d6eb92576440b (diff)
ALSA: virtio: build PCM devices and substream hardware descriptors
Like the HDA specification, the virtio sound device specification links PCM substreams, jacks and PCM channel maps into functional groups. For each discovered group, a PCM device is created, the number of which coincides with the group number. Introduce the module parameters for setting the hardware buffer parameters: pcm_buffer_ms [=160] pcm_periods_min [=2] pcm_periods_max [=16] pcm_period_ms_min [=10] pcm_period_ms_max [=80] Signed-off-by: Anton Yakovlev <anton.yakovlev@opensynergy.com> Link: https://lore.kernel.org/r/20210302164709.3142702-5-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.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/virtio/virtio_card.h b/sound/virtio/virtio_card.h
index 1e76eeff160f..77a1b7255370 100644
--- a/sound/virtio/virtio_card.h
+++ b/sound/virtio/virtio_card.h
@@ -12,9 +12,13 @@
#include <uapi/linux/virtio_snd.h>
#include "virtio_ctl_msg.h"
+#include "virtio_pcm.h"
#define VIRTIO_SND_CARD_DRIVER "virtio-snd"
#define VIRTIO_SND_CARD_NAME "VirtIO SoundCard"
+#define VIRTIO_SND_PCM_NAME "VirtIO PCM"
+
+struct virtio_pcm_substream;
/**
* struct virtio_snd_queue - Virtqueue wrapper structure.
@@ -33,6 +37,9 @@ struct virtio_snd_queue {
* @card: ALSA sound card.
* @ctl_msgs: Pending control request list.
* @event_msgs: Device events.
+ * @pcm_list: VirtIO PCM device list.
+ * @substreams: VirtIO PCM substreams.
+ * @nsubstreams: Number of PCM substreams.
*/
struct virtio_snd {
struct virtio_device *vdev;
@@ -40,6 +47,9 @@ struct virtio_snd {
struct snd_card *card;
struct list_head ctl_msgs;
struct virtio_snd_event *event_msgs;
+ struct list_head pcm_list;
+ struct virtio_pcm_substream *substreams;
+ u32 nsubstreams;
};
/* Message completion timeout in milliseconds (module parameter). */