Issue with selected mixer channel

I recently moved back to Slackware 13.1 from Xubuntu 10.10. I had been using the Ubuntu-supplied version of MOC with no issues at all. MOC does not come in the default Slackware install, so I used the slackbuild script from, which is 2.5.0 Alpha 4. The issue I am seeing is my system volume control works against the "master" mixer channel, and MOC uses the PCM mixer channel. I have tried to change the mixer settings in the .moc/config file, but when I change the ALSA mixer setting to make MOC use the master channel, MOC displays "Master 00%", and the volume can't be changed.

This issue isn't crippling, MOC still works, I just have to remember to turn the PCM mixer channel back to 100% when I'm finished using MOC.

Btw, I'm using the example config file that was included with the source package.

Did I miss anything? Is there some way for me to make MOC use the master mixer channel, like the rest of my system?


I was having the same issue. Today I spent some time with a debugger and I think I've tracked down the problem. The ALSA documentation is unclear, but I that the channel_id passed to snd_mixer_selem_has_playback_channel and snd_mixer_selem_get_playback_volume is incorrectly transformed into a bitmask in alsa_read_mixer_raw. Replacing 1 << i with just i at alsa.c:207 and alsa.c:212 seems to make it work correctly for me.

I've tried including a patch here, but I haven't figured out how to prevent the forum software from mangling it. Sorry about that.


And if 'DoctorPepper' can confirm it works on his system
then I'll commit it. Good work, Ted.

I have not had independant verification that Ted's fix actually
resolves the problem, but I have checked against other ALSA-using
packages and it seems consistant with those.

Committed to SVN as r2318.