All of 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: Thu, 16 May 2013 13:00:22 +0200	[thread overview]
Message-ID: <s5h1u97jik9.wl%tiwai@suse.de> (raw)
In-Reply-To: <CALxABCZMyqh5SSo=RpQCJNUR_p9yrG5x9DimFpzvgkCFLr4eug@mail.gmail.com>

At Wed, 15 May 2013 22:17:23 +0200,
Alex Riesen wrote:
> 
> On Wed, May 15, 2013 at 7:20 AM, Takashi Iwai <tiwai@suse.de> wrote:
> >> > The below is the revised patch, fixing not only for VT1802 but other
> >> > VIA codecs, too.  Please let me know if it works.
> >>
> >> With this patch headphones work, but Auto-Mute is inverted, as it was before.
> >
> > OK, could you give again alsa-info.sh outputs at HP plugged and
> > unplugged?
> 
> Attached.
> 
> Sadly, I must have made a mistake when testing last time (either that,
> or it broke all by itself): the revised patch also does not work, same
> as the previous: no output at all, even on the alternate PCM.

Ah, then the attached files are basically useless, unfortunately.

So, we need to disable the widgets power control in patch_via.c
completely as a quick workaround.  Could you check whether the patch
below is OK (except for the possible headphone mute issue)?
 
Regarding the headphone mute: after confirming the headphone itself
is working with the patch, please give alsa-info.sh outputs again
with and without the headphone plug.

Then, at the headphone plugged (and the speaker is still audible
wrongly), take a look at /proc/asound/card0/codec#0 file.
Look for "Node 0x24", and check whether Pin-ctls item shows 0x00.
If 0x00, it means that the driver behaves correctly, but the
hardware reacts unexpectedly -- it produces the sound even though
the pin control is cleared.
OTOH, if it's 0x40, then the driver didn't do it right.

In the former case (0x00), try to run like:

   hda-verb /dev/snd/hwC0D0 0x24 SET_EAPD 0x01

Does it mute the speaker?  If not, make it back via

   hda-verb /dev/snd/hwC0D0 0x24 SET_EAPD 0x03

then turn to D3 via

   hda-verb /dev/snd/hwC0D0 0x24 SET_POWER 0x03

Does this mute?  In return, after unplug, it may still be muted.
In that case, try to power up the pin again via

   hda-verb /dev/snd/hwC0D0 0x24 SET_POWER 0x00


thanks,

Takashi

---
From: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] ALSA: hda - Disable broken PM setup for VIA codecs

The set_widgets_power_state_*() callbacks in patch_via.c are converted
to evaluate spec->gen.indep_hp_enabled when the codec parser was
switched to use the generic parser.  However, the generic parser takes
the headphone paths in a different way as the original VIA parser; it
tries the paths with individual DACs as much as possible.  This ended
up with the incorrect check of the power status in the HP paths,
resulting in the silent output from the headphones.

As a band-aid fix, temporarily disable the callback calls.

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/patch_via.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index e0dadcf..7ee44a2 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -231,9 +231,11 @@ static void vt1708_update_hp_work(struct hda_codec *codec)
 
 static void set_widgets_power_state(struct hda_codec *codec)
 {
+#if 0 /* FIXME: mismatching with the mapping by the generic parser */
 	struct via_spec *spec = codec->spec;
 	if (spec->set_widgets_power_state)
 		spec->set_widgets_power_state(codec);
+#endif
 }
 
 static void update_power_state(struct hda_codec *codec, hda_nid_t nid,
-- 
1.8.2.1


  reply	other threads:[~2013-05-16 11:00 UTC|newest]

Thread overview: 34+ 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-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 [this message]
2013-05-16 20:10                   ` Alex Riesen
2013-05-16 20:10                     ` Alex Riesen
2013-05-17  6:04                     ` Takashi Iwai
2013-05-18 20:29                       ` Alex Riesen
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=s5h1u97jik9.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.