]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: ts3a227e: Remap keys to match Android headset specification
authorAnatol Pomozov <anatol.pomozov@gmail.com>
Thu, 22 Jan 2015 23:47:16 +0000 (15:47 -0800)
committerMark Brown <broonie@kernel.org>
Tue, 27 Jan 2015 18:32:04 +0000 (18:32 +0000)
commitac3414e5e3a7fa1102e02b61b68db715dc86275a
treea72a5aa558b54829932842b7e5b73bef262908b1
parentbfa6fa2a2dfa997f6c80e35808e50464ecfebcda
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: Anatol Pomozov <anatol.pomozov@gmail.com>
Acked-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/ts3a227e.c