Skip to content

Commit 5ff9dde

Browse files
committed
ALSA: hda: Avoid spurious unsol event handling during S3/S4
When HD-audio bus receives unsolicited events during its system suspend/resume (S3 and S4) phase, the controller driver may still try to process events although the codec chips are already (or yet) powered down. This might screw up the codec communication, resulting in CORB/RIRB errors. Such events should be rather skipped, as the codec chip status such as the jack status will be fully refreshed at the system resume time. Since we're tracking the system suspend/resume state in codec power.power_state field, let's add the check in the common unsol event handler entry point to filter out such events. BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1182377 Tested-by: Abhishek Sahu <[email protected]> Cc: <[email protected]> # 183ab39: ALSA: hda: Initialize power_state Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 13661fc commit 5ff9dde

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sound/pci/hda/hda_bind.c

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ static void hda_codec_unsol_event(struct hdac_device *dev, unsigned int ev)
4747
if (codec->bus->shutdown)
4848
return;
4949

50+
/* ignore unsol events during system suspend/resume */
51+
if (codec->core.dev.power.power_state.event != PM_EVENT_ON)
52+
return;
53+
5054
if (codec->patch_ops.unsol_event)
5155
codec->patch_ops.unsol_event(codec, ev);
5256
}

0 commit comments

Comments
 (0)