Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Alex Riesen <raa.lkml@gmail.com>
Cc: alsa-devel@alsa-project.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: regression: from 3.8 to 3.9: headphones output no sound on Intel HDA, codec VIA VT1802
Date: Fri, 31 May 2013 20:00:50 +0200	[thread overview]
Message-ID: <s5hbo7rowq5.wl%tiwai@suse.de> (raw)
In-Reply-To: <CALxABCaQ_drc+jKP4wZ5S_5wZVcE7rVXW_LZdVJ8tqZUai-=UQ@mail.gmail.com>

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;
 }
-- 
1.8.3

  reply	other threads:[~2013-05-31 18:00 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-12  9:53 regression: from 3.8 to 3.9: headphones output no sound on Intel HDA, codec VIA VT1802 Alex Riesen
2013-05-12  9:58 ` Fwd: " Alex Riesen
2013-05-13 15:26 ` Takashi Iwai
2013-05-13 15:53   ` Takashi Iwai
2013-05-13 18:24     ` Alex Riesen
2013-05-14  5:59       ` Takashi Iwai
2013-05-14 10:58         ` Takashi Iwai
2013-05-14 19:55           ` Alex Riesen
2013-05-15  5:20             ` Takashi Iwai
2013-05-15 20:17               ` Alex Riesen
2013-05-16 11:00                 ` Takashi Iwai
2013-05-16 20:10                   ` Alex Riesen
2013-05-17  6:04                     ` Takashi Iwai
2013-05-18 20:29                       ` Alex Riesen
2013-05-22 21:06                         ` Alex Riesen
2013-05-23 16:34                           ` Takashi Iwai
2013-05-23 18:38                             ` Alex Riesen
2013-05-24 13:29                         ` Takashi Iwai
2013-05-24 16:36                           ` Alex Riesen
2013-05-24 17:22                             ` Takashi Iwai
2013-05-24 21:32                               ` Alex Riesen
2013-05-29 15:42                                 ` Takashi Iwai
2013-05-31 10:31                                   ` Alex Riesen
2013-05-31 13:05                                     ` Takashi Iwai
2013-05-31 15:32                                       ` Alex Riesen
2013-05-31 18:00                                         ` Takashi Iwai [this message]
2013-05-31 19:36                                           ` Alex Riesen
2013-06-03 10:05                                             ` Takashi Iwai
2013-06-03 18:49                                               ` Alex Riesen
2013-06-04  9:48                                                 ` Takashi Iwai
2013-05-14 19:54         ` Alex Riesen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hbo7rowq5.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=raa.lkml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox