At Fri, 31 May 2013 17:32:16 +0200, Alex Riesen wrote:
On Fri, May 31, 2013 at 3:05 PM, Takashi Iwai tiwai@suse.de wrote:
Below is a series of patches. For simplicity, I just attach them, not inlining to the mail. They should be applicable cleanly to 3.9.4 as well. Let me know if this works. If this still doesn't work, I need to rewrite the patch to correct the pin-ctl / EAPD of the headphone pin after changing the speaker pin.
Still does not work. The results are for 3.9.4 + patches:
http://familie-riesen.de/~raa/public/test/dpc-automute-vol-pinctl.tar.bz2
I tried patched 3.9.2, with the same result.
Grrr, EAPD on 0x25 seems reset by EAPD on 0x24 being turned off. We need to apply the patch of the last week again in the end. The revised one is below. Please apply it on the top of the previous three patches.
thanks,
Takashi
--- From: Takashi Iwai tiwai@suse.de Subject: [PATCH] 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 raa.lkml@gmail.com Cc: stable@vger.kernel.org [v3.9] Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/hda/hda_generic.c | 2 ++ sound/pci/hda/hda_generic.h | 1 + sound/pci/hda/patch_via.c | 1 + 3 files changed, 4 insertions(+)
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 396fcce..59fe077 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -799,6 +799,8 @@ static void set_pin_eapd(struct hda_codec *codec, hda_nid_t pin, bool enable) return; if (codec->inv_eapd) enable = !enable; + if (spec->keep_eapd_on && !enable) + return; update_pin_verb(codec, pin, AC_VERB_SET_EAPD_BTLENABLE, enable ? 0x02 : 0x00); } diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h index 2d70a7d0..57f5ca4 100644 --- a/sound/pci/hda/hda_generic.h +++ b/sound/pci/hda/hda_generic.h @@ -223,6 +223,7 @@ struct hda_gen_spec { 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 volatile_pin_ctl:1; /* pin contrl&EAPDs are volatile */ + 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 indep_hp:1; /* independent HP supported */ unsigned int prefer_hp_amp:1; /* enable HP amp for speaker if any */ diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 4bbd4f3..924dad6 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c @@ -137,6 +137,7 @@ static struct via_spec *via_new_spec(struct hda_codec *codec) spec->no_pin_power_ctl = 1; spec->gen.indep_hp = 1; spec->gen.volatile_pin_ctl = 1; + spec->gen.keep_eapd_on = 1; spec->gen.pcm_playback_hook = via_playback_pcm_hook; return spec; }