Commit 05909d5c authored by Takashi Iwai's avatar Takashi Iwai

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: default avatarAlex Riesen <raa.lkml@gmail.com>
Cc: <stable@vger.kernel.org> [v3.9]
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 77afe0e9
...@@ -788,6 +788,8 @@ static void set_pin_eapd(struct hda_codec *codec, hda_nid_t pin, bool enable) ...@@ -788,6 +788,8 @@ static void set_pin_eapd(struct hda_codec *codec, hda_nid_t pin, bool enable)
return; return;
if (codec->inv_eapd) if (codec->inv_eapd)
enable = !enable; enable = !enable;
if (spec->keep_eapd_on && !enable)
return;
snd_hda_codec_update_cache(codec, pin, 0, snd_hda_codec_update_cache(codec, pin, 0,
AC_VERB_SET_EAPD_BTLENABLE, AC_VERB_SET_EAPD_BTLENABLE,
enable ? 0x02 : 0x00); enable ? 0x02 : 0x00);
......
...@@ -222,6 +222,7 @@ struct hda_gen_spec { ...@@ -222,6 +222,7 @@ struct hda_gen_spec {
unsigned int multi_cap_vol:1; /* allow multiple capture xxx volumes */ unsigned int multi_cap_vol:1; /* allow multiple capture xxx volumes */
unsigned int inv_dmic_split:1; /* inverted dmic w/a for conexant */ unsigned int inv_dmic_split:1; /* inverted dmic w/a for conexant */
unsigned int own_eapd_ctl:1; /* set EAPD by own function */ unsigned int own_eapd_ctl:1; /* set EAPD by own function */
unsigned int keep_eapd_on:1; /* don't turn off EAPD automatically */
unsigned int vmaster_mute_enum:1; /* add vmaster mute mode enum */ unsigned int vmaster_mute_enum:1; /* add vmaster mute mode enum */
unsigned int indep_hp:1; /* independent HP supported */ unsigned int indep_hp:1; /* independent HP supported */
unsigned int prefer_hp_amp:1; /* enable HP amp for speaker if any */ unsigned int prefer_hp_amp:1; /* enable HP amp for speaker if any */
......
...@@ -136,6 +136,7 @@ static struct via_spec *via_new_spec(struct hda_codec *codec) ...@@ -136,6 +136,7 @@ static struct via_spec *via_new_spec(struct hda_codec *codec)
spec->codec_type = VT1708S; spec->codec_type = VT1708S;
spec->no_pin_power_ctl = 1; spec->no_pin_power_ctl = 1;
spec->gen.indep_hp = 1; spec->gen.indep_hp = 1;
spec->gen.keep_eapd_on = 1;
spec->gen.pcm_playback_hook = via_playback_pcm_hook; spec->gen.pcm_playback_hook = via_playback_pcm_hook;
return spec; return spec;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment