View Single Post
andrei1089's Avatar
Posts: 81 | Thanked: 109 times | Joined on Apr 2009 @ Brasov/Cluj, Romania
#73
Originally Posted by qwerty12 View Post
That would explain why my usage of inotify-tools didn't help much...

thp uses a GIOChannel to monitor /sys/devices/platform/gpio-switch/headphone/state and headphoned sleeps for most of the time so I guess using one to monitor the file cb42 told us about wouldn't do any harm...

@jaeezzy, that's a good idea. Will come up with logical ways to handle that one
I hacked a bit on the headphoned code adding another watch for the file /sys/devices/platform/nokia-av/detect but it doesn't detect any change

Then I've tried with inotifywait for both files /sys/devices/platform/nokia-av/detect and /sys/devices/platform/gpio-switch/headphone/state
I've been surprised to see that a change is detected only for the latter. So I think there's no other way than polling the file.
 

The Following 4 Users Say Thank You to andrei1089 For This Useful Post: