* [v3] ASoC: AMD: Support headset button on Stoney DA7219
@ 2018-04-12 9:57 Akshu Agrawal
2018-04-12 16:52 ` Daniel Kurtz
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Akshu Agrawal @ 2018-04-12 9:57 UTC (permalink / raw)
To: broonie, alsa-devel
Cc: tiwai, Alexander.Deucher, lgirdwood, djkurtz, akshu.agrawal
Adds headset button support.
TEST=Tested Volume UP/Down, Play/Pause functionality
Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
---
v2: Changed KEY_MEDIA to KEY_PLAYPAUSE
v3: Using cz_jack.jack instead of jack->jack
sound/soc/amd/acp-da7219-max98357a.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c
index b205c78..d281c22 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;
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [v3] ASoC: AMD: Support headset button on Stoney DA7219
2018-04-12 9:57 [v3] ASoC: AMD: Support headset button on Stoney DA7219 Akshu Agrawal
@ 2018-04-12 16:52 ` Daniel Kurtz
2018-04-16 11:39 ` Applied "ASoC: AMD: Support headset button on Stoney DA7219" to the asoc tree Mark Brown
2018-04-16 12:00 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Daniel Kurtz @ 2018-04-12 16:52 UTC (permalink / raw)
To: Akshu Agrawal
Cc: tiwai, Alexander.Deucher, alsa-devel, Mark Brown, Liam Girdwood
On Thu, Apr 12, 2018 at 3:58 AM Akshu Agrawal <akshu.agrawal@amd.com> wrote:
> 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>
> ---
> v2: Changed KEY_MEDIA to KEY_PLAYPAUSE
> v3: Using cz_jack.jack instead of jack->jack
> sound/soc/amd/acp-da7219-max98357a.c | 6 ++++++
> 1 file changed, 6 insertions(+)
> diff --git a/sound/soc/amd/acp-da7219-max98357a.c
b/sound/soc/amd/acp-da7219-max98357a.c
> index b205c78..d281c22 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;
> --
> 1.9.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Applied "ASoC: AMD: Support headset button on Stoney DA7219" to the asoc tree
2018-04-12 9:57 [v3] ASoC: AMD: Support headset button on Stoney DA7219 Akshu Agrawal
2018-04-12 16:52 ` Daniel Kurtz
@ 2018-04-16 11:39 ` Mark Brown
2018-04-16 12:00 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2018-04-16 11:39 UTC (permalink / raw)
To: Agrawal, Akshu
Cc: alsa-devel, tiwai, lgirdwood, djkurtz, akshu.agrawal, broonie,
Alexander.Deucher
The patch
ASoC: AMD: Support headset button on Stoney DA7219
has been applied to the asoc tree at
https://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 923859e3f6b281cc280214854a44dfd04cb7f65d Mon Sep 17 00:00:00 2001
From: "Agrawal, Akshu" <Akshu.Agrawal@amd.com>
Date: Thu, 12 Apr 2018 17:57:11 +0800
Subject: [PATCH] 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>
---
sound/soc/amd/acp-da7219-max98357a.c | 6 ++++++
1 file changed, 6 insertions(+)
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;
--
2.17.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Applied "ASoC: AMD: Support headset button on Stoney DA7219" to the asoc tree
2018-04-12 9:57 [v3] ASoC: AMD: Support headset button on Stoney DA7219 Akshu Agrawal
2018-04-12 16:52 ` Daniel Kurtz
2018-04-16 11:39 ` Applied "ASoC: AMD: Support headset button on Stoney DA7219" to the asoc tree Mark Brown
@ 2018-04-16 12:00 ` Mark Brown
2 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2018-04-16 12:00 UTC (permalink / raw)
To: Agrawal, Akshu
Cc: alsa-devel, tiwai, lgirdwood, djkurtz, akshu.agrawal, broonie,
Alexander.Deucher
The patch
ASoC: AMD: Support headset button on Stoney DA7219
has been applied to the asoc tree at
https://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 923859e3f6b281cc280214854a44dfd04cb7f65d Mon Sep 17 00:00:00 2001
From: "Agrawal, Akshu" <Akshu.Agrawal@amd.com>
Date: Thu, 12 Apr 2018 17:57:11 +0800
Subject: [PATCH] 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>
---
sound/soc/amd/acp-da7219-max98357a.c | 6 ++++++
1 file changed, 6 insertions(+)
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;
--
2.17.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-04-16 12:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-12 9:57 [v3] ASoC: AMD: Support headset button on Stoney DA7219 Akshu Agrawal
2018-04-12 16:52 ` Daniel Kurtz
2018-04-16 11:39 ` Applied "ASoC: AMD: Support headset button on Stoney DA7219" to the asoc tree Mark Brown
2018-04-16 12:00 ` Mark Brown
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).