[lkml]   [2017]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH 2/5] ASoC: Intel: kbl_rt5663_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.

    Signed-off-by: Benson Leung <>
    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);
     \ /
      Last update: 2017-11-22 21:58    [W:3.197 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site