Skip to content

Commit 1608a7f

Browse files
philmdMichael Tokarev
authored andcommitted
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: eb9ad37 ("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]> (cherry picked from commit a276ec8) Signed-off-by: Michael Tokarev <[email protected]>
1 parent 35e5ce5 commit 1608a7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hw/audio/virtio-snd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ static void virtio_snd_get_qemu_audsettings(audsettings *as,
401401
as->nchannels = MIN(AUDIO_MAX_CHANNELS, params->channels);
402402
as->fmt = virtio_snd_get_qemu_format(params->format);
403403
as->freq = virtio_snd_get_qemu_freq(params->rate);
404-
as->endianness = target_words_bigendian() ? 1 : 0;
404+
as->endianness = 0; /* Conforming to VIRTIO 1.0: always little endian. */
405405
}
406406

407407
/*

0 commit comments

Comments
 (0)