[MPlayer-dev-eng] [alsa1x] Mixer attach problem

Marcus Thiesen marcus at thiesenweb.de
Fri Mar 5 19:23:55 CET 2004


Hi,

I had the problem that I couldn't change the volume no more after I upgraded 
to alsa1x output.
The problem was that i had the option 
	mixer = /dev/mixer0 
in my config file. There is some magic in ao_alsa1x.c that I don't understand:

      if(mix_name == NULL){
        if(mixer_device) {
          card = strdup(mixer_device);
          mix_name = strchr(card, '/');
          if(mix_name) {
            *mix_name++ = 0;
          } else {
            mix_name = "PCM";
          }
        } else {
          mix_name = "PCM";
          card = "default";
        }
      }

mix_name is null at the beginning, mixer_device is intialised with the value 
from the config file /dev/mixer0. The strchr call afterwards and the pointer 
magic I don't understand leads to a card name of "/dev/mixer0" and a mix_name 
of "dev/mixer0" which doesn't work at all. After I removed the line from my 
config the mixer worked fine, because it used the default values like PCM and 
default as card name. What are the above lines intended to do? They will 
never ever end up with useable values, cause I can't imagine that a sound 
card is named "/dev/mixer0" and that a mixer name could be something equal.
Have fun,
	Marcus



-- 
---------------------------------------------------------
|Marcus Thiesen                           ICQ# 108989768|
---------------------------------------------------------
|                   www.thiesen.org                     |
---------------------------------------------------------
  28A7 37CC AE2C BB6C D56D     8A3D E614 E56B 7546 75F2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20040305/464c4ff1/attachment.pgp>


More information about the MPlayer-dev-eng mailing list