Bug#225252: [PATCH] ALSA fixes

Package: libsdl1.2debian-all
Version: 1.2.6-2
Severity: normal
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

For SDL 1.2.6, the ALSA backend was changed to call snd_pcm_open() with
SND_PCM_NONBLOCK. That’s a good idea per se, however, it causes high CPU
usage, interrupted sound and stuttering in some games here. Taking a nanosleep
whenever snd_pcm_writei() returns -EAGAIN fixes this, but I think it’s more
efficient to use blocking mode for the actual sound playback. Feedback from the
SDL and ALSA lists appreciated.

The patch also fixes the default ALSA device to be used.

  • – System Information:
    Debian Release: testing/unstable
    Architecture: powerpc
    Kernel: Linux thor 2.6.0-ben2 #2 Sat Dec 27 03:22:25 CET 2003 ppc
    Locale: LANG=de_CH.UTF-8, LC_CTYPE=de_CH.UTF-8

Versions of packages libsdl1.2debian-all depends on:
ii aalib1 1.4p5-18 ascii art library
hi libasound2 0.9.8-2 Advanced Linux Sound Architecture
ii libc6 2.3.2.ds1-10 GNU C Library: Shared libraries an
ii xlibs 4.3.0-0pre1v4 X Window System client libraries

  • – no debconf information

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/7e/nWoGvjmrbsgARAt2pAJ0SEPNG+063J0wFCzfL1jSc/tXw0gCgrllP
f8ic2fsVeLziafGsFa4SDD4=
=yZaY
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed…
Name: /tmp/libsdl1.2-alsa.diff
Type: text/x-c
Size: 1608 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20031228/dcbad743/attachment.bin

Le sam 27/12/2003 ? 21:47, Michel Daenzer a ?crit :

[snip]

Thank you for this patch, I’m going to test it.
By the way, I use SDL especially for mplayer ;).–

Eddahbi Karim

Phone :
(33) (0)6 61 30 57 77

France

Le sam 27/12/2003 ? 21:47, Michel Daenzer a ?crit :

[snip]

So, I’ve tested the patch.

It works perfectly and the CPU loads are not so heavy on my AMD Athlon
1800+.

By the way, if you can give a way to get the CPU Load of only one
application, I could give you more informations about them :).

By the way,
Thanks for this patch,–

Eddahbi Karim

Phone :
(33) (0)6 61 30 57 77

France

Thanks!
With a slight modification to use SDL_Delay instead of nanosleep, your patch
has been added to CVS.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Great, thanks.On Sun, 2004-01-04 at 16:42, Sam Lantinga wrote:

Thanks!
With a slight modification to use SDL_Delay instead of nanosleep, your patch
has been added to CVS.


Earthling Michel D?nzer | Debian (powerpc), X and DRI developer
Software libre enthusiast | http://svcs.affero.net/rm.php?r=daenzer