]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda/realtek - Avoid superfluous COEF EAPD setups
authorTakashi Iwai <tiwai@suse.de>
Fri, 10 May 2019 09:01:43 +0000 (11:01 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 10 May 2019 09:01:43 +0000 (11:01 +0200)
commite4fa3a31972b50dfc940bc7bf3a6c38e9be393ee
tree71aa2bf5608c2b30c3623064707c6df61a17888a
parent4d3e2b8165edcc1234963aa20955e5ff98a9c896
ALSA: hda/realtek - Avoid superfluous COEF EAPD setups

Realtek codec driver applied the COEF setups to change the EAPD
control to the default mode (i.e. control by EPAD verbs) at the init
callback.  It works, but this is too excessive at the same time, since
it's called at each runtime PM resume.  That is, the initialization
should be done only once after the probe.  One may think that moving
this to the probe should be OK, but no -- there is a catch; when a
system resumes from S4 (hibernation), we need to re-initialize this
again manually, because it's out of regcache restoration.

This patch addresses the issue by introducing alc_pre_init() function
that performs such a task.  This is called from each codec probe
function, and it's called from the resume callback conditionally only
from S4 resume.

Reported-and-tested-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/patch_realtek.c