• Takashi Iwai's avatar
    ALSA: hda/realtek - Avoid superfluous COEF EAPD setups · c9af753f
    Takashi Iwai authored
    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: default avatarKailang Yang <kailang@realtek.com>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    c9af753f
patch_realtek.c 272 KB