[7/7] ALSA: hda - Skip ELD notification during PM process

Submitted by Takashi Iwai on Nov. 30, 2015, 1:37 p.m.


Message ID 1448890671-2983-8-git-send-email-tiwai@suse.de
State Accepted
Commit eb399d3c99d8b411bfc46e67ea329ddc1ca64e87
Headers show
Series "Add get_eld audio component for i915/HD-audio" ( rev: 1 ) in Intel GFX

Browsing this patch as part of:
"Add get_eld audio component for i915/HD-audio" rev 1 in Intel GFX
<< prev patch [7/7] next patch >>

Commit Message

Takashi Iwai Nov. 30, 2015, 1:37 p.m.
The ELD notification can be received asynchronously from the graphics
side, and this may happen just at the moment the sound driver is
processing the suspend or the resume, and it would confuse the whole
procedure.  Since the ELD and connection states are updated in anyway
at the end of the resume, we can skip it when received during PM

Signed-off-by: Takashi Iwai <tiwai@suse.de>
 sound/pci/hda/patch_hdmi.c | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 23a4292c355f..0492f3cf744e 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -2433,6 +2433,9 @@  static void intel_pin_eld_notify(void *audio_ptr, int port)
 	if (snd_power_get_state(codec->card) != SNDRV_CTL_POWER_D0)
+	/* ditto during suspend/resume process itself */
+	if (atomic_read(&(codec)->core.in_pm))
+		return;
 	check_presence_and_report(codec, pin_nid);