Commit ddf9ea21 authored by Anatol Pomozov's avatar Anatol Pomozov Committed by Mark Brown

ASoC: ts3a227e: Remap keys to match Android headset specification

ts3a227e datasheet says typical key resistance is
  key1 50 Ohm
  key2 135 Ohm
  key3 240 Ohm
  key4 470 Ohm

The android headset specification expect buttons impedance:
  A (MEDIA) 0-70 Ohm
  D (VOICECOMMAND) 110-180 Ohm
  B (VOLUMEUP) 210-290 Ohm
  C (VOLUMEDOWN) 360-680 Ohm

Thus key mapping should be
  key1 - MEDIA
  key2 - VOICECOMMAND
  key3 - VOLUMEUP
  key3 - VOLUMEDOWN
Signed-off-by: default avatarAnatol Pomozov <anatol.pomozov@gmail.com>
Acked-by: default avatarDylan Reid <dgreid@chromium.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 97bf6af1
......@@ -221,9 +221,9 @@ int ts3a227e_enable_jack_detect(struct snd_soc_component *component,
struct ts3a227e *ts3a227e = snd_soc_component_get_drvdata(component);
snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_MEDIA);
snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP);
snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
ts3a227e->jack = jack;
ts3a227e_jack_report(ts3a227e);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment