alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: Headset button support in kabylake machine driver
@ 2017-08-21 19:26 Harsha Priya
  2017-08-22  5:15 ` Vinod Koul
  2017-08-22 12:28 ` Applied "ASoC: Intel: Headset button support in kabylake machine driver" to the asoc tree Mark Brown
  0 siblings, 2 replies; 5+ messages in thread
From: Harsha Priya @ 2017-08-21 19:26 UTC (permalink / raw)
  To: tiwai, vinod.koul, broonie, alsa-devel; +Cc: Harsha Priya, Hsin-yu Chao

This patch adds headset button support for kabylake machine driver
(kbl_rt5663_rt5514_max98927).

Signed-off-by: Hsin-yu Chao <hychao@google.com>
Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
---
 sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
index 441a397..b350aa7 100644
--- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
@@ -18,6 +18,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>
@@ -174,6 +175,7 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
 	int ret;
 	struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card);
 	struct snd_soc_codec *codec = rtd->codec;
+	struct snd_soc_jack *jack;
 
 	/*
 	 * Headset buttons map to the google Reference headset.
@@ -188,6 +190,12 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
 		return ret;
 	}
 
+	jack = &ctx->kabylake_headset;
+	snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_MEDIA);
+	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);
+
 	rt5663_set_jack_detect(codec, &ctx->kabylake_headset);
 
 	ret = snd_soc_dapm_ignore_suspend(&rtd->card->dapm, "DMIC");
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: Intel: Headset button support in kabylake machine driver
  2017-08-21 19:26 [PATCH] ASoC: Intel: Headset button support in kabylake machine driver Harsha Priya
@ 2017-08-22  5:15 ` Vinod Koul
  2017-08-22 12:28 ` Applied "ASoC: Intel: Headset button support in kabylake machine driver" to the asoc tree Mark Brown
  1 sibling, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2017-08-22  5:15 UTC (permalink / raw)
  To: Harsha Priya; +Cc: tiwai, alsa-devel, broonie, Hsin-yu Chao

On Mon, Aug 21, 2017 at 12:26:52PM -0700, Harsha Priya wrote:
> This patch adds headset button support for kabylake machine driver
> (kbl_rt5663_rt5514_max98927).

Acked-By: Vinod Koul <vinod.koul@intel.com>

-- 
~Vinod

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Applied "ASoC: Intel: Headset button support in kabylake machine driver" to the asoc tree
  2017-08-21 19:26 [PATCH] ASoC: Intel: Headset button support in kabylake machine driver Harsha Priya
  2017-08-22  5:15 ` Vinod Koul
@ 2017-08-22 12:28 ` Mark Brown
  1 sibling, 0 replies; 5+ messages in thread
From: Mark Brown @ 2017-08-22 12:28 UTC (permalink / raw)
  Cc: alsa-devel, Hsin-yu Chao, Harsha Priya, tiwai, broonie,
	vinod.koul

The patch

   ASoC: Intel: Headset button support in kabylake machine driver

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 80b649039240ec41a6ab0a5e347853bc78abfd2d Mon Sep 17 00:00:00 2001
From: Harsha Priya N <harshapriya.n@intel.com>
Date: Mon, 21 Aug 2017 12:26:52 -0700
Subject: [PATCH] ASoC: Intel: Headset button support in kabylake machine
 driver

This patch adds headset button support for kabylake machine driver
(kbl_rt5663_rt5514_max98927).

Signed-off-by: Hsin-yu Chao <hychao@google.com>
Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Acked-By: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
index b51dff6fe25b..69681b04d7fc 100644
--- a/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_rt5514_max98927.c
@@ -18,6 +18,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>
@@ -176,6 +177,7 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
 	int ret;
 	struct kbl_codec_private *ctx = snd_soc_card_get_drvdata(rtd->card);
 	struct snd_soc_codec *codec = rtd->codec;
+	struct snd_soc_jack *jack;
 
 	/*
 	 * Headset buttons map to the google Reference headset.
@@ -190,6 +192,12 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
 		return ret;
 	}
 
+	jack = &ctx->kabylake_headset;
+	snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_MEDIA);
+	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);
+
 	rt5663_set_jack_detect(codec, &ctx->kabylake_headset);
 
 	ret = snd_soc_dapm_ignore_suspend(&rtd->card->dapm, "DMIC");
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH] ASoC: Intel: Headset button support in kabylake machine driver
@ 2017-09-15  8:13 Naveen M
  2017-09-18  3:37 ` Vinod Koul
  0 siblings, 1 reply; 5+ messages in thread
From: Naveen M @ 2017-09-15  8:13 UTC (permalink / raw)
  To: alsa-devel
  Cc: vinod.koul, liam.r.girdwood, tiwai, broonie, naveen.m,
	pierre-louis.bossart

Patch adds headset button support for kabylake machine driver
(kbl_rt5663_max98927).

Signed-off-by: Naveen M <naveen.m@intel.com>

diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c
index 7f76074..e45b6fe 100644
--- a/sound/soc/intel/boards/kbl_rt5663_max98927.c
+++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c
@@ -17,6 +17,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>
@@ -208,6 +209,7 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
 	int ret;
 	struct kbl_rt5663_private *ctx = snd_soc_card_get_drvdata(rtd->card);
 	struct snd_soc_codec *codec = rtd->codec;
+	struct snd_soc_jack *jack;
 
 	/*
 	 * Headset buttons map to the google Reference headset.
@@ -221,6 +223,13 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
 		dev_err(rtd->dev, "Headset Jack creation failed %d\n", ret);
 		return ret;
 	}
+
+	jack = &ctx->kabylake_headset;
+	snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_MEDIA);
+	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);
+
 	rt5663_set_jack_detect(codec, &ctx->kabylake_headset);
 	return ret;
 }
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] ASoC: Intel: Headset button support in kabylake machine driver
  2017-09-15  8:13 [PATCH] ASoC: Intel: Headset button support in kabylake machine driver Naveen M
@ 2017-09-18  3:37 ` Vinod Koul
  0 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2017-09-18  3:37 UTC (permalink / raw)
  To: Naveen M
  Cc: tiwai, liam.r.girdwood, alsa-devel, broonie, pierre-louis.bossart

On Fri, Sep 15, 2017 at 01:43:21PM +0530, Naveen M wrote:
> Patch adds headset button support for kabylake machine driver
> (kbl_rt5663_max98927).

Acked-By: Vinod Koul <vinod.koul@intel.com>

> Signed-off-by: Naveen M <naveen.m@intel.com>
> 
> diff --git a/sound/soc/intel/boards/kbl_rt5663_max98927.c b/sound/soc/intel/boards/kbl_rt5663_max98927.c
> index 7f76074..e45b6fe 100644
> --- a/sound/soc/intel/boards/kbl_rt5663_max98927.c
> +++ b/sound/soc/intel/boards/kbl_rt5663_max98927.c
> @@ -17,6 +17,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>
> @@ -208,6 +209,7 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
>  	int ret;
>  	struct kbl_rt5663_private *ctx = snd_soc_card_get_drvdata(rtd->card);
>  	struct snd_soc_codec *codec = rtd->codec;
> +	struct snd_soc_jack *jack;
>  
>  	/*
>  	 * Headset buttons map to the google Reference headset.
> @@ -221,6 +223,13 @@ static int kabylake_rt5663_codec_init(struct snd_soc_pcm_runtime *rtd)
>  		dev_err(rtd->dev, "Headset Jack creation failed %d\n", ret);
>  		return ret;
>  	}
> +
> +	jack = &ctx->kabylake_headset;
> +	snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_MEDIA);
> +	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);
> +
>  	rt5663_set_jack_detect(codec, &ctx->kabylake_headset);
>  	return ret;
>  }
> -- 
> 1.9.1
> 

-- 
~Vinod

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-09-18  3:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-21 19:26 [PATCH] ASoC: Intel: Headset button support in kabylake machine driver Harsha Priya
2017-08-22  5:15 ` Vinod Koul
2017-08-22 12:28 ` Applied "ASoC: Intel: Headset button support in kabylake machine driver" to the asoc tree Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2017-09-15  8:13 [PATCH] ASoC: Intel: Headset button support in kabylake machine driver Naveen M
2017-09-18  3:37 ` Vinod Koul

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).