Message ID | 1421970436-15862-1-git-send-email-anatol.pomozov@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | ddf9ea21f5fa0832c9711ae13dd467d1f5c4cd87 |
Headers | show |
On Thu, Jan 22, 2015 at 3:47 PM, Anatol Pomozov <anatol.pomozov@gmail.com> wrote: > ts3a227e datasheet says typical key resistance is > key1 50 Om > key2 135 Om > key3 240 Om > key4 470 Om > > The android headset specification expect buttons impedance: > A (MEDIA) 0-70 Om > D (VOICECOMMAND) 110-180 Om > B (VOLUMEUP) 210-290 Om > C (VOLUMEDOWN) 360-680 Om > > 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> > --- > sound/soc/codecs/ts3a227e.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/sound/soc/codecs/ts3a227e.c b/sound/soc/codecs/ts3a227e.c > index 9f2dced..54d431c 100644 > --- a/sound/soc/codecs/ts3a227e.c > +++ b/sound/soc/codecs/ts3a227e.c > @@ -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); These are correct. The initial mapping was based on a mislabeled, pre-production eval board. The new mapping was tested with the reference headsets. > > ts3a227e->jack = jack; > ts3a227e_jack_report(ts3a227e); > -- > 2.2.0.rc0.207.ga3a616c >
Hi On Thu, Jan 22, 2015 at 3:47 PM, Anatol Pomozov <anatol.pomozov@gmail.com> wrote: > ts3a227e datasheet says typical key resistance is > key1 50 Om > It is a misspelling in the commit message. "Om" should be replaced with "Ohm" here and below. Mark are you ok to fix it in your repo or do you want me to resend the updated patch? > key2 135 Om > key3 240 Om > key4 470 Om > > The android headset specification expect buttons impedance: > A (MEDIA) 0-70 Om > D (VOICECOMMAND) 110-180 Om > B (VOLUMEUP) 210-290 Om > C (VOLUMEDOWN) 360-680 Om > > Thus key mapping should be > key1 - MEDIA > key2 - VOICECOMMAND > key3 - VOLUMEUP > key3 - VOLUMEDOWN > > Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> > --- > sound/soc/codecs/ts3a227e.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/sound/soc/codecs/ts3a227e.c b/sound/soc/codecs/ts3a227e.c > index 9f2dced..54d431c 100644 > --- a/sound/soc/codecs/ts3a227e.c > +++ b/sound/soc/codecs/ts3a227e.c > @@ -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); > -- > 2.2.0.rc0.207.ga3a616c > >
On Thu, Jan 22, 2015 at 03:47:16PM -0800, Anatol Pomozov wrote:
> ts3a227e datasheet says typical key resistance is
Applied, thanks.
diff --git a/sound/soc/codecs/ts3a227e.c b/sound/soc/codecs/ts3a227e.c index 9f2dced..54d431c 100644 --- a/sound/soc/codecs/ts3a227e.c +++ b/sound/soc/codecs/ts3a227e.c @@ -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);
ts3a227e datasheet says typical key resistance is key1 50 Om key2 135 Om key3 240 Om key4 470 Om The android headset specification expect buttons impedance: A (MEDIA) 0-70 Om D (VOICECOMMAND) 110-180 Om B (VOLUMEUP) 210-290 Om C (VOLUMEDOWN) 360-680 Om Thus key mapping should be key1 - MEDIA key2 - VOICECOMMAND key3 - VOLUMEUP key3 - VOLUMEDOWN Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> --- sound/soc/codecs/ts3a227e.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)