mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/5] ASoC: Map BTN_0 for Android Headsets to KEY_PLAYPAUSE
@ 2017-11-22 20:56 Benson Leung
  2017-11-22 20:56 ` [PATCH 1/5] ASoC: Intel: kbl_rt5663_rt5514_max98927: Map BTN_0 " Benson Leung
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Benson Leung @ 2017-11-22 20:56 UTC (permalink / raw)
  To: broonie, linux-kernel
  Cc: harshapriya.n, naveen.m, srinivas.kandagatla, cychiang, dgreid,
	anatol.pomozov, bleung, bleung

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

 [PATCH 1/5] ASoC: Intel: kbl_rt5663_rt5514_max98927: Map BTN_0 to
 [PATCH 2/5] ASoC: Intel: kbl_rt5663_max98927: Map BTN_0 to
 [PATCH 3/5] ASoC: ts3a227e: Map BTN_0 to KEY_PLAYPAUSE
 [PATCH 4/5] ASoC: rk3399_gru_sound: Map BTN_0 to KEY_PLAYPAUSE
 [PATCH 5/5] ASoC: qcom: apq8016-sbc: Map BTN_0 to KEY_PLAYPAUSE

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/5] ASoC: Intel: kbl_rt5663_rt5514_max98927: Map BTN_0 to KEY_PLAYPAUSE
  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
  2017-11-22 20:56 ` [PATCH 2/5] ASoC: Intel: kbl_rt5663_max98927: " Benson Leung
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Benson Leung @ 2017-11-22 20:56 UTC (permalink / raw)
  To: broonie, linux-kernel
  Cc: harshapriya.n, naveen.m, srinivas.kandagatla, cychiang, dgreid,
	anatol.pomozov, bleung, bleung

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/5] ASoC: Intel: kbl_rt5663_max98927: Map BTN_0 to KEY_PLAYPAUSE
  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 ` [PATCH 1/5] ASoC: Intel: kbl_rt5663_rt5514_max98927: Map BTN_0 " Benson Leung
@ 2017-11-22 20:56 ` Benson Leung
  2017-11-22 20:56 ` [PATCH 3/5] ASoC: ts3a227e: " Benson Leung
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Benson Leung @ 2017-11-22 20:56 UTC (permalink / raw)
  To: broonie, linux-kernel
  Cc: harshapriya.n, naveen.m, srinivas.kandagatla, cychiang, dgreid,
	anatol.pomozov, bleung, bleung

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_max98927.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c
index 6dcad0a8a0d0..bf7014ca486f 100644
--- a/sound/soc/intel/boards/kbl_rt5663_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c
@@ -225,7 +225,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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 3/5] ASoC: ts3a227e: Map BTN_0 to KEY_PLAYPAUSE
  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 ` [PATCH 1/5] ASoC: Intel: kbl_rt5663_rt5514_max98927: Map BTN_0 " Benson Leung
  2017-11-22 20:56 ` [PATCH 2/5] ASoC: Intel: kbl_rt5663_max98927: " Benson Leung
@ 2017-11-22 20:56 ` Benson Leung
  2017-11-22 20:56 ` [PATCH 4/5] ASoC: rk3399_gru_sound: " Benson Leung
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Benson Leung @ 2017-11-22 20:56 UTC (permalink / raw)
  To: broonie, linux-kernel
  Cc: harshapriya.n, naveen.m, srinivas.kandagatla, cychiang, dgreid,
	anatol.pomozov, bleung, bleung

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/codecs/ts3a227e.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/ts3a227e.c b/sound/soc/codecs/ts3a227e.c
index 738e04b09116..1271e7e1fc78 100644
--- a/sound/soc/codecs/ts3a227e.c
+++ b/sound/soc/codecs/ts3a227e.c
@@ -241,7 +241,7 @@ 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_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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 4/5] ASoC: rk3399_gru_sound: Map BTN_0 to KEY_PLAYPAUSE
  2017-11-22 20:56 [PATCH 0/5] ASoC: Map BTN_0 for Android Headsets to KEY_PLAYPAUSE Benson Leung
                   ` (2 preceding siblings ...)
  2017-11-22 20:56 ` [PATCH 3/5] ASoC: ts3a227e: " Benson Leung
@ 2017-11-22 20:56 ` 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
  5 siblings, 0 replies; 7+ messages in thread
From: Benson Leung @ 2017-11-22 20:56 UTC (permalink / raw)
  To: broonie, linux-kernel
  Cc: harshapriya.n, naveen.m, srinivas.kandagatla, cychiang, dgreid,
	anatol.pomozov, bleung, bleung

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/rockchip/rk3399_gru_sound.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/rockchip/rk3399_gru_sound.c b/sound/soc/rockchip/rk3399_gru_sound.c
index d64fbbd50544..fa6cd1de828b 100644
--- a/sound/soc/rockchip/rk3399_gru_sound.c
+++ b/sound/soc/rockchip/rk3399_gru_sound.c
@@ -206,7 +206,8 @@ static int rockchip_sound_da7219_init(struct snd_soc_pcm_runtime *rtd)
 		return ret;
 	}
 
-	snd_jack_set_key(rockchip_sound_jack.jack, SND_JACK_BTN_0, KEY_MEDIA);
+	snd_jack_set_key(
+		rockchip_sound_jack.jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
 	snd_jack_set_key(
 		rockchip_sound_jack.jack, SND_JACK_BTN_1, KEY_VOLUMEUP);
 	snd_jack_set_key(
-- 
2.15.0.448.gf294e3d99a-goog

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 5/5] ASoC: qcom: apq8016-sbc: Map BTN_0 to KEY_PLAYPAUSE
  2017-11-22 20:56 [PATCH 0/5] ASoC: Map BTN_0 for Android Headsets to KEY_PLAYPAUSE Benson Leung
                   ` (3 preceding siblings ...)
  2017-11-22 20:56 ` [PATCH 4/5] ASoC: rk3399_gru_sound: " Benson Leung
@ 2017-11-22 20:56 ` Benson Leung
  2017-11-27 13:04 ` [PATCH 0/5] ASoC: Map BTN_0 for Android Headsets " Mark Brown
  5 siblings, 0 replies; 7+ messages in thread
From: Benson Leung @ 2017-11-22 20:56 UTC (permalink / raw)
  To: broonie, linux-kernel
  Cc: harshapriya.n, naveen.m, srinivas.kandagatla, cychiang, dgreid,
	anatol.pomozov, bleung, bleung

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/qcom/apq8016_sbc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/qcom/apq8016_sbc.c b/sound/soc/qcom/apq8016_sbc.c
index d49adc822a11..03851fedd1e2 100644
--- a/sound/soc/qcom/apq8016_sbc.c
+++ b/sound/soc/qcom/apq8016_sbc.c
@@ -92,7 +92,7 @@ static int apq8016_sbc_dai_init(struct snd_soc_pcm_runtime *rtd)
 
 		jack = pdata->jack.jack;
 
-		snd_jack_set_key(jack, SND_JACK_BTN_0, KEY_MEDIA);
+		snd_jack_set_key(jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
 		snd_jack_set_key(jack, SND_JACK_BTN_1, KEY_VOICECOMMAND);
 		snd_jack_set_key(jack, SND_JACK_BTN_2, KEY_VOLUMEUP);
 		snd_jack_set_key(jack, SND_JACK_BTN_3, KEY_VOLUMEDOWN);
-- 
2.15.0.448.gf294e3d99a-goog

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/5] ASoC: Map BTN_0 for Android Headsets to KEY_PLAYPAUSE
  2017-11-22 20:56 [PATCH 0/5] ASoC: Map BTN_0 for Android Headsets to KEY_PLAYPAUSE Benson Leung
                   ` (4 preceding siblings ...)
  2017-11-22 20:56 ` [PATCH 5/5] ASoC: qcom: apq8016-sbc: " Benson Leung
@ 2017-11-27 13:04 ` Mark Brown
  5 siblings, 0 replies; 7+ messages in thread
From: Mark Brown @ 2017-11-27 13:04 UTC (permalink / raw)
  To: Benson Leung
  Cc: linux-kernel, harshapriya.n, naveen.m, srinivas.kandagatla,
	cychiang, dgreid, anatol.pomozov, bleung

[-- Attachment #1: Type: text/plain, Size: 578 bytes --]

On Wed, Nov 22, 2017 at 12:56:38PM -0800, Benson Leung wrote:
> 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.                                       
You need to send patches to the relevant mailing lists, this provides an
archive of the review that happens and allows people other than the
reviewers you name to look at the patches.  Please see SubmittingPatches
for details of the patch submission process.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-11-27 13:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 1/5] ASoC: Intel: kbl_rt5663_rt5514_max98927: Map BTN_0 " Benson Leung
2017-11-22 20:56 ` [PATCH 2/5] ASoC: Intel: kbl_rt5663_max98927: " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®