diff options
author | Agrawal, Akshu <Akshu.Agrawal@amd.com> | 2018-04-12 17:57:11 +0800 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-04-16 11:53:53 +0100 |
commit | 923859e3f6b281cc280214854a44dfd04cb7f65d (patch) | |
tree | 77c69559e3551e2132a0434492bab70ca7eb3c78 /sound/soc | |
parent | 3d5fa5270b1f4cc47b300a943b2a82727c6c6b07 (diff) |
ASoC: AMD: Support headset button on Stoney DA7219
Adds headset button support.
TEST=Tested Volume UP/Down, Play/Pause functionality
Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r-- | sound/soc/amd/acp-da7219-max98357a.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c index b205c782e494..d281c227d64c 100644 --- a/sound/soc/amd/acp-da7219-max98357a.c +++ b/sound/soc/amd/acp-da7219-max98357a.c @@ -33,6 +33,7 @@ #include <linux/gpio.h> #include <linux/module.h> #include <linux/i2c.h> +#include <linux/input.h> #include <linux/acpi.h> #include "../codecs/da7219.h" @@ -80,6 +81,11 @@ static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd) return ret; } + snd_jack_set_key(cz_jack.jack, SND_JACK_BTN_0, KEY_PLAYPAUSE); + snd_jack_set_key(cz_jack.jack, SND_JACK_BTN_1, KEY_VOLUMEUP); + snd_jack_set_key(cz_jack.jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN); + snd_jack_set_key(cz_jack.jack, SND_JACK_BTN_3, KEY_VOICECOMMAND); + da7219_aad_jack_det(component, &cz_jack); return 0; |