[mythtv-users] Alsa volume control

Justin Luitjens luitjens at cs.utah.edu
Fri Feb 2 04:00:57 UTC 2007


I figured out a way to control the volume.  The problem is my card does 
not have a Master volume and the PCM volume does not appear to work with 
the current ALSA drivers.  For anyone else having a problem like this or 
a problem where it says /dev/dsp is in use here is how to create the 
correct devices in the .asoundrc file:

#set the default player to a softvolume plug
pcm.!default {
    type            plug
    slave.pcm       "softvol"
}
#soft volume device with channel named master (this channel cannot 
already exist)
pcm.softvol {
    type            softvol
   #pipe into dmix in order to mix multiple devices
    slave {
        pcm         "dmix-analog"     
    }
    control {
        name        "Master"
        card        0
    }
}
#dmix device
pcm.dmix-analog {
  type dmix
  ipc_key 1234
  slave {
    pcm "analog-hw"
    period_time 0
    period_size 1024
    buffer_size 4096
    rate 48000
  }
}
#analog hardware
pcm.analog-hw {
  type hw
  card 0
}

To test if this works type alsamixer and see if there is a "Master" 
channel, adjust the volume.

Finally test your speakers by typing:

speaker-test -Dsoftvol -c2 -twav


if you here sound you should be set.  Go into mythtv and set the sound 
device to ALSA:default and the mixer to default


More information about the mythtv-users mailing list