On Fri, Dec 10, 2010 at 8:10 AM, Andrew Green <[email protected]> wrote: > What API should a phone app use to enable speakerphone? > > Or phrased another way the Policy Framework handles the audio routing so > what should be done to cause the PF to make a policy decision to route audio > to the speakers? > > I'm not trying to implement this immediately just planning for the future.
The following script may provide some clues: [me...@localhost ~]$ cat /usr/bin/n900-alsamixer-set-speakers.sh #!/bin/sh amixer -D hw:0 set PCM 100% amixer -D hw:0 set 'HP DAC' 75% on amixer -D hw:0 set 'Left DAC_L1 Mixer HP' on amixer -D hw:0 set 'Right DAC_R1 Mixer HP' on amixer -D hw:0 set 'Speaker Function' On -- Niels http://nielsmayer.com PS: other scripts doing similar things w/ ALSA: -rwxr-xr-x 1 root root 176 Oct 28 17:31 /usr/bin/n900-alsamixer-set-dmic.sh -rwxr-xr-x 1 root root 261 Oct 28 17:31 /usr/bin/n900-alsamixer-set-earpiece.sh -rwxr-xr-x 1 root root 52 Oct 28 17:31 /usr/bin/n900-alsamixer-set-fm_off.sh -rwxr-xr-x 1 root root 86 Oct 28 17:31 /usr/bin/n900-alsamixer-set-fm_on.sh -rwxr-xr-x 1 root root 622 Oct 28 17:31 /usr/bin/n900-alsamixer-set-fmrx_bypass.sh -rwxr-xr-x 1 root root 270 Oct 28 17:31 /usr/bin/n900-alsamixer-set-fmtx.sh -rwxr-xr-x 1 root root 328 Oct 28 17:31 /usr/bin/n900-alsamixer-set-headphone.sh -rwxr-xr-x 1 root root 481 Oct 28 17:31 /usr/bin/n900-alsamixer-set-headset_mic.sh -rwxr-xr-x 1 root root 3516 Oct 28 17:31 /usr/bin/n900-alsamixer-set-shutdown.sh -rwxr-xr-x 1 root root 208 Oct 28 17:31 /usr/bin/n900-alsamixer-set-speakers.sh PPS: Just when i thought I'd worked with a complicated soundchip ( c.f. http://mudita24.googlecode.com ) ... the "amixer" results of meego indicate an equally complicated soundchip; where random hacking could render your system somewhat useless... is there documentation on all these values?: http://nielsmayer.com/meego/n900-card0-amixer.txt . The only chip mentioned by name is http://focus.ti.com/lit/ds/symlink/tpa6130a2.pdf "TPA6130A2 Headphone" _______________________________________________ MeeGo-handset mailing list [email protected] http://lists.meego.com/listinfo/meego-handset
