linux/sound/pci
Dylan Reid d17344b354 ALSA: hda - Fix hang caused by race during suspend.
There was a race condition when the system suspends while hda_power_work
is running in the work queue.  If system suspend (snd_hda_suspend)
happens after the work queue releases power_lock but before it calls
hda_call_codec_suspend,  codec_suspend runs with power_on=0, causing the
codec to power up for register reads, and hanging when it calls
cancel_delayed_work_sync from the running work queue.

The call chain from the work queue will look like this:
hda_power_work <<- power_on = 1, unlock, then power_on cleard by suspend
  hda_call_codec_suspend
    hda_set_power_state
      snd_hda_codec_read
        codec_exec_verb
          snd_hda_power_up
	    snd_hda_power_save
	      __snd_hda_power_up
	        cancel_delayed_work_sync <<-- cancelling executing wq

Fix this by waiting for the work queue to finish before starting suspend
if suspend is not happening on the work queue.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-10-06 16:49:30 +02:00
..
ac97 ALSA: ac97: Implement channel map workaround for ALC650 2012-09-06 18:08:30 +02:00
ali5451 ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP 2012-08-14 18:12:04 +02:00
asihpi sound: Remove unnecessary semicolon 2012-10-06 16:47:53 +02:00
au88x0 sound: Remove unnecessary semicolon 2012-10-06 16:47:53 +02:00
aw2 ALSA: pci: clean up using module_pci_driver() 2012-04-24 12:25:00 +02:00
ca0106 ALSA: ca0106: Define channel maps 2012-09-12 15:52:09 +02:00
cs46xx Merge branch 'for-linus' into for-next 2012-08-20 22:14:26 +02:00
cs5535audio ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP 2012-08-14 18:12:04 +02:00
ctxfi ALSA: Define more channel map positions 2012-09-12 18:13:03 +02:00
echoaudio ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP 2012-08-14 18:12:04 +02:00
emu10k1 sound: Remove unnecessary semicolon 2012-10-06 16:47:53 +02:00
hda ALSA: hda - Fix hang caused by race during suspend. 2012-10-06 16:49:30 +02:00
ice1712 ASoC: Updates for v3.7 2012-09-22 18:31:08 +02:00
korg1212 ALSA: korg1212: Fix reverted min/max ADC sense range 2012-08-30 07:57:38 -07:00
lola ALSA: pci: clean up using module_pci_driver() 2012-04-24 12:25:00 +02:00
lx6464es ALSA: lx6464es: Add a missing error check 2012-08-14 17:42:11 +02:00
mixart sound: Remove unnecessary semicolon 2012-10-06 16:47:53 +02:00
nm256 ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP 2012-08-14 18:12:04 +02:00
oxygen ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP 2012-08-14 18:12:04 +02:00
pcxhr ALSA: pcxhr: Add 8 new sound cards 2012-08-27 16:10:29 +02:00
riptide ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP 2012-08-14 18:12:04 +02:00
rme9652 ALSA: sound/pci/rme9652/hdspm.c: fix error return code 2012-08-20 11:00:51 +02:00
trident ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP 2012-08-14 18:12:04 +02:00
vx222 ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP 2012-08-14 18:12:04 +02:00
ymfpci ALSA: Fix leftover chmap UNKNOWN -> MONO conversions 2012-09-13 14:48:46 +02:00
ad1889.c ALSA: pci: clean up using module_pci_driver() 2012-04-24 12:25:00 +02:00
ad1889.h
ak4531_codec.c
als300.c ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP 2012-08-14 18:12:04 +02:00
als4000.c ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP 2012-08-14 18:12:04 +02:00
atiixp_modem.c ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP 2012-08-14 18:12:04 +02:00
atiixp.c ALSA: Implement channel maps for standard onboard AC97 drivers 2012-09-06 18:08:31 +02:00
azt3328.c ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP 2012-08-14 18:12:04 +02:00
azt3328.h
bt87x.c ALSA: pci: clean up using module_pci_driver() 2012-04-24 12:25:00 +02:00
cmipci.c ALSA: cmipci: Implement channel mapping 2012-09-06 18:08:32 +02:00
cs4281.c ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP 2012-08-14 18:12:04 +02:00
cs5530.c ALSA: cs5530: Fix resource leak in error path 2012-08-30 13:21:00 -07:00
ens1370.c ALSA: Fix leftover chmap UNKNOWN -> MONO conversions 2012-09-13 14:48:46 +02:00
ens1371.c
es1938.c ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP 2012-08-14 18:12:04 +02:00
es1968.c ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP 2012-08-14 18:12:04 +02:00
fm801.c ALSA: Implement channel maps for standard onboard AC97 drivers 2012-09-06 18:08:31 +02:00
intel8x0.c sound: Remove unnecessary semicolon 2012-10-06 16:47:53 +02:00
intel8x0m.c ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP 2012-08-14 18:12:04 +02:00
Kconfig Merge branch 'topic/misc' into for-linus 2012-05-21 12:51:35 +02:00
maestro3.c ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP 2012-08-14 18:12:04 +02:00
Makefile
rme32.c ALSA: pci: clean up using module_pci_driver() 2012-04-24 12:25:00 +02:00
rme96.c ALSA: pci: clean up using module_pci_driver() 2012-04-24 12:25:00 +02:00
sis7019.c Merge branch 'for-linus' into for-next 2012-08-20 22:14:26 +02:00
sis7019.h
sonicvibes.c ALSA: pci: clean up using module_pci_driver() 2012-04-24 12:25:00 +02:00
via82xx_modem.c ALSA: PCI: Replace CONFIG_PM with CONFIG_PM_SLEEP 2012-08-14 18:12:04 +02:00
via82xx.c ALSA: Implement channel maps for standard onboard AC97 drivers 2012-09-06 18:08:31 +02:00