diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-04-22 14:47:23 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-06-19 12:40:49 +0200 |
commit | a276ec8e2632c9015d0f9b4e47194e4e91dfa8bb (patch) | |
tree | 0e8533d04314a29731e8ee719bcf38b916228439 /hw/audio | |
parent | e6115657a4437ae13985352ab3e77d78f8cf1ce4 (diff) | |
download | qemu-a276ec8e2632c9015d0f9b4e47194e4e91dfa8bb.zip qemu-a276ec8e2632c9015d0f9b4e47194e4e91dfa8bb.tar.gz qemu-a276ec8e2632c9015d0f9b4e47194e4e91dfa8bb.tar.bz2 |
hw/audio/virtio-snd: Always use little endian audio format
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>
Diffstat (limited to 'hw/audio')
-rw-r--r-- | hw/audio/virtio-snd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/audio/virtio-snd.c b/hw/audio/virtio-snd.c index 7d09800..5993f4f 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. */ } /* |