FAQ038
From the ALSA wiki
| The FAQs have been reorganized. The new location of this question is FAQ#The headphones volume is independent by the master volume, so my keyboard special keys won't affect it. Is there a way to modify this behaviour? |
The headphones volume is independent by the master volume, so my keyboard special keys won't affect it. Is there a way to modify this behaviour?
You can change this behaviour by indicating in the file /proc/asound/card0/oss_mixer wich is the volume channel. For example when I use internal laptop speakers I use
VOLUME "Master" 0
else
VOLUME "Headphone" 0
You can change this with a simple script like:
#!/bin/bash
STATUS=`less /proc/asound/card0/oss_mixer |grep VOLUME | awk -F " " '{print $2}'`
if [ $STATUS = \"Master\" ]
then
echo "the volume is now controlled by the HEADPHONE"
echo 'VOLUME "Headphone" 0' > /proc/asound/card0/oss_mixer
else
echo "the volume is now controlled by the MASTER"
echo 'VOLUME "Master" 0' > /proc/asound/card0/oss_mixer
fi
This script has to be run sudo since you don't have write acces to /proc/asound/card0/oss_mixer.
But I agree with you it would be better to have a key that maps both channels.