Commit 9dd9b210 authored by Yong Zhi's avatar Yong Zhi Committed by Mark Brown

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: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarNaveen Manohar <naveen.m@intel.com>
Signed-off-by: default avatarYong Zhi <yong.zhi@intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5fd812e6
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
*/ */
#include <linux/input.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <sound/core.h> #include <sound/core.h>
...@@ -193,6 +194,12 @@ static int broxton_da7219_codec_init(struct snd_soc_pcm_runtime *rtd) ...@@ -193,6 +194,12 @@ static int broxton_da7219_codec_init(struct snd_soc_pcm_runtime *rtd)
return ret; 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); da7219_aad_jack_det(component, &broxton_headset);
snd_soc_dapm_ignore_suspend(&rtd->card->dapm, "SoC DMIC"); snd_soc_dapm_ignore_suspend(&rtd->card->dapm, "SoC DMIC");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment