ALSA: virtio: introduce PCM channel map support
Enumerate all available PCM channel maps and create ALSA controls.
Signed-off-by: Anton Yakovlev <anton.yakovlev@opensynergy.com>
Link: https://lore.kernel.org/r/20210302164709.3142702-9-anton.yakovlev@opensynergy.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
diff --git a/sound/virtio/virtio_card.h b/sound/virtio/virtio_card.h
index f154313..86ef394 100644
--- a/sound/virtio/virtio_card.h
+++ b/sound/virtio/virtio_card.h
@@ -43,6 +43,8 @@ struct virtio_snd_queue {
* @njacks: Number of jacks.
* @substreams: VirtIO PCM substreams.
* @nsubstreams: Number of PCM substreams.
+ * @chmaps: VirtIO channel maps.
+ * @nchmaps: Number of channel maps.
*/
struct virtio_snd {
struct virtio_device *vdev;
@@ -55,6 +57,8 @@ struct virtio_snd {
u32 njacks;
struct virtio_pcm_substream *substreams;
u32 nsubstreams;
+ struct virtio_snd_chmap_info *chmaps;
+ u32 nchmaps;
};
/* Message completion timeout in milliseconds (module parameter). */
@@ -100,4 +104,8 @@ int virtsnd_jack_build_devs(struct virtio_snd *snd);
void virtsnd_jack_event(struct virtio_snd *snd,
struct virtio_snd_event *event);
+int virtsnd_chmap_parse_cfg(struct virtio_snd *snd);
+
+int virtsnd_chmap_build_devs(struct virtio_snd *snd);
+
#endif /* VIRTIO_SND_CARD_H */