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: Tue, 14 May 2013 07:59:07 +0200	[thread overview]
Message-ID: <s5hr4haw190.wl%tiwai@suse.de> (raw)
In-Reply-To: <CALxABCbyALmAKwCC6wNOgQWs8jD2X72aH8_++OW6R7m7C3vgfw@mail.gmail.com>

At Mon, 13 May 2013 20:24:42 +0200,
Alex Riesen wrote:
> 
> On Mon, May 13, 2013 at 5:53 PM, Takashi Iwai <tiwai@suse.de> wrote:
> > At Mon, 13 May 2013 17:26:04 +0200, Takashi Iwai wrote:
> >> At Sun, 12 May 2013 11:53:41 +0200, Alex Riesen wrote:
> >> >
> >> > I just noticed (use the headphones rarely) that the headphones on this
> >> > System76 Lemur Ultra (lemu4) stopped working. There is absolutely no
> >> > output.
> >> >
> >>
> >> It's strange that the pin 0x25 shows EAPD 0x00 and pin-control 0x00.
> >> They should be 0x02 and 0xc0 constantly.  Is it taken at the moment
> >> the headphone is plugged, right?  Please give alsa-info.sh outputs at
> >> both the headphone plugged and unplugged.
> 
> Attached. Sorry for gzipping, the alsa-devel rejects two at a time: too large.
> 
> >> Could you check whether changing them makes the headphone output
> >> working?  For example, get hda-verb program (see
> >> Documentation/sound/alsa/HD-Audio.txt) and run it like
> >>
> >>       hda-verb /dev/snd/hwC0D0 0x25 SET_PIN_WID 0xc0
> >>       hda-verb /dev/snd/hwC0D0 0x25 SET_EAPD 0x02
> 
> It helps, headphones start working.
> 
> > Also, what happens if you apply the patch below?
> > -       spec->set_widgets_power_state =  set_widgets_power_state_vt2002P;
> > +       //spec->set_widgets_power_state =  set_widgets_power_state_vt2002P;
> 
> This helps as well. Yay!
> Thanks :) Whatever the outcome, I have them back more or less (more,
> for me) properly.

OK, then we know the place to fix now.
Try the patch below instead.  Does it fix the problem as well?

> Probably unrelated, but I better mention it anyway: the "Auto-Mute Mode"
> works strangely, it never mutes anything but headphones. It might work
> as designed, but it is useless in this case: one still has to mute the
> speaker manually when plugging headphones (or do something with input
> events, which I failed to get to work).

Does the problem still happen with the patch?

> And "Independent HP" has absolutely no effect, which is probably as it
> should be on this laptop.

With the independent HP turned on, there should be no output to the
headphone through the normal PCM.  There is a secondary PCM device,
and this is routed to the headphone when the independent HP is on.


thanks,

Takashi

---
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index e0dadcf..09fd395 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -1410,6 +1410,7 @@ static void set_widgets_power_state_vt2002P(struct hda_codec *codec)
 	/* outputs */
 	/* AOW0 (8h)*/
 	update_power_state(codec, 0x8, parm);
+	update_power_state(codec, 0x9, parm);
 
 	if (spec->codec_type == VT1802) {
 		/* PW4 (28h), MW4 (18h), MUX4(38h) */
@@ -1439,16 +1440,14 @@ static void set_widgets_power_state_vt2002P(struct hda_codec *codec)
 		update_power_state(codec, 0x35, parm);
 	}
 
-	if (spec->gen.indep_hp_enabled)
-		update_power_state(codec, 0x9, AC_PWRST_D0);
-
 	/* Class-D */
 	/* PW0 (24h), MW0(18h/14h), MUX0(34h) */
 	present = snd_hda_jack_detect(codec, 0x25);
 
 	parm = AC_PWRST_D3;
 	set_pin_power_state(codec, 0x24, &parm);
-	parm = present ? AC_PWRST_D3 : AC_PWRST_D0;
+	if (parm == AC_PWRST_D0)
+		parm = present ? AC_PWRST_D3 : AC_PWRST_D0;
 	if (spec->codec_type == VT1802)
 		update_power_state(codec, 0x14, parm);
 	else

  reply	other threads:[~2013-05-14  5:59 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 [this message]
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
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=s5hr4haw190.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