mirror of
https://github.com/utmapp/qemu.git
synced 2026-12-01 22:23:23 -10:00
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: [email protected]
Fixes: eb9ad377bb ("virtio-sound: handle control messages and streams")
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Message-Id: <[email protected]>
This commit is contained in:
1 parent
e6115657a4
commit
a276ec8e26
1 file changed
+1
-1
@@ -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. */
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user