Re: [Qemu-devel] [PATCH 00/12] Audio backend cleanup

2015-06-02 Thread Gerd Hoffmann
On Mo, 2015-06-01 at 16:38 +0300, Michael Tokarev wrote:
 01.06.2015 16:23, Kővágó, Zoltán wrote:
  This series of patch removes the following audio backends:
  esd, fmod, sdl, winwave.
 
 Why do you remove sdl backend?
 
 This is my preferred backend so far, it works better
 than all other backends available to me...

What other backends can you use?  What are the problems?
Do you use sdl audio together with sdl ui?

cheers,
  Gerd





Re: [Qemu-devel] [PATCH 00/12] Audio backend cleanup

2015-06-02 Thread Michael Tokarev
02.06.2015 11:08, Gerd Hoffmann wrote:
 On Mo, 2015-06-01 at 16:38 +0300, Michael Tokarev wrote:
 01.06.2015 16:23, Kővágó, Zoltán wrote:
 This series of patch removes the following audio backends:
 esd, fmod, sdl, winwave.

 Why do you remove sdl backend?

 This is my preferred backend so far, it works better
 than all other backends available to me...
 
 What other backends can you use?  What are the problems?
 Do you use sdl audio together with sdl ui?

I haven't had a chance to check, planned to do that
today morning but had some other things to do.  Will
check asap.

Yes, I use sdl audio with sdl ui, sdl1 version (since
sdl2 had its shortcomings in qemu, not all functionality
worked).

I also tried alsa, oss and pa, with these audio was more
distorted than with sdl.  Sdl version sounds cleanly, while
alsa and pa, at least in the past, and at least if memory
serves me right, sounded like a if a good portion of noize
has been mixed in with sound, or like when sound is with
quick monmentary drops which happens at high frequency
(maybe 200Hz).

SDL audio has been the default in Debian for at least two
debian releases because of that, we explicitly used
--audio-drv-list=sdl,... to list sdl first.  Now we have
pa first, but I don't really remember why we changed it.

But I have QEMU_AUDIO_DRV=sdl in my ~/.profile for a very
long time.  Not that I use audio all the time, only rarely,
but I never had any issues especially with sdl (this is
ofcourse NOT to say that there are no probs in there :)

Thanks,

/mjt



Re: [Qemu-devel] [PATCH 00/12] Audio backend cleanup

2015-06-02 Thread Gerd Hoffmann
  Hi,

 Yes, I use sdl audio with sdl ui, sdl1 version (since
 sdl2 had its shortcomings in qemu, not all functionality
 worked).

Does it work equally well with the gtk ui?

Possibly it makes sense to use keep sdl audio and default to it only in
case sdl ui is active (simliar to how spice audio is handled).

 I also tried alsa, oss and pa, with these audio was more
 distorted than with sdl.  Sdl version sounds cleanly, while
 alsa and pa, at least in the past, and at least if memory
 serves me right, sounded like a if a good portion of noize
 has been mixed in with sound, or like when sound is with
 quick monmentary drops which happens at high frequency
 (maybe 200Hz).

Buffer overruns and underruns maybe?  Possibly this is simply due to
different default values for sound buffer sizes.

 SDL audio has been the default in Debian for at least two
 debian releases because of that, we explicitly used
 --audio-drv-list=sdl,... to list sdl first.  Now we have
 pa first, but I don't really remember why we changed it.

Useful data point.  sdl state can't be that bad if it was default in
debian until recently ...

cheers,
  Gerd





Re: [Qemu-devel] [PATCH 00/12] Audio backend cleanup

2015-06-02 Thread Michael Tokarev
02.06.2015 13:45, Peter Maydell wrote:
 On 2 June 2015 at 10:12, Michael Tokarev m...@tls.msk.ru wrote:

 SDL audio has been the default in Debian for at least two
 debian releases because of that, we explicitly used
 --audio-drv-list=sdl,... to list sdl first.  Now we have
 pa first, but I don't really remember why we changed it.
 
 I think the important thing here is to avoid ever using
 any of the audio subsystems' back-compatibility layers.
 For instance PA can provide an alsa-compatible interface,
 but if you use it you've just added an extra layer of buffering
 (and a random thread) to your system. So at a distro I would
 expect there to be a this is the standard audio subsystem
 distro-wide decision, and the QEMU packages would then follow
 that.

Yes, that's true.  As long as the native version actually works.
As I said before, initially it didn't, and sdl was the only
driver that worked.  Maybe in 0.12, maybe even before, I don't
remember anymore, but the fact remains, in our testing only
sdl was more or less adequate, maybe due to pure luck or
phase of moon. Later native drivers started working, so we
started using native driver which is default to the OS, which
is pulseaudio (installed on all desktop environments) or,
failing that, alsa (native to linux).

Thanks,

/mjt



Re: [Qemu-devel] [PATCH 00/12] Audio backend cleanup

2015-06-02 Thread Paolo Bonzini


On 02/06/2015 11:28, Gerd Hoffmann wrote:
  SDL audio has been the default in Debian for at least two
  debian releases because of that, we explicitly used
  --audio-drv-list=sdl,... to list sdl first.  Now we have
  pa first, but I don't really remember why we changed it.

 Useful data point.  sdl state can't be that bad if it was default in
 debian until recently ...

I guess the breakage is only for SDL 2 then.

Paolo



Re: [Qemu-devel] [PATCH 00/12] Audio backend cleanup

2015-06-02 Thread Peter Maydell
On 2 June 2015 at 10:12, Michael Tokarev m...@tls.msk.ru wrote:
 I also tried alsa, oss and pa, with these audio was more
 distorted than with sdl.  Sdl version sounds cleanly, while
 alsa and pa, at least in the past, and at least if memory
 serves me right, sounded like a if a good portion of noize
 has been mixed in with sound, or like when sound is with
 quick monmentary drops which happens at high frequency
 (maybe 200Hz).

 SDL audio has been the default in Debian for at least two
 debian releases because of that, we explicitly used
 --audio-drv-list=sdl,... to list sdl first.  Now we have
 pa first, but I don't really remember why we changed it.

I think the important thing here is to avoid ever using
any of the audio subsystems' back-compatibility layers.
For instance PA can provide an alsa-compatible interface,
but if you use it you've just added an extra layer of buffering
(and a random thread) to your system. So at a distro I would
expect there to be a this is the standard audio subsystem
distro-wide decision, and the QEMU packages would then follow
that.

thanks
-- PMM



Re: [Qemu-devel] [PATCH 00/12] Audio backend cleanup

2015-06-02 Thread François Revol
On 02/06/2015 13:40, Michael Tokarev wrote:
 Yes, that's true.  As long as the native version actually works.
 As I said before, initially it didn't, and sdl was the only
 driver that worked.  Maybe in 0.12, maybe even before, I don't
 remember anymore, but the fact remains, in our testing only
 sdl was more or less adequate, maybe due to pure luck or
 phase of moon. Later native drivers started working, so we
 started using native driver which is default to the OS, which
 is pulseaudio (installed on all desktop environments) or,
 failing that, alsa (native to linux).


Btw, please consider that ports to new host platforms really benefit
from SDL for those things. For example we've been using SDL for the
Haiku port until last year:

http://bb.haikuports.org/haikuports/commits/df441da15a7c4a5583f6460de2ca1d570d0caee1

All other backends are either *nix only like OSS (Haiku has an OSS port
but only uses its drivers, the API is not made public), or even
Linux-only like PA or ALSA. There are more OSes out there than just
GNU/Linux :p

It's already hard enough to get stuff upstream into QEMU, having to
write native audio and graphics backends before things get usable won't
help at all.


François.



Re: [Qemu-devel] [PATCH 00/12] Audio backend cleanup

2015-06-02 Thread Gerd Hoffmann
On Di, 2015-06-02 at 14:42 +0200, François Revol wrote:
 On 02/06/2015 13:40, Michael Tokarev wrote:
  Yes, that's true.  As long as the native version actually works.
  As I said before, initially it didn't, and sdl was the only
  driver that worked.  Maybe in 0.12, maybe even before, I don't
  remember anymore, but the fact remains, in our testing only
  sdl was more or less adequate, maybe due to pure luck or
  phase of moon. Later native drivers started working, so we
  started using native driver which is default to the OS, which
  is pulseaudio (installed on all desktop environments) or,
  failing that, alsa (native to linux).
 
 
 Btw, please consider that ports to new host platforms really benefit
 from SDL for those things. For example we've been using SDL for the
 Haiku port until last year:
 
 http://bb.haikuports.org/haikuports/commits/df441da15a7c4a5583f6460de2ca1d570d0caee1
 
 All other backends are either *nix only like OSS (Haiku has an OSS port
 but only uses its drivers, the API is not made public), or even
 Linux-only like PA or ALSA. There are more OSes out there than just
 GNU/Linux :p
 
 It's already hard enough to get stuff upstream into QEMU, having to
 write native audio and graphics backends before things get usable won't
 help at all.

Ok, makes sense.

I think we should keep sdl audio then and only drop the other three
(esd, fmod, winwave).

cheers,
  Gerd





Re: [Qemu-devel] [PATCH 00/12] Audio backend cleanup

2015-06-01 Thread Michael Tokarev
01.06.2015 16:23, Kővágó, Zoltán wrote:
 This series of patch removes the following audio backends:
 esd, fmod, sdl, winwave.

Why do you remove sdl backend?

This is my preferred backend so far, it works better
than all other backends available to me...

Thanks,

/mjt



Re: [Qemu-devel] [PATCH 00/12] Audio backend cleanup

2015-06-01 Thread Kővágó Zoltán

2015-06-01 15:38 keltezéssel, Michael Tokarev írta:

01.06.2015 16:23, Kővágó, Zoltán wrote:

This series of patch removes the following audio backends:
esd, fmod, sdl, winwave.


Why do you remove sdl backend?

This is my preferred backend so far, it works better
than all other backends available to me...


I'm removing it because it's broken (see 
http://lists.nongnu.org/archive/html/qemu-devel/2015-05/msg02198.html 
for an example), and nobody had an objection about removing sdl when I 
asked it on the list about a week ago 
(http://lists.nongnu.org/archive/html/qemu-devel/2015-05/msg04116.html).


Thanks,
Zoltan




[Qemu-devel] [PATCH 00/12] Audio backend cleanup

2015-06-01 Thread Kővágó, Zoltán
This series of patch removes the following audio backends:
esd, fmod, sdl, winwave.

It also cleans up the remaining drivers to do not use global variables where
possible. This is a preparation for my GSoC project where I will enable multiple
simultaneous audio backends.

Please also test the coreaudio backend, as I do not have a Mac to test it.

Patches are also available at https://github.com/DirtYiCE/qemu.git in branch
audio-cleanup to simplify testing.

Please review.

Kővágó, Zoltán (12):
  audio: remove esd backend
  audio: remove fmod backend
  audio: remove sdl backend
  audio: remove winwave audio driver
  audio: expose drv_opaque to init_out and init_in
  alsaaudio: do not use global variables
  paaudio: do not use global variables
  ossaudio: do not use global variables
  wavaudio: do not use global variables
  dsoundaudio: do not use global variables
  paaudio: fix possible resource leak
  coreaudio: do not use global variables where possible

 audio/Makefile.objs |   7 -
 audio/alsaaudio.c   | 155 ++-
 audio/audio_int.h   |   8 +-
 audio/audio_template.h  |   2 +-
 audio/coreaudio.c   |  46 ++--
 audio/dsound_template.h |  24 +-
 audio/dsoundaudio.c | 106 ---
 audio/esdaudio.c| 557 -
 audio/fmodaudio.c   | 685 -
 audio/noaudio.c |   6 +-
 audio/ossaudio.c| 115 
 audio/paaudio.c | 105 +++
 audio/sdlaudio.c| 458 ---
 audio/spiceaudio.c  |   9 +-
 audio/wavaudio.c|  41 +--
 audio/winwaveaudio.c| 717 
 configure   |  60 +---
 17 files changed, 360 insertions(+), 2741 deletions(-)
 delete mode 100644 audio/esdaudio.c
 delete mode 100644 audio/fmodaudio.c
 delete mode 100644 audio/sdlaudio.c
 delete mode 100644 audio/winwaveaudio.c

-- 
2.4.2