diff options
author | Hans de Goede <hdegoede@redhat.com> | 2018-07-05 00:59:35 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-07-10 18:49:28 +0100 |
commit | caed9d636e857997e923dfe473b9310de645d916 (patch) | |
tree | a69e845e485eaf136756842a857d6774e8c6f2ad /sound/soc/intel | |
parent | b91f432cbc3326f715b8c3f02ff4066ab398833f (diff) | |
download | blackbird-op-linux-caed9d636e857997e923dfe473b9310de645d916.tar.gz blackbird-op-linux-caed9d636e857997e923dfe473b9310de645d916.zip |
ASoC: Intel: bytcr_rt5651: Reporting button presses
Enable reporting of button presses now that the codec driver recently has
gotten support for this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/intel')
-rw-r--r-- | sound/soc/intel/boards/bytcr_rt5651.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c index 2a8f86dfe4cb..b687043c8425 100644 --- a/sound/soc/intel/boards/bytcr_rt5651.c +++ b/sound/soc/intel/boards/bytcr_rt5651.c @@ -26,6 +26,7 @@ #include <linux/clk.h> #include <linux/device.h> #include <linux/dmi.h> +#include <linux/input.h> #include <linux/gpio/consumer.h> #include <linux/gpio/machine.h> #include <linux/slab.h> @@ -531,13 +532,17 @@ static int byt_rt5651_init(struct snd_soc_pcm_runtime *runtime) if (BYT_RT5651_JDSRC(byt_rt5651_quirk)) { ret = snd_soc_card_jack_new(runtime->card, "Headset", - SND_JACK_HEADSET, &priv->jack, - bytcr_jack_pins, ARRAY_SIZE(bytcr_jack_pins)); + SND_JACK_HEADSET | SND_JACK_BTN_0, + &priv->jack, bytcr_jack_pins, + ARRAY_SIZE(bytcr_jack_pins)); if (ret) { dev_err(runtime->dev, "jack creation failed %d\n", ret); return ret; } + snd_jack_set_key(priv->jack.jack, SND_JACK_BTN_0, + KEY_PLAYPAUSE); + ret = snd_soc_component_set_jack(codec, &priv->jack, NULL); if (ret) return ret; |