Problem with ALSA only

Hi,

I’m using alsa 0.9.8 with Gentoo.
If I compile SDL with only alsa sound support, the sound lags.
It repeats itself, speed and slow in games… (The only which isn’t
affected is Unreal Tournament 2K3).

If I enable oss sound support too, the sound is normal.

I don’t know what’s creating this problem, I’ve took the alsa-utils,
alsa-libs 0.9.8, I’ve recompiled SDL… Nothing, except that the sounds
was horrible with the alsa sound support…–

Eddahbi Karim

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

France

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

Hi!Am Samstag, 29. November 2003 10:43 schrieb Eddahbi Karim:

It repeats itself, speed and slow in games… (The only which isn’t
affected is Unreal Tournament 2K3).
UT 2k3 uses it’s own SDL.so that can be found in the UT 2k3-Directory.
Therefore recompiling SDL should not effect UT 2k3 as long as you don’t copy
your lib there.

regards
Matthias


Matthias Bach | GPG/PGP-Key-ID: 0xACA73EC9
www.marix-world.de | On Keyserver: www.keyserver.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/yIg4lnJmS6ynPskRAusLAJ4kk+aUwb5wR4RXJaj64/arq8DQUACfRhfB
O2xCLHSy8Qqjj6LD27KK+pY=
=0ZR+
-----END PGP SIGNATURE-----

Le sam 29/11/2003 ? 12:51, Matthias Bach a ?crit :

Hi!

Hiya

UT 2k3 uses it’s own SDL.so that can be found in the UT 2k3-Directory.
Therefore recompiling SDL should not effect UT 2k3 as long as you don’t copy
your lib there.

Ok, but other games are affected… I’ve checked the FAQ, there’s
nothing about ALSA problems :/–

Eddahbi Karim

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

France

I’ve seen this with the new development kernels. I fact, I reported it
here some time ago. Are you using a 2.6.x kernel?

SteveOn Saturday 29 November 2003 09:42 am, Eddahbi Karim wrote:

Le sam 29/11/2003 ? 12:51, Matthias Bach a ?crit :

Hi!

Hiya

UT 2k3 uses it’s own SDL.so that can be found in the UT
2k3-Directory. Therefore recompiling SDL should not effect UT 2k3
as long as you don’t copy your lib there.

Ok, but other games are affected… I’ve checked the FAQ, there’s
nothing about ALSA problems :confused:

Le sam 29/11/2003 ? 14:28, Stephen Anthony a ?crit :

I’ve seen this with the new development kernels. I fact, I reported it
here some time ago. Are you using a 2.6.x kernel?

Steve

Yep but I had the same problems with a 2.4.22-ac4.–

Eddahbi Karim

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

France

OK, then I don’t know what it is then.

The strange thing is that when using SDL_AUDIODRIVER=alsa, the problem
occurs. But when using SDL_AUDIODRIVER=dma, the problem goes away.
But in this case it’s using OSS emulation under ALSA. I don’t even
have the OSS sound drivers installed, so it’s still using ALSA code at
some level.

SteveOn Saturday 29 November 2003 01:13 pm, Eddahbi Karim wrote:

Le sam 29/11/2003 ? 14:28, Stephen Anthony a ?crit :

I’ve seen this with the new development kernels. I fact, I
reported it here some time ago. Are you using a 2.6.x kernel?

Steve

Yep but I had the same problems with a 2.4.22-ac4.

Le sam 29/11/2003 ? 19:41, Stephen Anthony a ?crit :

OK, then I don’t know what it is then.

The strange thing is that when using SDL_AUDIODRIVER=alsa, the problem
occurs. But when using SDL_AUDIODRIVER=dma, the problem goes away.
But in this case it’s using OSS emulation under ALSA. I don’t even
have the OSS sound drivers installed, so it’s still using ALSA code at
some level.

If I compile SDL with only the alsa support and I did
SDL_AUDIODRIVER=dma, I got no sound :-.
I’ve a via82xx, libsdl-1.2.6-r3

I’ve installed libsdl, like that :---------------------------------------------------------------------------
USE="-esd -svga -arts -oss xinerama fbcon nojoystick" emerge -vp libsdl

These are the packages that I would merge, in order:

Calculating dependencies …done!
[ebuild R ] media-libs/libsdl-1.2.6-r2 -oss +alsa -esd -arts -nas
+X -dga +xv +xinerama +fbcon +directfb -ggi -svga +aalib +opengl
-noaudio -novideo +nojoystick

It’s really strange, I think I’ll keep the OSS emulation at the moment.

Eddahbi Karim

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

France

Eddahbi Karim wrote:

Yep but I had the same problems with a 2.4.22-ac4.

I had sound problems with 2.4.21 and alsa modules. But it wasn’t SDL
related. The sound was skipping (but only some apps were affected). I
found that it was because I had the wrong alsa driver. I have an AC97
sound chipset, and it seems not all AC97 chipsets behave the same
although another AC97 driver accepted to load and produced some kind of
"output". I switched the driver and since then everything is fine. Fwiw,
my driver is snd-via82xx now.

Do you by any chance also have an AC97 ?

Stephane

If I compile SDL with only the alsa support and I did
SDL_AUDIODRIVER=dma, I got no sound :-.
I’ve a via82xx, libsdl-1.2.6-r3

This makes sense, since you haven’t compiled in the client-side OSS
code.

[snipped]

It’s really strange, I think I’ll keep the OSS emulation at the
moment.

You have to make sure that the ALSA OSS emulation drivers are compiled,
installed, and loaded. This has nothing to do with SDL specifically.

In my case, I have no trace of the OSS drivers on my system, only ALSA.
So when I use SDL_AUDIODRIVER=dma, it may be using the OSS code in
the SDL driver, but it’s still using ALSA at some level in the
kernel. So the problem would seem to be with the actual SDL ALSA code,
and not with ALSA itself. But I still haven’t managed to track it
down.

SteveOn Sunday 30 November 2003 04:00 am, Eddahbi Karim wrote:

Le dim 30/11/2003 ? 14:15, Stephane Marchesin a ?crit :

Do you by any chance also have an AC97 ?

Module Size Used by
ppp_synctty 9920 0
ppp_async 11904 1
nvidia 1705836 10
snd_via82xx 25216 5
snd_ac97_codec 54916 1 snd_via82xx

Yes I’ve one…
It’s an autoloaded module. What module did you load to make it work
properly ?–

Eddahbi Karim

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

France

Eddahbi Karim wrote:

Module Size Used by
ppp_synctty 9920 0
ppp_async 11904 1
nvidia 1705836 10
snd_via82xx 25216 5
snd_ac97_codec 54916 1 snd_via82xx

Yes I’ve one…
It’s an autoloaded module. What module did you load to make it work
properly ?

I just did an lsmod and remembered how I got everything working : I’m
using oss emulation all the time, which has far less issues.
Using alsa caused me a lot of trouble, you can search the net and you’ll
find lots of problems with AC97 chips. I did some testing and it seems
the issues arise depending on the sound rate. Considering the numerous
issues with AC97, and the fact that those arise (at least for me) using
either alsa or oss, I don’t think this is SDL-related.

Stephane

Le dim 30/11/2003 ? 23:23, Stephane Marchesin a ?crit :

I did some testing and it seems
the issues arise depending on the sound rate. Considering the numerous
issues with AC97, and the fact that those arise (at least for me) using
either alsa or oss, I don’t think this is SDL-related.

Ok, so I’ll ask them what’s the problem.

Thanks for the help ;-),–

Eddahbi Karim

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

France