[MPlayer-dev-eng] Possibilitiy to specify alsa output "default:CARD=Headset"]

Clemens Ladisch cladisch at fastmail.net
Wed Aug 22 09:14:49 CEST 2007


Philipp Kolmann wrote:
> Currently when I want to have mplayer ao to my Headset I set in the
> .mplayer/config file:
> 
> ao=alsa:device=hw=1.0
> 
> That works, but blocks the port.
> 
> Now I wanted to try to get mplayer to play to the default (with dmix) port
> of my headset, which works, if I set the device to:
> 
> default:CARD=Headset

You could write this as default:Headset or default:1, so the mplayer
entry would become
	ao=alsa:device=default=1
or
	ao=alsa:device=default=Headset

> Problem is, that I have to substitute the ":" to "=" in the config to
> work. In libao2/ao_alsa.c 238++ the "="'s are set to ":". But also the
> second "=". So alsalib doesn't recognize the device.
> 
> Is there a possibility to have another subst char for "="?

I'd rather use "#" instead of "+" because it's somewhat similar to "=".

However, I guess it would be easier to use "ao=alsa:device=headset" and
to define the "headset" device in ~/.asoundrc or /etc/asound.conf, like
this:
	pcm.headset = "default:CARD=Headset"

This should probably be mentioned in the manpage.


Regards,
Clemens



More information about the MPlayer-dev-eng mailing list