On ons, 2007-10-17 at 16:15 -0400, ext Austin Che wrote: > Daniel M German <[EMAIL PROTECTED]> 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.
g_io_add_watch() if you're using glib, inotify if you're not (man inotify(7)). Regards: David _______________________________________________ maemo-developers mailing list [email protected] https://lists.maemo.org/mailman/listinfo/maemo-developers
