From the ALSA wiki
|The FAQs have been reorganized. The new location of this question is mplayer (Howto)|
Is there a way to get
mplayer working with ALSA
Yes, you need to use SDL to get sound output when using
plug:dmix (see the page DmixPlugin for info on software mixing of multiple PCM streams). The reason is that the current
mplayer 1.0pre3 alsa9 doesn't handle ALSA devices properly by design according to a message on the mailinglist.
To use SDL, set up the SDL audio handlers like this if you use the
export SDL_AUDIODRIVER=alsa export AUDIODEV=plug:dmix
Now use the
mplayer SDL audio output:
mplayer -ao sdl
Isn't there an alsa1x driver already? Does it handle the ALSA devices better?
- I tried mplayer cvs at Thu Mar 25 00:18:21 CET 2004 mplayer now has the alsa1x ao, works beautifully with dmix indeed!
I have a new mplayer, and it still doesn't work?
- Try recompiling mplayer with ALSA support. If you have ALSA somewhat working, it should detect it automatically. Don't forget to install ALSA library files.
- Setup the ALSA config, and try running
mplayerwith it exclusively.
- If it runes, but you can't make it work with other software, try rebooting you system. The dmix plugin seems to have some problems with reinitialising sound on the fly, seems it needs to be the first device activated on a card.
''Footnote: You can also use
plug:dmix but then you would not be able to do software mixing of multiple PCM streams.