]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ALSA: hda/senary: Ensure EAPD is enabled during init
authorwangdicheng <wangdicheng@kylinos.cn>
Tue, 3 Mar 2026 08:15:16 +0000 (16:15 +0800)
committerTakashi Iwai <tiwai@suse.de>
Tue, 3 Mar 2026 08:58:45 +0000 (09:58 +0100)
The driver sets spec->gen.own_eapd_ctl to take manual control of the
EAPD (External Amplifier). However, senary_init does not turn on the
EAPD, while senary_shutdown turns it off.

Since the generic driver skips EAPD handling when own_eapd_ctl is set,
the EAPD remains off after initialization (e.g., after resume), leaving
the codec in a non-functional state.

Explicitly call senary_auto_turn_eapd in senary_init to ensure the EAPD
is enabled and the codec is functional.

Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
Link: https://patch.msgid.link/20260303081516.583438-1-wangdich9700@163.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/hda/codecs/senarytech.c

index 8822d4dc5e36afa2548c643a0af8a36ec1b9aea9..6239a25bb8f32457cc62e3a412a07eec3e682628 100644 (file)
@@ -25,6 +25,7 @@ struct senary_spec {
        /* extra EAPD pins */
        unsigned int num_eapds;
        hda_nid_t eapds[4];
+       bool dynamic_eapd;
        hda_nid_t mute_led_eapd;
 
        unsigned int parse_flags; /* flag for snd_hda_parse_pin_defcfg() */
@@ -131,8 +132,12 @@ static void senary_init_gpio_led(struct hda_codec *codec)
 
 static int senary_init(struct hda_codec *codec)
 {
+       struct senary_spec *spec = codec->spec;
+
        snd_hda_gen_init(codec);
        senary_init_gpio_led(codec);
+       if (!spec->dynamic_eapd)
+               senary_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, true);
        snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT);
 
        return 0;