aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorYong Zhi <yong.zhi@intel.com>2019-02-13 17:08:51 -0600
committerMark Brown <broonie@kernel.org>2019-02-19 15:42:08 +0000
commit9dd9b210f8c6104690ba48a630bbe9af2f32c292 (patch)
treee1c525f87af633714953858fcc0e579ab9c8e656 /sound
parentASoC: sunxi: sun50i-codec-analog: Rename hpvcc regulator supply to cpvdd (diff)
downloadlinux-dev-9dd9b210f8c6104690ba48a630bbe9af2f32c292.tar.xz
linux-dev-9dd9b210f8c6104690ba48a630bbe9af2f32c292.zip
ASoC: Intel: Headset button support in broxton machine driver
Map the 4 headset buttons to KEY_PAUSE, KEY_VOLUMEUP, KEY_VOLUMEDOWN and KEY_VOICECOMMAND. Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Naveen Manohar <naveen.m@intel.com> Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/intel/boards/bxt_da7219_max98357a.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/intel/boards/bxt_da7219_max98357a.c b/sound/soc/intel/boards/bxt_da7219_max98357a.c
index c00925f9da73..30311b81a543 100644
--- a/sound/soc/intel/boards/bxt_da7219_max98357a.c
+++ b/sound/soc/intel/boards/bxt_da7219_max98357a.c
@@ -16,6 +16,7 @@
* GNU General Public License for more details.
*/
+#include <linux/input.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <sound/core.h>
@@ -193,6 +194,12 @@ static int broxton_da7219_codec_init(struct snd_soc_pcm_runtime *rtd)
return ret;
}
+ snd_jack_set_key(broxton_headset.jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
+ snd_jack_set_key(broxton_headset.jack, SND_JACK_BTN_1, KEY_VOLUMEUP);
+ snd_jack_set_key(broxton_headset.jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
+ snd_jack_set_key(broxton_headset.jack, SND_JACK_BTN_3,
+ KEY_VOICECOMMAND);
+
da7219_aad_jack_det(component, &broxton_headset);
snd_soc_dapm_ignore_suspend(&rtd->card->dapm, "SoC DMIC");