linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] ASoC: Intel: kbl_da7219_max98927: fix the audio jack button remapping
@ 2018-12-07  9:05 Zhuohao Lee
  2018-12-07 17:57 ` Pierre-Louis Bossart
  0 siblings, 1 reply; 3+ messages in thread
From: Zhuohao Lee @ 2018-12-07  9:05 UTC (permalink / raw)
  To: alsa-devel
  Cc: Pierre-Louis Bossart, Liam Girdwood, Jie Yang, Mark Brown,
	Jaroslav Kysela, Takashi Iwai, Vinod Koul, Kuninori Morimoto,
	Dan Carpenter, Max Chang, Oder Chiou, Zhuohao Lee, linux-kernel

From the da7219 spec, the button A, B, C and D are remapped to
0, 1, 2 and 3 respectively where button A is KEY_PLAYPAUSE,
B is KEY_VOLUMEUP, C is KEY_VOLUMEDOWN and D is KEY_VOICECOMMAND

Change-Id: I67f929f226883bd289cb7beb0a7b23f40e7121e2
Signed-off-by: Zhuohao Lee <zhuohao@chromium.org>
Signed-off-by: Max Chang  <changmax@chromium.org>
---
 sound/soc/intel/boards/kbl_da7219_max98927.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/intel/boards/kbl_da7219_max98927.c b/sound/soc/intel/boards/kbl_da7219_max98927.c
index 3fa1c3ca6d37..d3531f0eb357 100644
--- a/sound/soc/intel/boards/kbl_da7219_max98927.c
+++ b/sound/soc/intel/boards/kbl_da7219_max98927.c
@@ -262,9 +262,9 @@ static int kabylake_da7219_codec_init(struct snd_soc_pcm_runtime *rtd)
 
 	jack = &ctx->kabylake_headset;
 	snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
-	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);
+	snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP);
+	snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
+	snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
 
 	da7219_aad_jack_det(component, &ctx->kabylake_headset);
 
-- 
2.20.0.rc2.403.gdbc3b29805-goog


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

* Re: [PATCH v1] ASoC: Intel: kbl_da7219_max98927: fix the audio jack button remapping
  2018-12-07  9:05 [PATCH v1] ASoC: Intel: kbl_da7219_max98927: fix the audio jack button remapping Zhuohao Lee
@ 2018-12-07 17:57 ` Pierre-Louis Bossart
       [not found]   ` <CABD5ybm1E4=XQRt0zhviLzgXvUmo+C06AHr4wnXHF2QYbF=d8Q@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Pierre-Louis Bossart @ 2018-12-07 17:57 UTC (permalink / raw)
  To: Zhuohao Lee, alsa-devel
  Cc: Liam Girdwood, Jie Yang, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Vinod Koul, Kuninori Morimoto, Dan Carpenter,
	Max Chang, Oder Chiou, linux-kernel, Zhi, Yong


On 12/7/18 3:05 AM, Zhuohao Lee wrote:
>  From the da7219 spec, the button A, B, C and D are remapped to
> 0, 1, 2 and 3 respectively where button A is KEY_PLAYPAUSE,
> B is KEY_VOLUMEUP, C is KEY_VOLUMEDOWN and D is KEY_VOICECOMMAND

Ok, but could fix all da7219-based machine drivers then, the mappings 
are completely inconsistent:

kbl_da7219_max98357a.c:    snd_jack_set_key(jack->jack, SND_JACK_BTN_0, 
KEY_MEDIA);
kbl_da7219_max98357a.c:    snd_jack_set_key(jack->jack, SND_JACK_BTN_1, 
KEY_VOLUMEUP);
kbl_da7219_max98357a.c:    snd_jack_set_key(jack->jack, SND_JACK_BTN_2, 
KEY_VOLUMEDOWN);
kbl_da7219_max98357a.c:    snd_jack_set_key(jack->jack, SND_JACK_BTN_3, 
KEY_VOICECOMMAND);
kbl_da7219_max98927.c:    snd_jack_set_key(jack->jack, SND_JACK_BTN_0, 
KEY_PLAYPAUSE);
kbl_da7219_max98927.c:    snd_jack_set_key(jack->jack, SND_JACK_BTN_1, 
KEY_VOICECOMMAND);
kbl_da7219_max98927.c:    snd_jack_set_key(jack->jack, SND_JACK_BTN_2, 
KEY_VOLUMEUP);
kbl_da7219_max98927.c:    snd_jack_set_key(jack->jack, SND_JACK_BTN_3, 
KEY_VOLUMEDOWN);

Thanks!

>
> Change-Id: I67f929f226883bd289cb7beb0a7b23f40e7121e2
You want to remove those Change-Ids for upstream.
> Signed-off-by: Zhuohao Lee <zhuohao@chromium.org>
> Signed-off-by: Max Chang  <changmax@chromium.org>
> ---
>   sound/soc/intel/boards/kbl_da7219_max98927.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/sound/soc/intel/boards/kbl_da7219_max98927.c b/sound/soc/intel/boards/kbl_da7219_max98927.c
> index 3fa1c3ca6d37..d3531f0eb357 100644
> --- a/sound/soc/intel/boards/kbl_da7219_max98927.c
> +++ b/sound/soc/intel/boards/kbl_da7219_max98927.c
> @@ -262,9 +262,9 @@ static int kabylake_da7219_codec_init(struct snd_soc_pcm_runtime *rtd)
>   
>   	jack = &ctx->kabylake_headset;
>   	snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
> -	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);
> +	snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP);
> +	snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
> +	snd_jack_set_key(jack->jack, SND_JACK_BTN_3, KEY_VOICECOMMAND);
>   
>   	da7219_aad_jack_det(component, &ctx->kabylake_headset);
>   

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

* Re: [alsa-devel] [PATCH v1] ASoC: Intel: kbl_da7219_max98927: fix the audio jack button remapping
       [not found]     ` <c11cb754-b01f-3e53-f07f-7fd186b45bdf@linux.intel.com>
@ 2018-12-10 16:38       ` Naveen M
  0 siblings, 0 replies; 3+ messages in thread
From: Naveen M @ 2018-12-10 16:38 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: Zhuohao Lee, alsa-devel, Liam Girdwood, Jie Yang, Mark Brown,
	Jaroslav Kysela, Takashi Iwai, Vinod Koul, Kuninori Morimoto,
	Dan Carpenter, Max Chang, Oder Chiou, linux-kernel, yong.zhi

On Mon, Dec 10, 2018 at 08:41:23AM -0600, Pierre-Louis Bossart wrote:
> 
> On 12/9/18 10:29 PM, Zhuohao Lee wrote:
> > Thanks Pierre-Louis.
> > I saw a patch https://patchwork.kernel.org/patch/10493135/ which changed
> > the KEY_MEDIA to KEY_PLAYPAUSE, will you merge that patch?
> > Combined with this patch, the key remapping should be consistent.
> 
> I don't have merge superpowers here, and I don't want to submit something I
> cannot test.
> 
> I was only flagging that the behavior is not aligned across patches, and
> some of these patches were never merged (some since April). Yong Zhi and
> Naveen M, can you help resubmit a patchset that aligns the handling of
> buttons for DA7219-based devices?
> 
> Thanks!
> 
> 
Sure Pierre, we will soon post the change for all DA7219 based boards.
Thanks
> > 
> > I'll submit a patch to remove the Change-Id.
> > 
> > On Sat, Dec 8, 2018 at 1:57 AM Pierre-Louis Bossart
> > <pierre-louis.bossart@linux.intel.com
> > <mailto:pierre-louis.bossart@linux.intel.com>> wrote:
> > 
> > 
> >     On 12/7/18 3:05 AM, Zhuohao Lee wrote:
> >     >  From the da7219 spec, the button A, B, C and D are remapped to
> >     > 0, 1, 2 and 3 respectively where button A is KEY_PLAYPAUSE,
> >     > B is KEY_VOLUMEUP, C is KEY_VOLUMEDOWN and D is KEY_VOICECOMMAND
> > 
> >     Ok, but could fix all da7219-based machine drivers then, the mappings
> >     are completely inconsistent:
> > 
> >     kbl_da7219_max98357a.c:    snd_jack_set_key(jack->jack,
> >     SND_JACK_BTN_0,
> >     KEY_MEDIA);
> >     kbl_da7219_max98357a.c:    snd_jack_set_key(jack->jack,
> >     SND_JACK_BTN_1,
> >     KEY_VOLUMEUP);
> >     kbl_da7219_max98357a.c:    snd_jack_set_key(jack->jack,
> >     SND_JACK_BTN_2,
> >     KEY_VOLUMEDOWN);
> >     kbl_da7219_max98357a.c:    snd_jack_set_key(jack->jack,
> >     SND_JACK_BTN_3,
> >     KEY_VOICECOMMAND);
> >     kbl_da7219_max98927.c:    snd_jack_set_key(jack->jack,
> >     SND_JACK_BTN_0,
> >     KEY_PLAYPAUSE);
> >     kbl_da7219_max98927.c:    snd_jack_set_key(jack->jack,
> >     SND_JACK_BTN_1,
> >     KEY_VOICECOMMAND);
> >     kbl_da7219_max98927.c:    snd_jack_set_key(jack->jack,
> >     SND_JACK_BTN_2,
> >     KEY_VOLUMEUP);
> >     kbl_da7219_max98927.c:    snd_jack_set_key(jack->jack,
> >     SND_JACK_BTN_3,
> >     KEY_VOLUMEDOWN);
> > 
> >     Thanks!
> > 
> >     >
> >     > Change-Id: I67f929f226883bd289cb7beb0a7b23f40e7121e2
> >     You want to remove those Change-Ids for upstream.
> >     > Signed-off-by: Zhuohao Lee <zhuohao@chromium.org
> >     <mailto:zhuohao@chromium.org>>
> >     > Signed-off-by: Max Chang  <changmax@chromium.org
> >     <mailto:changmax@chromium.org>>
> >     > ---
> >     >   sound/soc/intel/boards/kbl_da7219_max98927.c | 6 +++---
> >     >   1 file changed, 3 insertions(+), 3 deletions(-)
> >     >
> >     > diff --git a/sound/soc/intel/boards/kbl_da7219_max98927.c
> >     b/sound/soc/intel/boards/kbl_da7219_max98927.c
> >     > index 3fa1c3ca6d37..d3531f0eb357 100644
> >     > --- a/sound/soc/intel/boards/kbl_da7219_max98927.c
> >     > +++ b/sound/soc/intel/boards/kbl_da7219_max98927.c
> >     > @@ -262,9 +262,9 @@ static int kabylake_da7219_codec_init(struct
> >     snd_soc_pcm_runtime *rtd)
> >     >
> >     >       jack = &ctx->kabylake_headset;
> >     >       snd_jack_set_key(jack->jack, SND_JACK_BTN_0, KEY_PLAYPAUSE);
> >     > -     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);
> >     > +     snd_jack_set_key(jack->jack, SND_JACK_BTN_1, KEY_VOLUMEUP);
> >     > +     snd_jack_set_key(jack->jack, SND_JACK_BTN_2, KEY_VOLUMEDOWN);
> >     > +     snd_jack_set_key(jack->jack, SND_JACK_BTN_3,
> >     KEY_VOICECOMMAND);
> >     >
> >     >       da7219_aad_jack_det(component, &ctx->kabylake_headset);
> >     >
> > 

-- 

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

end of thread, other threads:[~2018-12-10 16:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-07  9:05 [PATCH v1] ASoC: Intel: kbl_da7219_max98927: fix the audio jack button remapping Zhuohao Lee
2018-12-07 17:57 ` Pierre-Louis Bossart
     [not found]   ` <CABD5ybm1E4=XQRt0zhviLzgXvUmo+C06AHr4wnXHF2QYbF=d8Q@mail.gmail.com>
     [not found]     ` <c11cb754-b01f-3e53-f07f-7fd186b45bdf@linux.intel.com>
2018-12-10 16:38       ` [alsa-devel] " Naveen M

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).