[Gta04-owner] Detecting headset plug: twl4030-madc IRQ issue

PaulK paulk at paulk.fr
Sat May 26 22:06:28 CEST 2012


Le jeudi 24 mai 2012 à 14:24 +0200, Dr. H. Nikolaus Schaller a écrit :
> So step 1 is to enable VHSMIC.OUT. I think by default it is enabled only
> if you select the microphone start some arecord. This is to save some power.
> 
> According to
> 
> http://projects.goldelico.com/p/gta04-kernel/page/Sound/
> 
> it should be
> 
> echo 0 >/sys/devices/virtual/gpio/gpio23/value  # switch off video out
> amixer set 'Analog Left Headset Mic' cap
> arecord

Indeed, it works (while recording): I get raw values around 887 when
there is a headset and around 21 when there is no headset. 
I have looked at other android devices code regarding jack detect and it
turns out Galaxy Nexus is using twl6030 ADC. Its driver is similar to
the twl4030 ADC one so it gives some hints. Though, micbias is set via
GPIO on Galaxy Nexus. 

Thanks a lot for your help. I think I have all the infos to get it to
work very soon!

> This switches VHSMIC.OUT to 2.2V (with no headset).
> 
> I have tried to measure some MICSENSE voltages (not very precisely
> and completely) and I did see 0.13V (no headset) and 0.85V (some headset).7
> 
> So you should be able to see different voltages on ADC7 (I have not tried that).
> 
> Hope this helps to get you to a reliable solution.
> 
> Please share any further observations.
> 
> Nikolaus




More information about the Gta04-owner mailing list