Hello,

Using the information here: http://lists.linuxtogo.org/pipermail/smartphones-userland/2009-June/001573.html I've been able to detect a headset button press and use it to pause and unpause mplayer. Very nice for listening to podcasts with the Freerunner in my pocket.

To make it work I modified oevents/rules.yaml to include the following:

-
    #
    # Headset Audio Scenario Support
    #
-
    trigger: InputEvent()
    filters:
             - HasAttr(switch, "HEADSET")
             - HasAttr(event, "pressed")
    actions:
             - Command('amixer -d sset "Amp Spk" mute')
             - Command('amixer -d sset "DAPM Headset Mic" on')
             - Command('amixer -d sset "Left Mixer Sidetone Playback Sw" on')
             - Command('amixer -d sset "ALC Mixer Mic1" cap')
-
    trigger: InputEvent()
    filters:
             - HasAttr(switch, "HEADSET")
             - HasAttr(event, "released")
    actions:
             - Command('amixer -d sset "Amp Spk" unmute')
             - Command('amixer -d sset "DAPM Headset Mic" off')
             - Command('amixer -d sset "Left Mixer Sidetone Playback Sw" off')
             - Command('amixer -d sset "ALC Mixer Mic1" uncap')
-

However, once the Freerunner is suspended and woken again, it no longer detects the headset button. I've checked the ALSA settings and they do not appear to have been changed.

If I unplug and replug the headset, then it starts to work again, as long as fso-frameworkd is running.

If I stop fso-frameworkd, then it unplugging and replugging the headset makes no difference. No surprises there. But I would have expected that manually doing the amixer commands would make it work again. But it doesn't.

So it seems that:

1. suspending and waking the freerunner is doing something to the sound settings that makes it stop detecting the headset button.

AND 2. fso-frameworkd is doing something more than what is specified in rules.yaml when the headset is plugged in.

Can anyone shed some light on this?

Cheers, Jonathan

_______________________________________________
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland

Reply via email to