android_kernel_samsung_a7y1.../sound/pci
Hui Wang 44b4dda2dd ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec
commit b5a236c175b0d984552a5f7c9d35141024c2b261 upstream.

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: cc72da7d4d06 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-04-06 10:58:20 +02:00
..
ac97 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ali5451 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
asihpi A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
au88x0 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
aw2 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ca0106 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cs46xx A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cs5535audio A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ctxfi A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
echoaudio A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
emu10k1 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
hda ALSA: hda - Enforces runtime_resume after S3 and S4 for each codec 2020-04-06 10:58:20 +02:00
ice1712 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
korg1212 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lola A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
lx6464es A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
mixart A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
nm256 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
oxygen A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
pcxhr A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
riptide A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rme9652 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
trident A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
vx222 A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ymfpci A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ad1889.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ad1889.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ak4531_codec.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
als300.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
als4000.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
atiixp_modem.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
atiixp.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
azt3328.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
azt3328.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
bt87x.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cmipci.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cs4281.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cs5530.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ens1370.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
ens1371.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
es1938.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
es1968.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fm801.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
intel8x0.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
intel8x0m.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Kconfig A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
maestro3.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rme32.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rme96.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sis7019.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sis7019.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sonicvibes.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
via82xx_modem.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
via82xx.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30