Skip to content

Commit

Permalink
ALSA: hda - Skip ELD notification during PM process
Browse files Browse the repository at this point in the history
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
process.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Dec 3, 2015
1 parent a72f659 commit eb399d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/pci/hda/patch_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2357,6 +2357,9 @@ static void intel_pin_eld_notify(void *audio_ptr, int port)
*/
if (snd_power_get_state(codec->card) != SNDRV_CTL_POWER_D0)
return;
/* ditto during suspend/resume process itself */
if (atomic_read(&(codec)->core.in_pm))
return;

check_presence_and_report(codec, pin_nid);
}
Expand Down

0 comments on commit eb399d3

Please sign in to comment.