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,