[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-8.2.6 04/18] hw/audio/virtio-snd: Always use little endian audio
From: |
Michael Tokarev |
Subject: |
[Stable-8.2.6 04/18] hw/audio/virtio-snd: Always use little endian audio format |
Date: |
Thu, 4 Jul 2024 18:52:35 +0300 |
From: Philippe Mathieu-Daudé <philmd@linaro.org>
The VIRTIO Sound Device conforms with the Virtio spec v1.2,
thus only use little endianness.
Remove the suspicious target_words_bigendian() noticed during
code review.
Cc: qemu-stable@nongnu.org
Fixes: eb9ad377bb ("virtio-sound: handle control messages and streams")
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20240422211830.25606-1-philmd@linaro.org>
(cherry picked from commit a276ec8e2632c9015d0f9b4e47194e4e91dfa8bb)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c
index 823f9ab084..092ba2302b 100644
--- a/hw/audio/virtio-snd.c
+++ b/hw/audio/virtio-snd.c
@@ -401,7 +401,7 @@ static void virtio_snd_get_qemu_audsettings(audsettings *as,
as->nchannels = MIN(AUDIO_MAX_CHANNELS, params->channels);
as->fmt = virtio_snd_get_qemu_format(params->format);
as->freq = virtio_snd_get_qemu_freq(params->rate);
- as->endianness = target_words_bigendian() ? 1 : 0;
+ as->endianness = 0; /* Conforming to VIRTIO 1.0: always little endian. */
}
/*
--
2.39.2
- [Stable-8.2.6 00/18] Patch Round-up for stable 8.2.6, freeze on 2024-07-14, Michael Tokarev, 2024/07/04
- [Stable-8.2.6 01/18] target/i386: fix size of EBP writeback in gen_enter(), Michael Tokarev, 2024/07/04
- [Stable-8.2.6 03/18] ui/gtk: Draw guest frame at refresh cycle, Michael Tokarev, 2024/07/04
- [Stable-8.2.6 02/18] virtio-net: drop too short packets early, Michael Tokarev, 2024/07/04
- [Stable-8.2.6 04/18] hw/audio/virtio-snd: Always use little endian audio format,
Michael Tokarev <=
- [Stable-8.2.6 05/18] stdvga: fix screen blanking, Michael Tokarev, 2024/07/04
- [Stable-8.2.6 06/18] accel/tcg: Fix typo causing tb->page_addr[1] to not be recorded, Michael Tokarev, 2024/07/04
- [Stable-8.2.6 07/18] linux-user: Make TARGET_NR_setgroups affect only the current thread, Michael Tokarev, 2024/07/04
- [Stable-8.2.6 09/18] tcg/loongarch64: Fix tcg_out_movi vs some pcrel pointers, Michael Tokarev, 2024/07/04
- [Stable-8.2.6 08/18] target/sparc: use signed denominator in sdiv helper, Michael Tokarev, 2024/07/04
- [Stable-8.2.6 11/18] tests: Update our CI to use CentOS Stream 9 instead of 8, Michael Tokarev, 2024/07/04
- [Stable-8.2.6 10/18] migration: Fix file migration with fdset, Michael Tokarev, 2024/07/04
- [Stable-8.2.6 12/18] i386/cpu: fixup number of addressable IDs for processor cores in the physical package, Michael Tokarev, 2024/07/04
- [Stable-8.2.6 14/18] target/arm: Fix FJCVTZS vs flush-to-zero, Michael Tokarev, 2024/07/04
- [Stable-8.2.6 13/18] target/arm: Fix VCMLA Dd, Dn, Dm[idx], Michael Tokarev, 2024/07/04