linux/sound/pci
Hui Wang b5a236c175 ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec
Recently we found the audio jack detection stop working after suspend
on many machines with Realtek codec. Sometimes the audio selection
dialogue didn't show up after users plugged headhphone/headset into
the headset jack, sometimes after uses plugged headphone/headset, then
click the sound icon on the upper-right corner of gnome-desktop, it
also showed the speaker rather than the headphone.

The root cause is that before suspend, the codec already call the
runtime_suspend since this codec is not used by any apps, then in
resume, it will not call runtime_resume for this codec. But for some
realtek codec (so far, alc236, alc255 and alc891) with the specific
BIOS, if it doesn't run runtime_resume after suspend, all codec
functions including jack detection stop working anymore.

This problem existed for a long time, but it was not exposed, that is
because when problem happens, if users play sound or open
sound-setting to check audio device, this will trigger calling to
runtime_resume (via snd_hda_power_up), then the codec starts working
again before users notice this problem.

Since we don't know how many codec and BIOS combinations have this
problem, to fix it, let the driver call runtime_resume for all codecs
in pm_resume, maybe for some codecs, this is not needed, but it is
harmless. After a codec is runtime resumed, if it is not used by any
apps, it will be runtime suspended soon and furthermore we don't run
suspend frequently, this change will not add much power consumption.

Fixes: cc72da7d4d ("ALSA: hda - Use standard runtime PM for codec power-save control")
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-03-19 06:54:24 +01:00
..
ac97 ALSA: pci: Remove superfluous snd_info_register() calls 2019-02-06 18:11:54 +01:00
ali5451 ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
asihpi ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
au88x0 ALSA: au88xx: Add fall-through annotations 2018-10-12 09:31:34 +02:00
aw2 ALSA: pci: Drop superfluous PCM preallocation error checks 2019-02-06 10:29:09 +01:00
ca0106 Merge branch 'topic/memory-device-fixes-2' into for-next 2019-02-08 14:12:15 +01:00
cs46xx ALSA: cs46xx: Clean up proc file creations 2019-02-06 18:11:59 +01:00
cs5535audio ALSA: pci: Remove superfluous snd_pcm_suspend*() calls 2019-01-15 17:47:15 +01:00
ctxfi ALSA: pci: Remove superfluous snd_pcm_suspend*() calls 2019-01-15 17:47:15 +01:00
echoaudio ALSA: echoaudio: add a check for ioremap_nocache 2019-03-16 10:29:02 +01:00
emu10k1 Merge branch 'topic/memory-device-fixes-2' into for-next 2019-02-08 14:12:15 +01:00
hda ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec 2019-03-19 06:54:24 +01:00
ice1712 ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
korg1212 ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
lola ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
lx6464es Merge branch 'topic/memory-device-fixes-2' into for-next 2019-02-08 14:12:15 +01:00
mixart ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
nm256 ALSA: pci: Remove superfluous snd_pcm_suspend*() calls 2019-01-15 17:47:15 +01:00
oxygen ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
pcxhr ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
riptide ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
rme9652 Merge branch 'topic/memory-device-fixes-2' into for-next 2019-02-08 14:12:15 +01:00
trident ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
vx222 ALSA: vx222: Fix invalid endian conversions 2018-07-26 08:23:28 +02:00
ymfpci ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
ad1889.c Merge branch 'topic/memory-device-fixes-2' into for-next 2019-02-08 14:12:15 +01:00
ad1889.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ak4531_codec.c ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
als300.c ALSA: pci: Remove superfluous snd_pcm_suspend*() calls 2019-01-15 17:47:15 +01:00
als4000.c ALSA: pci: Remove superfluous snd_pcm_suspend*() calls 2019-01-15 17:47:15 +01:00
atiixp_modem.c ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
atiixp.c ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
azt3328.c ALSA: pci: Remove superfluous snd_pcm_suspend*() calls 2019-01-15 17:47:15 +01:00
azt3328.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bt87x.c ALSA: pci: Drop superfluous PCM preallocation error checks 2019-02-06 10:29:09 +01:00
cmipci.c ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
cs4281.c ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
cs5530.c ASoC: sb16: Simplify snd_sb16dsp_pcm() 2015-01-02 16:28:35 +01:00
ens1370.c ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
ens1371.c
es1938.c ALSA: pci: Remove superfluous snd_pcm_suspend*() calls 2019-01-15 17:47:15 +01:00
es1968.c ALSA: pci: Remove superfluous snd_pcm_suspend*() calls 2019-01-15 17:47:15 +01:00
fm801.c ALSA: pci: Remove superfluous snd_pcm_suspend*() calls 2019-01-15 17:47:15 +01:00
intel8x0.c ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
intel8x0m.c ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
Kconfig docs: Fix some broken references 2018-06-15 18:10:01 -03:00
maestro3.c ALSA: pci: Remove superfluous snd_pcm_suspend*() calls 2019-01-15 17:47:15 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rme32.c ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
rme96.c ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
sis7019.c ALSA: pci: Remove superfluous snd_pcm_suspend*() calls 2019-01-15 17:47:15 +01:00
sis7019.h
sonicvibes.c ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00
via82xx_modem.c Merge branch 'topic/memory-device-fixes-2' into for-next 2019-02-08 14:12:15 +01:00
via82xx.c ALSA: pci: Clean up with new procfs helpers 2019-02-06 18:11:56 +01:00