summaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_jack.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>2019-06-11 19:09:07 +0200
committerTakashi Iwai <tiwai@suse.de>2019-06-11 19:20:43 +0200
commitc7e68a697c7cd7fd25ee536d02a8dcf81a2e7d1c (patch)
tree00985fcd7d04e414ec4653f990f233357eb24218 /sound/pci/hda/hda_jack.c
parentALSA: dice: code refactoring for pcm.hw_params/hw_free callbacks (diff)
downloadlinux-c7e68a697c7cd7fd25ee536d02a8dcf81a2e7d1c.tar.xz
linux-c7e68a697c7cd7fd25ee536d02a8dcf81a2e7d1c.zip
ALSA: hda: fix a mask for unsolicited event tags
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> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_jack.c')
-rw-r--r--sound/pci/hda/hda_jack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c
index 74b46952fc98..60a548513c9d 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)