[MPlayer-dev-eng] Practical outcomes of the ALSA thread

Vladimir Mosgalin mosgalin at VM10124.spb.edu
Fri May 4 21:52:16 CEST 2007


Hi Attila Kinali!

 On 2007.05.04 at 21:28:55 +0200, Attila Kinali wrote next:

> > Le quintidi 15 floréal, an CCXV, Attila Kinali a écrit :
> > > This is actually for me a downside of alsa. I do not want
> > > to have any automagic stuff working behind my back wich
> > > does not tell me at all that it's doing something.
> > 
> > This can be configured. Indeed, it is quite trivial to disable everything
> > completely. Something like:
> 
> Yes, but this means you have to ensure that this config
> snipped is used on all systems with alsa on which MPlayer
> (or any other audio application for that matter) is used.

NO way! This is fundamentally wrong. No application except maybe for
sound server should EVER try to use hw devices. You'll get all the
problems which are solved by alsa layer: no mixing and no conversion of
sound format.

I have alsa device plughw:0,4. It can be used with mplayer. The real
device, hw:0,4 cannot be used. It doesn't support stereo, it doesn't
support 16-bit output, it doesn't support mixing, it doesn't support
thousands of thing. Even mplayer with format/channels/etc conversion
filters can't use it, leave alone regular application.

If you want to have the joy of alsa, always use "default" device. Or
maybe plughw one, but only if user explictly requested that. User with
multiple soundcards (or just the one who plugged in usb speakers)
can change "default" device (i.e. he plugged in speakers and
wants sound to be redirected to them). Desktop environments have nice
guis where you can choose "default" soundcard; this works by
reconfiguring "default" alias. Users expect application, including
mplayer to follow this setting.

Another example: I have jack server running. Alsa "default" device does
sample rate conversion and then redirects stream to jack server through
plugin, so apps which aren't jack-aware can output sound. Opening "hw"
or "plughw" does nothing good, since device is already blocked. But real
nice application just open "default" and work.
Technically I could have rerouted "plughw" to "default", but there is no
reason in such obscure setup. With "hw", there is no solution at all.

Using alsa with hw device is probably even more broken than using oss
emulation layer. Actually, it's on the same level of brokeness and
unusefulness to user.

-- 

Vladimir



More information about the MPlayer-dev-eng mailing list