ASoC: Map BTN_0 for Android Headsets to KEY_PLAYPAUSE
Subsystems (5)
cover ASoC: Map BTN_0 for Android Headsets to KEY_PLAYPAUSE
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
PATCH 1/5 ASoC: Intel: kbl_rt5663_rt5514_max98927: Map BTN_0 to KEY_PLAYPAUSE
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
--- sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c +1 -1
@@ -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 );
Signature · 1 line
2.15.0.448.gf294e3d99a-goog
PATCH 2/5 ASoC: Intel: kbl_rt5663_max98927: Map BTN_0 to KEY_PLAYPAUSE
In reply to Benson LeungThe 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
--- sound/soc/intel/boards/kbl_rt5663_max98927.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/boards/kbl_rt5663_max98927.c +1 -1
@@ -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 );
Signature · 1 line
2.15.0.448.gf294e3d99a-goog
PATCH 3/5 ASoC: ts3a227e: Map BTN_0 to KEY_PLAYPAUSE
In reply to Benson LeungThe 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
--- sound/soc/codecs/ts3a227e.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/ts3a227e.c +1 -1
@@ -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 );
Signature · 1 line
2.15.0.448.gf294e3d99a-goog
PATCH 4/5 ASoC: rk3399_gru_sound: Map BTN_0 to KEY_PLAYPAUSE
In reply to Benson LeungThe 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
--- sound/soc/rockchip/rk3399_gru_sound.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
sound/soc/rockchip/rk3399_gru_sound.c +2 -1
@@ -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(
Signature · 1 line
2.15.0.448.gf294e3d99a-goog
PATCH 5/5 ASoC: qcom: apq8016-sbc: Map BTN_0 to KEY_PLAYPAUSE
In reply to Benson LeungThe 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
--- sound/soc/qcom/apq8016_sbc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/qcom/apq8016_sbc.c +1 -1
@@ -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 );
Signature · 1 line
2.15.0.448.gf294e3d99a-goog
Mark Brown
maintainerQuoted 3 lines · Benson Leung
The Android 3.5mm Headset jack specification mentions that
BTN_0should be mapped toKEY_MEDIA, but this is less logical thanKEY_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.