Skip to content

Commit

Permalink
ALSA: hda: fix a mask for unsolicited event tags
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
lyakh authored and tiwai committed Jun 11, 2019
1 parent 4dbf4f4 commit c7e68a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/hda/hda_jack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c7e68a6

Please sign in to comment.