[PATCH v5 01/10] hw/audio/virtio-sound: remove channel positions field from VirtIOSoundPCMStream

Alexander Mikhalitsyn <[email protected]> Mon, 3 Aug 2026 10:11:50 +0200
Newsgroups org.nongnu.qemu-devel
Message-ID <[email protected]>
From: Alexander Mikhalitsyn <[email protected]>

This field seems to be useless currently, as we
don't implement VIRTIO_SND_R_CHMAP_INFO.

Suggested-by: Marc-AndrĂ© Lureau <[email protected]>
Signed-off-by: Alexander Mikhalitsyn <[email protected]>
Reviewed-by: Manos Pitsidianakis <[email protected]>
Reviewed-by: Marc-AndrĂ© Lureau <[email protected]>
---
v4:
	- moved this patch to the beginning of the series
	  (suggested by Manos Pitsidianakis)
v3:
	- this patch was added
---
 hw/audio/virtio-snd.c         | 2 --
 include/hw/audio/virtio-snd.h | 2 --
 2 files changed, 4 deletions(-)

diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c
index 694bcebb60f..46d81cc9ec4 100644
--- a/hw/audio/virtio-snd.c
+++ b/hw/audio/virtio-snd.c
@@ -463,8 +463,6 @@ static uint32_t virtio_snd_pcm_prepare(VirtIOSound *s, uint32_t stream_id)
     stream->info.rates = supported_rates;
     stream->params = *params;
 
-    stream->positions[0] = VIRTIO_SND_CHMAP_FL;
-    stream->positions[1] = VIRTIO_SND_CHMAP_FR;
     stream->as = as;
 
     if (stream->info.direction == VIRTIO_SND_D_OUTPUT) {
diff --git a/include/hw/audio/virtio-snd.h b/include/hw/audio/virtio-snd.h
index e28f1be5db9..f8bb5c95b97 100644
--- a/include/hw/audio/virtio-snd.h
+++ b/include/hw/audio/virtio-snd.h
@@ -137,8 +137,6 @@ struct VirtIOSoundPCMStream {
     virtio_snd_pcm_info info;
     virtio_snd_pcm_set_params params;
     uint32_t id;
-    /* channel position values (VIRTIO_SND_CHMAP_XXX) */
-    uint8_t positions[VIRTIO_SND_CHMAP_MAX_SIZE];
     VirtIOSound *s;
     bool flushing;
     audsettings as;
-- 
2.47.3