lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 31 May 2013 20:00:50 +0200
From:	Takashi Iwai <tiwai@...e.de>
To:	Alex Riesen <raa.lkml@...il.com>
Cc:	alsa-devel@...a-project.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: regression: from 3.8 to 3.9: headphones output no sound on Intel HDA, codec VIA VT1802

At Fri, 31 May 2013 17:32:16 +0200,
Alex Riesen wrote:
> 
> On Fri, May 31, 2013 at 3:05 PM, Takashi Iwai <tiwai@...e.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@...e.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@...il.com>
Cc: <stable@...r.kernel.org> [v3.9]
Signed-off-by: Takashi Iwai <tiwai@...e.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;
 }
-- 
1.8.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ