ASoC: Intel: glk_rt5682_max98357a: Remap button control-function
authorYong Zhi <yong.zhi@intel.com>
Sat, 18 May 2019 18:30:09 +0000 (13:30 -0500)
committerMark Brown <broonie@kernel.org>
Mon, 20 May 2019 14:21:15 +0000 (15:21 +0100)
Assign button functions based on Android wired headset specs(v1.1).

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
Signed-off-by: Naveen Manohar <naveen.m@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/glk_rt5682_max98357a.c

index d17126f7757cc611fd71c223794883e752a4653b..6b677b5bcdcdfbeaf5b8c51fbcfea0787f1e02ae 100644 (file)
@@ -169,9 +169,10 @@ static int geminilake_rt5682_codec_init(struct snd_soc_pcm_runtime *rtd)
        jack = &ctx->geminilake_headset;
 
        snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
-       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);
+
        ret = snd_soc_component_set_jack(component, jack, NULL);
 
        if (ret) {