linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Benson Leung <bleung@chromium.org>
To: broonie@kernel.org, linux-kernel@vger.kernel.org
Cc: harshapriya.n@intel.com, naveen.m@intel.com,
	srinivas.kandagatla@linaro.org, cychiang@chromium.org,
	dgreid@chromium.org, anatol.pomozov@gmail.com,
	bleung@chromium.org, bleung@google.com
Subject: [PATCH 1/5] ASoC: Intel: kbl_rt5663_rt5514_max98927: Map BTN_0 to KEY_PLAYPAUSE
Date: Wed, 22 Nov 2017 12:56:39 -0800	[thread overview]
Message-ID: <20171122205643.99783-2-bleung@chromium.org> (raw)
In-Reply-To: <20171122205643.99783-1-bleung@chromium.org>

The Android 3.5mm Headset jack specification mentions that BTN_0 should
be mapped to KEY_MEDIA, but this is less logical than KEY_PLAYPAUSE,
which has much broader userspace support.

For example, the Chrome OS userspace now supports KEY_PLAYPAUSE to toggle
play/pause of videos and audio, but does not handle KEY_MEDIA.

Furthermore, Android itself now supports KEY_PLAYPAUSE equivalently, as the
new USB headset spec requires KEY_PLAYPAUSE for BTN_0.
https://source.android.com/devices/accessories/headset/usb-headset-spec

Signed-off-by: Benson Leung <bleung@chromium.org>
---
 sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
index 271ae3c2c535..90ea98f01c4c 100644
--- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
@@ -195,7 +195,7 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
 	}
 
 	jack = &ctx->kabylake_headset;
-	snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_MEDIA);
+	snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
 	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);
-- 
2.15.0.448.gf294e3d99a-goog

  reply	other threads:[~2017-11-22 20:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-22 20:56 [PATCH 0/5] ASoC: Map BTN_0 for Android Headsets to KEY_PLAYPAUSE Benson Leung
2017-11-22 20:56 ` Benson Leung [this message]
2017-11-22 20:56 ` [PATCH 2/5] ASoC: Intel: kbl_rt5663_max98927: Map BTN_0 " Benson Leung
2017-11-22 20:56 ` [PATCH 3/5] ASoC: ts3a227e: " Benson Leung
2017-11-22 20:56 ` [PATCH 4/5] ASoC: rk3399_gru_sound: " Benson Leung
2017-11-22 20:56 ` [PATCH 5/5] ASoC: qcom: apq8016-sbc: " Benson Leung
2017-11-27 13:04 ` [PATCH 0/5] ASoC: Map BTN_0 for Android Headsets " Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171122205643.99783-2-bleung@chromium.org \
    --to=bleung@chromium.org \
    --cc=anatol.pomozov@gmail.com \
    --cc=bleung@google.com \
    --cc=broonie@kernel.org \
    --cc=cychiang@chromium.org \
    --cc=dgreid@chromium.org \
    --cc=harshapriya.n@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=naveen.m@intel.com \
    --cc=srinivas.kandagatla@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).