[PULL 2/8] hw/audio/gus: Use AUDIO_HOST_ENDIANNESS definition from 'audio/audio.h'

Gerd Hoffmann posted 8 patches 5 years, 5 months ago
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, Markus Armbruster <armbru@redhat.com>, Aleksandar Markovic <aleksandar.qemu.devel@gmail.com>, Aurelien Jarno <aurelien@aurel32.net>, Eric Blake <eblake@redhat.com>, Aleksandar Rikalo <aleksandar.rikalo@rt-rk.com>
[PULL 2/8] hw/audio/gus: Use AUDIO_HOST_ENDIANNESS definition from 'audio/audio.h'
Posted by Gerd Hoffmann 5 years, 5 months ago
From: Philippe Mathieu-Daudé <f4bug@amsat.org>

Use the generic AUDIO_HOST_ENDIANNESS definition instead
of a custom one.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20200505100750.27332-1-f4bug@amsat.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/audio/gus.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/hw/audio/gus.c b/hw/audio/gus.c
index eb4a803fb53b..c8df2bde6b32 100644
--- a/hw/audio/gus.c
+++ b/hw/audio/gus.c
@@ -41,12 +41,6 @@
 #define ldebug(...)
 #endif
 
-#ifdef HOST_WORDS_BIGENDIAN
-#define GUS_ENDIANNESS 1
-#else
-#define GUS_ENDIANNESS 0
-#endif
-
 #define TYPE_GUS "gus"
 #define GUS(obj) OBJECT_CHECK (GUSState, (obj), TYPE_GUS)
 
@@ -256,7 +250,7 @@ static void gus_realizefn (DeviceState *dev, Error **errp)
     as.freq = s->freq;
     as.nchannels = 2;
     as.fmt = AUDIO_FORMAT_S16;
-    as.endianness = GUS_ENDIANNESS;
+    as.endianness = AUDIO_HOST_ENDIANNESS;
 
     s->voice = AUD_open_out (
         &s->card,
-- 
2.18.4