alistair23-linux/sound/pci
Takashi Iwai 8ae743e82f ALSA: hda - Skip ELD notification during system suspend
The recent addition of ELD notifier for Intel HDMI/DP codec may lead
the bad codec connection found as kernel messages like below:
 Suspending console(s) (use no_console_suspend to debug)
 hdmi_present_sense: snd_hda_codec_hdmi hdaudioC0D2: HDMI status: Codec=2 Pin=6 Presence_Detect=1 ELD_Valid=1
 snd_hda_intel 0000:00:1f.3: spurious response 0x0:0x2, last cmd=0x206f2e08
 snd_hda_intel 0000:00:1f.3: spurious response 0x0:0x2, last cmd=0x206f2e08
 ....
  snd_hda_codec_hdmi hdaudioC0D2: HDMI: ELD buf size is 0, force 128
  snd_hda_intel 0000:00:1f.3: azx_get_response timeout, switching to polling mode: last cmd=0x206f2f00
 snd_hda_intel 0000:00:1f.3: No response from codec, disabling MSI: last cmd=0x206f2f00
 snd_hda_intel 0000:00:1f.3: azx_get_response timeout, switching to single_cmd mode: last cmd=0x206f2f00
 azx_single_wait_for_response: 42 callbacks suppressed

This seems appearing when the sound driver went to suspend before i915
driver.  Then i915 driver disables HDMI/DP audio bit and calls the
registered notifier, and the HDA codec tries to handle it as a
hot(un)plug.  But since the driver is already in the suspended state,
it fails miserably.

As this is a sort of spurious wakeup, it can be ignored safely, as
long as it's delivered during the system suspend.  OTOH, if a
notification comes during the runtime suspend, the situation is
different: we need to wake up.  But during the system suspend, such a
notification can't be the reason for a wakeup.

This patch addresses it by a simple check of the current sound card
status.  The skipped notification doesn't matter because the HDA
driver will check the plugged status forcibly at the resume in
return.

Then, why the card status, not a runtime PM status or else?  The HDA
controller driver is supposed to set the card status to D3 at the
system suspend but not at the runtime suspend.  So we can see it as a
flag that is set only for the system suspend.  Admittedly, it's a bit
ugly, but it should work well for now.

Reported-and-tested-by: "Zhang, Xiong Y" <xiong.y.zhang@intel.com>
Fixes: 25adc137c5 ('ALSA: hda - Wake the codec up on pin/ELD notify events')
Cc: <stable@vger.kernel.org> # v4.3+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2015-11-27 14:23:00 +01:00
..
ac97 ALSA: ac97: Fix ifdef CONFIG_PROC_FS 2015-05-29 07:52:43 +02:00
ali5451 ALSA: remove deprecated use of pci api 2015-04-16 12:19:52 +02:00
asihpi x86/mm: Decouple <linux/vmalloc.h> from <asm/io.h> 2015-06-03 12:02:00 +02:00
au88x0 ALSA: remove deprecated use of pci api 2015-04-16 12:19:52 +02:00
aw2 ALSA: remove deprecated use of pci api 2015-04-16 12:19:52 +02:00
ca0106 ALSA: ca0106: Fix/cleanup ifdef CONFIG_PROC_FS 2015-05-29 07:54:45 +02:00
cs46xx ALSA: cs46xx: Fix suspend for all channels 2015-10-30 12:33:21 +01:00
cs5535audio ALSA: remove deprecated use of pci api 2015-04-16 12:19:52 +02:00
ctxfi ALSA: ctxfi: constify rsc ops structures 2015-11-11 08:40:56 +01:00
echoaudio ALSA: echoaudio: Use standard C definitions of true and false 2015-08-10 14:27:16 +02:00
emu10k1 ALSA: emu10k1: rename Audigy Analog Capture Boost control 2015-07-08 09:40:44 +02:00
hda ALSA: hda - Skip ELD notification during system suspend 2015-11-27 14:23:00 +01:00
ice1712 ALSA: pci: Drop superfluous ifdef CONFIG_PROC_FS 2015-05-29 08:00:06 +02:00
korg1212 ALSA: korg1212: Use snd_pcm_hw_constraint_single() 2015-10-21 14:24:27 +02:00
lola ALSA: Deletion of checks before the function call "iounmap" 2015-01-04 15:13:45 +01:00
lx6464es ALSA: lx6464es: Use snd_pcm_hw_constraint_single() 2015-10-21 14:24:28 +02:00
mixart ALSA: remove deprecated use of pci api 2015-04-16 12:19:52 +02:00
nm256 ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
oxygen ALSA: oxygen: Fix logical-not-parentheses warning 2015-08-03 10:15:09 +02:00
pcxhr ALSA: remove deprecated use of pci api 2015-04-16 12:19:52 +02:00
riptide ALSA: off by one bug in snd_riptide_joystick_probe() 2015-02-09 14:57:15 +01:00
rme9652 Merge branch 'topic/hw-constraint-single' into for-next 2015-10-23 06:57:50 +02:00
trident ALSA: remove deprecated use of pci api 2015-04-16 12:19:52 +02:00
vx222 ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
ymfpci ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
ad1889.c ALSA: remove deprecated use of pci api 2015-04-16 12:19:52 +02:00
ad1889.h
ak4531_codec.c ALSA: pci: Drop superfluous ifdef CONFIG_PROC_FS 2015-05-29 08:00:06 +02:00
als300.c ALSA: remove deprecated use of pci api 2015-04-16 12:19:52 +02:00
als4000.c ALSA: remove deprecated use of pci api 2015-04-16 12:19:52 +02:00
atiixp.c ALSA: pci: Drop superfluous ifdef CONFIG_PROC_FS 2015-05-29 08:00:06 +02:00
atiixp_modem.c ALSA: pci: Drop superfluous ifdef CONFIG_PROC_FS 2015-05-29 08:00:06 +02:00
azt3328.c ALSA: remove deprecated use of pci api 2015-04-16 12:19:52 +02:00
azt3328.h
bt87x.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
cmipci.c ALSA: pci: Drop superfluous ifdef CONFIG_PROC_FS 2015-05-29 08:00:06 +02:00
cs4281.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
cs5530.c ASoC: sb16: Simplify snd_sb16dsp_pcm() 2015-01-02 16:28:35 +01:00
ens1370.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00
ens1371.c
es1938.c ALSA: remove deprecated use of pci api 2015-04-16 12:19:52 +02:00
es1968.c ALSA: remove deprecated use of pci api 2015-04-16 12:19:52 +02:00
fm801.c ALSA: fm801: remove FSF address 2015-01-11 11:27:13 +01:00
intel8x0.c ALSA: pci: Drop superfluous ifdef CONFIG_PROC_FS 2015-05-29 08:00:06 +02:00
intel8x0m.c ALSA: pci: Drop superfluous ifdef CONFIG_PROC_FS 2015-05-29 08:00:06 +02:00
Kconfig ALSA: pci: depend on ZONE_DMA 2015-11-12 21:37:05 +01:00
maestro3.c ALSA: maestro3: Fix Allegro mute until master volume/mute is touched 2015-11-02 08:46:30 +01:00
Makefile
rme32.c ALSA: rme32: Use snd_pcm_hw_constraint_single() 2015-10-21 14:24:28 +02:00
rme96.c ALSA: rme96: Use snd_pcm_hw_constraint_single() 2015-10-21 14:24:29 +02:00
sis7019.c ALSA: remove deprecated use of pci api 2015-04-16 12:19:52 +02:00
sis7019.h
sonicvibes.c ALSA: remove deprecated use of pci api 2015-04-16 12:19:52 +02:00
via82xx.c ALSA: Use const struct ac97_quirk 2015-04-05 08:41:05 +02:00
via82xx_modem.c ALSA: Include linux/io.h instead of asm/io.h 2015-01-28 16:49:33 +01:00