[mythtv-users] YAAQ (Yet ANother ALSA Question)

Michael T. Dean mtdean at thirdcontact.com
Tue Jun 29 07:54:46 EDT 2004


Stephen Tait wrote:

> At 13:47 28/06/2004 +1000, you wrote:
>
>> On Sun, Jun 27, 2004 at 05:44:13PM +0100, Stephen Tait wrote:
>> > OK, I know the Right Way to get Myth to use native ALSA is to swap 
>> /dev/dsp
>> > or /dev/sound/dsp for alsa:whatever, which is all fine...
>> >
>> > But what about the mixer? I'm currently using /dev/sound/mixer (OSS
>> > emulation provided by ALSA), but can't find anywhere what to put in 
>> it.
>> > Helpful replies will be awarded 10,000 points and a bowl of 
>> strawberry jam!
>>
>> I left the default as it was and it seemed to just work for me.. ?!
>>
>> I'm now using SPDIF out where the volume control in Myth doesn't do
>> anything any way.
>
>
> I know it's very easy to leave it at the default; I just want to be 
> able to excise OSS emulation mode completely so I don't need alsa-oss 
> or my oss USE flag any more (to get myself ready for 2.6 and cruft 
> removal) - obviously, if I did that at the moment, I'd get no mixer 
> controls. The only apps this machine ever uses are Myth, Xine and 
> mPlayer, all of which are compiled with native ALSA.
>
> Can I just chuck alsamixer in there or what?

Unfortunately, it's not that simple.  alsamixer is a program (software 
mixer) used to send instructions to the ALSA driver requesting it send 
instructions to the sound card's hardware mixer.  ALSA allows programs 
to make these requests by using a control device (ctl-device).

Myth requires specifying a mixer device (not a program/software mixer); 
therefore, you would need to specify your ALSA control device--which 
would be something like "ctl.default" (if you haven't defined any in 
your .asoundrc, or, if you have, whatever you specified in your 
.asoundrc).  Extrapolating based on the syntax for specifying an ALSA 
sound device, Myth would use a string like "ALSA:ctl.default".  However, 
quickly perusing mythtv/libs/libmyth/volumecontrol.cpp, it seems that 
Myth only supports volume changing through OSS (i.e. SOUND_MIXER_VOLUME, 
SOUND_MIXER_PCM instead of ALSA's Master and PCM controls, 
respectively).  Therefore, Myth does not yet include native ALSA control 
device support.  (So how big is your itch, anyway?)

On the bright side, however, ALSA's OSS emulation layer does a wonderful 
job of mapping OSS mixer controls to ALSA's native mixer 
controls--especially when you realize how complicated the mapping is (it 
is not a simple one-to-one mapping).

HTH.

Mike


More information about the mythtv-users mailing list