WM1811 buttons detection

GR0S

Senior Member
Jun 10, 2012
889
192
0
I looked into wm8994.c microphone detection code, it says it can detect up to 6 buttons.
But I can't find any impedance/resistance related code.

Here is detection listing
static void wm8958_button_det(struct snd_soc_codec *codec, u16 status)
{
struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
int report;

report = 0;
if (status & 0x4)
report |= SND_JACK_BTN_0;

if (status & 0x8)
report |= SND_JACK_BTN_1;

if (status & 0x10)
report |= SND_JACK_BTN_2;

if (status & 0x20)
report |= SND_JACK_BTN_3;

if (status & 0x40)
report |= SND_JACK_BTN_4;

if (status & 0x80)
report |= SND_JACK_BTN_5;

snd_soc_jack_report(wm8994->micdet[0].jack, report,
wm8994->btn_mask);
}
Can anyone lookup into driver code?
 
  • Like
Reactions: Kordius
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone