[ltp] ALSA setup on T30 and T40

Russell Williamson linux-thinkpad@linux-thinkpad.org
Tue, 25 May 2004 18:31:24 -0500


On Tue, May 25, 2004 at 11:59:01AM +0200, Loic Minier wrote:
>  I've got far more success than you, I can launch multiple esd
>  simulaneously or in general multiple ALSA apps and they'll play
>  simultaneously.  However, I can only have a single OSS app running.

It seems to vary by program. Some programs, such as xmms using the
OSS module, open /dev/dsp0 in exclusive mode. Others (mpg321 -o oss)
will share it.

>  The worse thing happens when I try to launch an OSS app through aoss, I
>  get the first noise, and then silence: the sound file is truncated.

Again, it depends on the program. On my system, aoss xmms will play
through a 3-minute song in a few seconds (some sort of rate conversion
problem?), but xmms without aoss (still using the OSS plugin) plays
fine. On the other hand, "mpg321 -o oss" works fine with or without
the wrapper.

>  Strangely, running alsaplayer -o oss -d /dev/dsp1 produces no sound,
>  despite this .asoundrc:

Keep in mind that pcm.dsp* declarations only affect programs inside an
aoss wrapper. The libaoss.so routines intercept access to /dev/dsp*
and reroute it to ALSA devices based on your asoundrc. Without
aoss, the OSS compatibility modules have a hardwired behavior.
Per http://www.alsa-project.org/~iwai/OSS-Emulation.html, "Unlike
the real OSS, ALSA cannot use the device files more than the assigned
ones. For example, the first card cannot use /dev/dsp1 or /dev/dsp2,
but only /dev/dsp0 and /dev/adsp0."

>  I am kind of lost with the various pcm.* declarations.  For example the
>  !default is only used by esd if I launch "esd -d default", but "esd"
>  alone opens something else (not /dev/dsp, lsof | grep dsp reports
>  nothing).

Try "lsof | grep dev/snd" or "lsof | grep 116,". On my system,
EsoundD 0.2.34 finds and uses ALSA device /dev/snd/pcmC0D0p for
playback. Despite what the man page says, it does not even recognize
/dev/dsp* devices but it will accept pcm.* definitions. I guess it has
been completely converted to ALSA. With your .asoundrc, try starting
it with "esd -d dmixer" to force it to use your dmix plugin.

Despite all this, I am still happy using ALSA's dmix. I just need to
find or write a better music player.