Skip to content

Commit 05909d5

Browse files
committed
ALSA: hda - Add keep_eapd_on flag to generic parser
VT1802 codec seems to reset EAPD of other pins in the hardware level, and this was another reason of the silent headphone output on some machines. As a workaround, introduce a new flag indicating to keep the EPAD on to the generic parser, and set it in patch_via.c. Reported-by: Alex Riesen <[email protected]> Cc: <[email protected]> [v3.9] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 77afe0e commit 05909d5

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

sound/pci/hda/hda_generic.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,8 @@ static void set_pin_eapd(struct hda_codec *codec, hda_nid_t pin, bool enable)
788788
return;
789789
if (codec->inv_eapd)
790790
enable = !enable;
791+
if (spec->keep_eapd_on && !enable)
792+
return;
791793
snd_hda_codec_update_cache(codec, pin, 0,
792794
AC_VERB_SET_EAPD_BTLENABLE,
793795
enable ? 0x02 : 0x00);

sound/pci/hda/hda_generic.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ struct hda_gen_spec {
222222
unsigned int multi_cap_vol:1; /* allow multiple capture xxx volumes */
223223
unsigned int inv_dmic_split:1; /* inverted dmic w/a for conexant */
224224
unsigned int own_eapd_ctl:1; /* set EAPD by own function */
225+
unsigned int keep_eapd_on:1; /* don't turn off EAPD automatically */
225226
unsigned int vmaster_mute_enum:1; /* add vmaster mute mode enum */
226227
unsigned int indep_hp:1; /* independent HP supported */
227228
unsigned int prefer_hp_amp:1; /* enable HP amp for speaker if any */

sound/pci/hda/patch_via.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ static struct via_spec *via_new_spec(struct hda_codec *codec)
136136
spec->codec_type = VT1708S;
137137
spec->no_pin_power_ctl = 1;
138138
spec->gen.indep_hp = 1;
139+
spec->gen.keep_eapd_on = 1;
139140
spec->gen.pcm_playback_hook = via_playback_pcm_hook;
140141
return spec;
141142
}

0 commit comments

Comments
 (0)