All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ALSA: HDA: fix a mask
@ 2019-06-11 17:09 Guennadi Liakhovetski
  2019-06-11 17:21 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Guennadi Liakhovetski @ 2019-06-11 17:09 UTC (permalink / raw)
  To: alsa-devel

Response tag only occupies 6 bits, not 7. This bug is harmless, since
the value has just been shifted to the right by 26 bits, so this is
only a cosmetic fix.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
---
 sound/pci/hda/hda_jack.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c
index 74b4695..60a5485 100644
--- a/sound/pci/hda/hda_jack.c
+++ b/sound/pci/hda/hda_jack.c
@@ -563,7 +563,7 @@ static void call_jack_callback(struct hda_codec *codec, unsigned int res,
 void snd_hda_jack_unsol_event(struct hda_codec *codec, unsigned int res)
 {
 	struct hda_jack_tbl *event;
-	int tag = (res >> AC_UNSOL_RES_TAG_SHIFT) & 0x7f;
+	int tag = (res & AC_UNSOL_RES_TAG) >> AC_UNSOL_RES_TAG_SHIFT;
 
 	event = snd_hda_jack_tbl_get_from_tag(codec, tag);
 	if (!event)
-- 
1.9.3

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

* Re: [PATCH] ALSA: HDA: fix a mask
  2019-06-11 17:09 [PATCH] ALSA: HDA: fix a mask Guennadi Liakhovetski
@ 2019-06-11 17:21 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2019-06-11 17:21 UTC (permalink / raw)
  To: Guennadi Liakhovetski; +Cc: alsa-devel

On Tue, 11 Jun 2019 19:09:07 +0200,
Guennadi Liakhovetski wrote:
> 
> Response tag only occupies 6 bits, not 7. This bug is harmless, since
> the value has just been shifted to the right by 26 bits, so this is
> only a cosmetic fix.
> 
> Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>

Applied, thanks.


Takashi

> ---
>  sound/pci/hda/hda_jack.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c
> index 74b4695..60a5485 100644
> --- a/sound/pci/hda/hda_jack.c
> +++ b/sound/pci/hda/hda_jack.c
> @@ -563,7 +563,7 @@ static void call_jack_callback(struct hda_codec *codec, unsigned int res,
>  void snd_hda_jack_unsol_event(struct hda_codec *codec, unsigned int res)
>  {
>  	struct hda_jack_tbl *event;
> -	int tag = (res >> AC_UNSOL_RES_TAG_SHIFT) & 0x7f;
> +	int tag = (res & AC_UNSOL_RES_TAG) >> AC_UNSOL_RES_TAG_SHIFT;
>  
>  	event = snd_hda_jack_tbl_get_from_tag(codec, tag);
>  	if (!event)
> -- 
> 1.9.3
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

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

end of thread, other threads:[~2019-06-11 17:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-11 17:09 [PATCH] ALSA: HDA: fix a mask Guennadi Liakhovetski
2019-06-11 17:21 ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.