基于QCM 8960
二十七、Audio jack1. https://wiki.sonyericsson.net/androiki/Huashan_legacy_feature:_Vibrator_%26_Audio_Jack
2. How to get debug info
1 dump register before and after headset plug, use following command to dump register
1.1 $ adb shell 'mount -t debugfs debugfs /sys/kernel/debug/'
1.2 $ adb shell 'cat /sys/kernel/debug/asoc/msm8960-snd-card/tabla_codec/codec_reg'
2 Log message during insertion please enable wcd9xxx-core.c +p, wcd9310.c +p, wcd9xxx-irq.c like following
2.1 $ adb shell 'mount -t debugfs debugfs /sys/kernel/debug/'
2.2 $ adb shell 'echo -n "file wcd9310.c +p" > /sys/kernel/debug/dynamic_debug/control'
2.3 $ adb shell 'echo -n "file wcd9xxx-core.c +p" > /sys/kernel/debug/dynamic_debug/control'
2.4 $ adb shell 'echo -n "file wcd9xxx-irq.c +p" > /sys/kernel/debug/dynamic_debug/control'
4. $ adb shell 'cat /sys/kernel/debug/gpio' 得到GPIO状态 gpio-189 = 151 + PMIC8921的38 Pin
gpio-189 (-- ) in lo 0x05 0x10 0x22 0x30 0x40 0x58
5. cat sys/module/snd_soc_msm8960/parameters/hs_detect_use_gpio; 可查看是否使用gpio中断检测headset insert/remove
二十八、如何检测 headset/headphon