[maemo-developers] how to detect if the headphones are plugged?

From: Austin Che list-maemo at austinche.name
Date: Wed Oct 17 23:15:53 EEST 2007
Daniel M German <dmg at uvic.ca> wrote:
    
> is there a way to detect if the headphones are plugged?
>
> I am irritated that music playing software does not pause when the
> headphones are removed (like the ipod) and would like to write a patch
> to make it an option.

~ $ cat /sys/devices/platform/gpio-switch/headphone/state 
connected
~ $ cat /sys/devices/platform/gpio-switch/headphone/state 
disconnected

    I'd also be interested to know if there's a way to be notified
    about this rather than just polling.

More information about the maemo-developers mailing list