View Single Post
Posts: 1,042 | Thanked: 430 times | Joined on May 2010
#72
Ohh now I know why there's no speaker option... BTW gionni won't this work?
amixer -c0 cset numid=55 On
amixer -c0 cset numid=61 On
amixer -c0 cset numid=64 1
amixer -c0 cset numid=10 50
amixer -c0 cset numid=13 100
For enabling speaker
&
amixer -c0 cset numid=64 0
For disabling it?


Or documented from FMRX-Enabler
# set headphone volume low or it will blow your ears away
amixer -qc0 cset iface=MIXER,name='Headphone Playback Volume' 5,5

amixer -qc0 cset iface=MIXER,name='Left DAC_L1 Mixer Line Switch' off
amixer -qc0 cset iface=MIXER,name='Left DAC_L1 Mixer HP Switch' on
amixer -qc0 cset iface=MIXER,name='Right DAC_R1 Mixer Line Switch' off
amixer -qc0 cset iface=MIXER,name='Right DAC_R1 Mixer HP Switch' on

amixer -qc0 cset iface=MIXER,name='HP DAC Playback Volume' 50,50
amixer -qc0 cset iface=MIXER,name='Speaker Function' 1
For speaker and
amixer -qc0 cset iface=MIXER,name='Left DAC_L1 Mixer Line Switch' on
amixer -qc0 cset iface=MIXER,name='Left DAC_L1 Mixer HP Switch' off
amixer -qc0 cset iface=MIXER,name='Right DAC_R1 Mixer Line Switch' on
amixer -qc0 cset iface=MIXER,name='Right DAC_R1 Mixer HP Switch' off

amixer -qc0 cset iface=MIXER,name='HP DAC Playback Volume' 0,0
amixer -qc0 cset iface=MIXER,name='Speaker Function' 0
For headphone
Careful thou.. I heard playing with alsa might blow up your speakers.

http://fmrx-enabler.garage.maemo.org/


And here's a shell script for routing sound between speaker and headphone.

#!/bin/sh

if [ "${1}" == "speaker" ] ; then
# low headphone playback volume
amixer -qc0 cset iface=MIXER,name='Headphone Playback Volume' 5,5

amixer -qc0 cset iface=MIXER,name='Left DAC_L1 Mixer Line Switch' off
amixer -qc0 cset iface=MIXER,name='Left DAC_L1 Mixer HP Switch' on
amixer -qc0 cset iface=MIXER,name='Right DAC_R1 Mixer Line Switch' off
amixer -qc0 cset iface=MIXER,name='Right DAC_R1 Mixer HP Switch' on

amixer -qc0 cset iface=MIXER,name='HP DAC Playback Volume' 50,50
amixer -qc0 cset iface=MIXER,name='Speaker Function' 1
else if [ "${1}" == "headphone" ] ; then
amixer -qc0 cset iface=MIXER,name='Left DAC_L1 Mixer HP Switch' off
amixer -qc0 cset iface=MIXER,name='Left DAC_L1 Mixer Line Switch' on
amixer -qc0 cset iface=MIXER,name='Right DAC_R1 Mixer HP Switch' off
amixer -qc0 cset iface=MIXER,name='Right DAC_R1 Mixer Line Switch' on

amixer -qc0 cset iface=MIXER,name='HP DAC Playback Volume' 0,0
amixer -qc0 cset iface=MIXER,name='Speaker Function' 0
else
echo 'Please specify option: "speaker" or "headphone"' ;
fi
fi

Last edited by Radicalz38; 2011-01-11 at 13:57.
 

The Following 2 Users Say Thank You to Radicalz38 For This Useful Post: