All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hw/audio/gus: Use AUDIO_HOST_ENDIANNESS definition from 'audio/audio.h'
@ 2020-05-05 10:07 Philippe Mathieu-Daudé
  2020-05-05 10:10 ` Paolo Bonzini
  2020-05-26  6:05 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-05 10:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Thomas Huth, Gerd Hoffmann, Philippe Mathieu-Daudé

Use the generic AUDIO_HOST_ENDIANNESS definition instead
of a custom one.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Who/what machine is using this device anyway?
---
 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 eb4a803fb5..c8df2bde6b 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.21.3



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] hw/audio/gus: Use AUDIO_HOST_ENDIANNESS definition from 'audio/audio.h'
  2020-05-05 10:07 [PATCH] hw/audio/gus: Use AUDIO_HOST_ENDIANNESS definition from 'audio/audio.h' Philippe Mathieu-Daudé
@ 2020-05-05 10:10 ` Paolo Bonzini
  2020-05-05 10:45   ` Philippe Mathieu-Daudé
  2020-05-26  6:05 ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 7+ messages in thread
From: Paolo Bonzini @ 2020-05-05 10:10 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Thomas Huth, Gerd Hoffmann

On 05/05/20 12:07, Philippe Mathieu-Daudé wrote:
> Use the generic AUDIO_HOST_ENDIANNESS definition instead
> of a custom one.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> Who/what machine is using this device anyway?

PC, like all old ISA audio cards.

Paolo



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] hw/audio/gus: Use AUDIO_HOST_ENDIANNESS definition from 'audio/audio.h'
  2020-05-05 10:10 ` Paolo Bonzini
@ 2020-05-05 10:45   ` Philippe Mathieu-Daudé
  2020-05-05 10:49     ` Paolo Bonzini
  0 siblings, 1 reply; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-05 10:45 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: Thomas Huth, Gerd Hoffmann

On 5/5/20 12:10 PM, Paolo Bonzini wrote:
> On 05/05/20 12:07, Philippe Mathieu-Daudé wrote:
>> Use the generic AUDIO_HOST_ENDIANNESS definition instead
>> of a custom one.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>> Who/what machine is using this device anyway?
> 
> PC, like all old ISA audio cards.

I imagined, but any particular project in mind? I'm wondering if we 
should add a test for it, and what kind of testing.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] hw/audio/gus: Use AUDIO_HOST_ENDIANNESS definition from 'audio/audio.h'
  2020-05-05 10:45   ` Philippe Mathieu-Daudé
@ 2020-05-05 10:49     ` Paolo Bonzini
  2020-05-05 10:55       ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 7+ messages in thread
From: Paolo Bonzini @ 2020-05-05 10:49 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Thomas Huth, Gerd Hoffmann

On 05/05/20 12:45, Philippe Mathieu-Daudé wrote:
> On 5/5/20 12:10 PM, Paolo Bonzini wrote:
>> On 05/05/20 12:07, Philippe Mathieu-Daudé wrote:
>>> Use the generic AUDIO_HOST_ENDIANNESS definition instead
>>> of a custom one.
>>>
>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>> ---
>>> Who/what machine is using this device anyway?
>>
>> PC, like all old ISA audio cards.
> 
> I imagined, but any particular project in mind? I'm wondering if we
> should add a test for it, and what kind of testing.

Old games and demos use it.  Most demos don't work that well on QEMU though.

Paolo


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] hw/audio/gus: Use AUDIO_HOST_ENDIANNESS definition from 'audio/audio.h'
  2020-05-05 10:49     ` Paolo Bonzini
@ 2020-05-05 10:55       ` Philippe Mathieu-Daudé
  2020-05-05 11:09         ` Max Reitz
  0 siblings, 1 reply; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-05 10:55 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: Thomas Huth, Gerd Hoffmann, Max Reitz

On 5/5/20 12:49 PM, Paolo Bonzini wrote:
> On 05/05/20 12:45, Philippe Mathieu-Daudé wrote:
>> On 5/5/20 12:10 PM, Paolo Bonzini wrote:
>>> On 05/05/20 12:07, Philippe Mathieu-Daudé wrote:
>>>> Use the generic AUDIO_HOST_ENDIANNESS definition instead
>>>> of a custom one.
>>>>
>>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>>> ---
>>>> Who/what machine is using this device anyway?
>>>
>>> PC, like all old ISA audio cards.
>>
>> I imagined, but any particular project in mind? I'm wondering if we
>> should add a test for it, and what kind of testing.
> 
> Old games and demos use it.  Most demos don't work that well on QEMU though.

Good. Cc'ing Max in case he knows a such demo we can use for testing.

Thanks!

> 
> Paolo
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] hw/audio/gus: Use AUDIO_HOST_ENDIANNESS definition from 'audio/audio.h'
  2020-05-05 10:55       ` Philippe Mathieu-Daudé
@ 2020-05-05 11:09         ` Max Reitz
  0 siblings, 0 replies; 7+ messages in thread
From: Max Reitz @ 2020-05-05 11:09 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Paolo Bonzini, qemu-devel
  Cc: Thomas Huth, Gerd Hoffmann

On 05.05.20 12:55, Philippe Mathieu-Daudé wrote:
> On 5/5/20 12:49 PM, Paolo Bonzini wrote:
>> On 05/05/20 12:45, Philippe Mathieu-Daudé wrote:
>>> On 5/5/20 12:10 PM, Paolo Bonzini wrote:
>>>> On 05/05/20 12:07, Philippe Mathieu-Daudé wrote:
>>>>> Use the generic AUDIO_HOST_ENDIANNESS definition instead
>>>>> of a custom one.
>>>>>
>>>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>>>> ---
>>>>> Who/what machine is using this device anyway?
>>>>
>>>> PC, like all old ISA audio cards.
>>>
>>> I imagined, but any particular project in mind? I'm wondering if we
>>> should add a test for it, and what kind of testing.
>>
>> Old games and demos use it.  Most demos don't work that well on QEMU
>> though.
> 
> Good. Cc'ing Max in case he knows a such demo we can use for testing.

I don’t know how that impression could have manifested, but I’m actually
not really an expert on old demos or games.  (I just happened to write
some 512 byte stuff at some point, but the only sound I ever used there
was over the PC speaker...)

Max



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] hw/audio/gus: Use AUDIO_HOST_ENDIANNESS definition from 'audio/audio.h'
  2020-05-05 10:07 [PATCH] hw/audio/gus: Use AUDIO_HOST_ENDIANNESS definition from 'audio/audio.h' Philippe Mathieu-Daudé
  2020-05-05 10:10 ` Paolo Bonzini
@ 2020-05-26  6:05 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-05-26  6:05 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Thomas Huth, Gerd Hoffmann

ping...

On 5/5/20 12:07 PM, Philippe Mathieu-Daudé wrote:
> Use the generic AUDIO_HOST_ENDIANNESS definition instead
> of a custom one.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> Who/what machine is using this device anyway?
> ---
>  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 eb4a803fb5..c8df2bde6b 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,
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-26  6:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-05 10:07 [PATCH] hw/audio/gus: Use AUDIO_HOST_ENDIANNESS definition from 'audio/audio.h' Philippe Mathieu-Daudé
2020-05-05 10:10 ` Paolo Bonzini
2020-05-05 10:45   ` Philippe Mathieu-Daudé
2020-05-05 10:49     ` Paolo Bonzini
2020-05-05 10:55       ` Philippe Mathieu-Daudé
2020-05-05 11:09         ` Max Reitz
2020-05-26  6:05 ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.