Merge tag 'asoc-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
[linux-block.git] / sound / pci / hda / hda_jack.c
index 6d9acd5c4e4118888fe6f0c5c7940a93e7fe1e8b..1fb7b06457ae9168027a884c55a3b6c43cd3988a 100644 (file)
@@ -559,7 +559,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)