[linux-audio-dev] ALSA performance issues?

Mario Lang mlang at delysid.org
Wed Dec 27 14:03:33 UTC 2006


James Courtier-Dutton <James at superbug.co.uk> writes:

> Mario Lang wrote:
>> Hi.
>>
>> I just tried to get sound working on a LinkSys NSLU2 (ARM) running
>> Debian Etch using a USB sound card.
>>
>> What I discovered I find pretty strange, and would like to know some
>> more details.  Apparently, all ALSA native clients don't
>> manage to play sound click-free, they actually have underruns all the
>> time.  However, if I use OSS (via the snd-pcm-oss module) and set
>> libao to use the oss driver, I get perfect playback with about
>> 20% CPU use at maxiumum by the user-space app playing/decoding files.
>>
>> This is a bit strange, isn't it.  OSS-emulation actually uses the same
>> kernel code to access the actual hardware.  I am just very vaguely
>> familiar with the whole ALSA architecture, but it feels as if
>> the problem here actually lies inside the user-space alsa libraries?
>>
>> Did anyone ever see such an effect, and investigate more closely
>> what is the reason for the difference?
>
> Which applications have this problem?
> What quite often happens is an application's ALSA interface code is
> written wrongly. For example, if the application uses OSS is uses a
> nice big sound buffer, so no clicks, but if the application uses ALSA,
> it requests minute buffer sizes that results in lots of clicks.
> So, please explain which applications have the problem.

ogg123 and mpg321 (with libao set to alsa09).
I am not sure I tried alsaplayer, maybe not.  Was looking for a lightweight
command-line tool, so no xmms or whatever.

-- 
CYa,
  Mario



More information about the Linux-audio-dev mailing list