I had the same problem, however it is different for me because I use OSS rather than ALSA (which is the default). I ended up having to write a small bash script to change my mixer values and I just run that script to put my laptop in "headphone mode." Unless there is some ALSA trick I'm unaware of, which is very possible, you'll just have to mess with the mixer until you achieve the desired results. I honestly don't even know what the ALSA mixer looks like, but I would advise looking for something along the lines of the input-mode or speaker-mode, anything like that. For me, the bash script is:
- Code: Select all
if [ "$MODE" = "Value of mixer control jack.int-speaker.mode set to mix2" ]; then
ossmix jack.int-speaker.mode input
ossmix jack.int-speaker.mode mix2
So, this communicates with OSS, telling it to change the int-speaker mode. For me, hitting <Control> h runs the script, changing my audio output to speakers or to the headphones jack. Hopefully you can modify that script to suit your needs.