Playing a wav file on the openmoko voice stream

Al Johnson openmoko at
Mon Jan 26 17:01:39 CET 2009

On Tuesday 20 January 2009, Ketaki Deo wrote:
> Hey,
> I am trying to playback a wav file by following the instructions given in
> the wiki,
> In the wiki they have specified that we need to change the following in the
> asound.state file,
> if you are inside a voice call (e.g. FSO/zhone), open Alsactl and change
> the following mixer controls:
>    1. Mono Mixer Left
>       - this enables audio routing from the Stereo DAC left channel to the
>       Mono Out (GSM Modem)
>    2. Mono Mixer Right Playback Switch
>       - this enables audio routing from the Stereo DAC right channel to the
>       Mono Out (GSM Modem)
>    3. PCM Level
>       - adjust the PCM Level up to the desired playback volume
> But they have not mentioned what exactly to change.
> Can anyone please help me with this?

If you are going to do this repeatedly you probably want to 
edit /usr/share/openmoko/scenarios/gsmhandset.state or make a copy of this 
file with a suitable name (gsmstereoout.state is assumed as a new state file 
name below) and modify it with your preferred text editor.

The state file will show alsa controls with their range of allowable values, 
and a descriptive name. You are looking for controls 74, 75 and 1 
respectively, assuming you are using a gta02. For 74 and 75 you want to 
change 'value false' to 'value true', and for 1 change both value.0 and 
value.1 from 0 to something much higher, perhaps starting at full volume 
(255) and reducing it if this is too loud.

You can use the state file during the call using alsactl:

asactl -f /usr/share/openmoko/scenarios/gsmstereoout.state restore

Or you can make the changes individually using alsamixer. This can be a little 
confusing as there are a _lot_ of controls, and the descriptons are shown 
slightly differently to those in the .state file. When you have settings you 
like you could save them using alsactl:

asactl -f /usr/share/openmoko/scenarios/gsmstereoout.state store

Note that in either case a call state transition will cause a new state file 
to be loaded, so you need to load and/or save your preferred state during the 

More information about the devel mailing list