[ltp] mplayer & sound

André Wyrwa linux-thinkpad@linux-thinkpad.org
Thu, 01 Jan 2004 05:54:59 +0100


> >Ok, what's the output of "ls -al /dev/dsp0" and "ls -al /dev/audio0"?
> c---------    1 root     audio     14,   4 Dec 24 20:15 /dev/audio

/dev/dsp is just a link to /dev/dsp0, so the permissions of /dev/dsp
don't matter. Important are the ones for /dev/dsp0.

The same goes for /dev/audio, if it's also a link to /dev/audio0.
The line you gave here seems like it's not, in what case owner and group
should have read and write permissions. But i guess it is a link.

This might be your problem, although it seems strange that it should be,
considering that xmms works -> see below.

>    Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
>    AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed int
>    AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
>    audio_setup: Can't open audio device /dev/dsp: Permission denied
>    AO: [null] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
>    Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
>    Video: no video
>    Starting playback...
>    A:         7.4  3.3% 0%  
> 
>    MPlayer interrupted by signal 2 in module: key_events
>    gusti@r40:~$

Doesn't give me any clue.
(It seems the list of your mplayers audio output drivers is quite short.
When I restrict permissions of my /dev/dsp0 to something that excludes
normal users, mplayer falls back to alsa, which fails, and then to nas,
which works - even though nasd is not running - funny.)

> >"mplayer -ao help" should give a list of output plugins for mplayer,
> >look if there is a nas entry among them.
>  Noup .

But you see oss in this list, i guess?

> yes it is. The proof is that I can run many xmms in the same time.

Yepp.

> Are you sure? I'm using xmms with the OSS plugin and the Varibles
> that wrote before (AUDIOSERVER LD_PRELOAD) without any problem.

You're right, see the other mail, i didn't realize that libaudiooss is
able to do this.

>   And really thank you for the time.

No prob.

Ok, i just tried something which might give us a clue to your problem:

I gave only root access to /dev/dsp0, then started nasd as root user.
Now when starting xmms as normal user it works, while mplayer complains
about not being able to open /dev/dsp, resulting in a fallback to the
nas audio output driver which is supported by my mplayer. Since it isn't
by yours, your mplayer just falls back to the null output driver, which
of course does nothing.

This means that it's very likely that /dev/dsp0 has wrong permissions in
your case and that this is the cause for your trouble.

So check ls -al /dev/dsp0, it should look like this:
crw-rw----    1 root     audio     14,   3 Sep  4 00:56 /dev/dsp0

Hope that helps.

Andre.