Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755752Ab3E2PmM (ORCPT ); Wed, 29 May 2013 11:42:12 -0400 Received: from cantor2.suse.de ([195.135.220.15]:34814 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753202Ab3E2PmK (ORCPT ); Wed, 29 May 2013 11:42:10 -0400 Date: Wed, 29 May 2013 17:42:49 +0200 Message-ID: From: Takashi Iwai To: Alex Riesen Cc: alsa-devel@alsa-project.org, Linux Kernel Mailing List Subject: Re: regression: from 3.8 to 3.9: headphones output no sound on Intel HDA, codec VIA VT1802 In-Reply-To: References: User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/24.2 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4009 Lines: 123 At Fri, 24 May 2013 23:32:14 +0200, Alex Riesen wrote: > > On Fri, May 24, 2013 at 7:22 PM, Takashi Iwai wrote: > > > > Well, I assumed that the EAPD off triggers the pin widget off by the > > hardware, too. But it seems wrong. By some reason, the hardware > > clears the pin automatically. Hmm. > > > > Could you try to trace the verbs while plugging the headphone? > > Attached, it's ~70k, so compressed again. Thanks. Looking at this, surprisingly there is a verb to set the pinctl to 0x00 indeed. This didn't happen on the emulator I checked. So we need to figure out from where this came. > >> I did, it does not work. Transcript and alsa-info before and after > >> hda-verb attached. > > > > OK, I'll cook up the new patch later. > > I'm sorry to say that I will not be able to test it in the next > 8 or so days: I'll be traveling and without this particular laptop > with me. I hope someone with similar model (Sytem76 Lemur lemu4, i7) > can provide some testing in the meantime. Otherwise, I'll test > it as soon as I get back. Don't worry, the bug is more difficult than I thought :) We can fix it quickly but it's no real fix. Better to know the real culprit. When you back, could you try the following and give the outputs? 0. Build the kernel with the patch below. Discard previous patches. Also, make sure that your kernel has CONFIG_SND_HDA_HWDEP=y and CONFIG_SND_HDA_RECONFIG=y. 1. Blacklist snd-hda-intel module in /etc/modprobe.d/* file, and reboot to runlevel 3. 2. Load snd-hda-intel manually with probe_only=1 option # modprobe snd-hda-intel probe_only=1 3. Run "alsa-info.sh --no-upload" at this moment, and save it. 4. Enable the tracing. # echo 1 > /sys/kernel/debug/tracing/events/hda/enable 5. Configure the codec via below (don't plug in HP yet): # echo 1 > /sys/class/sound/hwC0D0/reconfig Copy the tracing output to somewhere # cp /sys/kernel/debug/tracing/trace /tmp/init-trace then clear the trace buffer. # echo > /sys/kernel/debug/tracing/trace 6. Now you should have the normal sound operation. Try to play something, and confirm the speaker output is working. Get alsa-info.sh output at this state. Again copy the trace buffer and clear # cp /sys/kernel/debug/tracing/trace /tmp/speaker-trace # echo > /sys/kernel/debug/tracing/trace 7. Plug the headphone, and copy the trace. # cp /sys/kernel/debug/tracing/trace /tmp/headphone-trace # echo > /sys/kernel/debug/tracing/trace Check whether the playback doesn't work on the headphone at this moment. Get alsa-info.sh output again. 8. Run some hda-verb to enable EAPD and pin-control, confirm the headphone is working now, and get alsa-info.sh output. So, you'll get 4 alsa-info.sh outputs (step 3, 6, 7 and 8), and 4 trace logs (step 5, 6 and 7). thanks, Takashi --- diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index ae85bbd2..5ca6655 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -5092,7 +5092,7 @@ int snd_hda_gen_init(struct hda_codec *codec) snd_hda_apply_verbs(codec); - codec->cached_write = 1; + // codec->cached_write = 1; init_multi_out(codec); init_extra_out(codec); diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index e0dadcf..8d861c3 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 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, -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/