[Gta04-owner] Detecting headset plug: twl4030-madc IRQ issue
PaulK
paulk at paulk.fr
Sat Apr 28 19:15:37 CEST 2012
I am now working on adding sound to Replicant. Dealing with the controls
seems very clear to me now, thanks to the docs on:
http://projects.goldelico.com/p/gta04-kernel/doc/
Currently, I am trying to get the twl4030-madc to report headset
plug/unplug. If I read correctly the docs, ADC7 is MICSENSE.
Now the driver reports data through channels, so I guess what I'm
looking for is chan 7.
A threaded IRQ is requested at probe and, if I got it correctly, is
supposed to call the twl4030_madc_threaded_irq_handler function when the
value of one ADC changes. Except that I didn't see that function getting
called when the headset is plugged or unplugged. I even tried removing
the battery (as it should report battery-related infos), it it didn't
get called either.
Now there are a few confusing elements: there is a
twl4030_madc_enable_irq function that could lead me to think that it is
somehow disabled by default and the ADCs chip must somehow be told to
make use of the IRQ line.
I have never dealt with IRQ interrupts before so I may be missing
something obvious here. Though, I would appreciate help discovering what
is actually going on and why this handler function never gets called.
--
Paul Kocialkowski, Replicant developer
Replicant is a fully free Android distribution
Website: http://www.replicant.us
Wiki/Tracker: http://redmine.replicant.us
More information about the Gta04-owner
mailing list