From patchwork Wed Feb 25 06:59:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 5878061 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9B116BF440 for ; Wed, 25 Feb 2015 06:59:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8331F20353 for ; Wed, 25 Feb 2015 06:59:28 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 0F6FC20221 for ; Wed, 25 Feb 2015 06:59:27 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id E8FD0260701; Wed, 25 Feb 2015 07:59:25 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 7082C2605D1; Wed, 25 Feb 2015 07:59:17 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id A79F82605D7; Wed, 25 Feb 2015 07:59:16 +0100 (CET) Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id B365B2605CB for ; Wed, 25 Feb 2015 07:59:09 +0100 (CET) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 65371AB0C; Wed, 25 Feb 2015 06:59:09 +0000 (UTC) Date: Wed, 25 Feb 2015 07:59:09 +0100 Message-ID: From: Takashi Iwai To: Dang Sananikone 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.4 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: alsa-devel@alsa-project.org Subject: Re: [alsa-devel] No sound and systemd journal filling when inserting headphones when power-saving is enabled X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP At Tue, 24 Feb 2015 22:26:32 +0000, Dang Sananikone wrote: > > On 24 February 2015 at 20:57, Takashi Iwai wrote: > > > At Tue, 24 Feb 2015 20:11:58 +0000, > > Dang Sananikone wrote: > > > > > > Thanks, in that case I'll simply attach the files to this post. There are > > > two files: > > > > > > * alsa-info-notworking.txt: This is the alsa info generated when > > > power-saving is enabled and after "speaker-test" has been invoked. > > > * alsa-info-working.txt: This is the alsa info generated when > > power-saving > > > is disabled and after "speaker-test" has been invoked. > > > > > > > > > To reproduce the problem: > > > > > > Prerequisite: > > > Set "options snd_hda_intel power_save=1" > > > > > > Instructions: > > > 1. Boot up laptop. > > > 2. Insert headphone socket into jack. > > > 3. In terminal, type "speaker-test -c 2". > > > > > > Expected Result: > > > The speaker-test program hangs, and the systemd journal starts filling up > > > with "sound hdaudioC0D0: hda-codec: out of range cmd 0:1:716:ffffffff" > > > messages. > > > > OK, then try to pass power_save_controller=0 option to snd-hda-intel > > module. It might be that the controller gets screwed up by some > > reason by power-saving. > > > > If I've understood you correctly I've set the following options: "options > snd_hda_intel power_save=1 power_save_controller=0". > > Then I've plugged in my headphones before invoking speaker-test. With no > audio playing I hear a blip sound every second. Every second? Is this equal with the length you specified to power_save option? i.e. if you pass power_save=10, the frequency of blip noise changes, too? > Then I invoke "speaker-test -c 2" and I hear the speaker test audio I > expect to hear. The program does not hang. After killing the program and > with no audio playing I hear the blip sound every second. So, the problem was basically the HD-audio controller screwed up by the power-saving. BTW, didn't you see the same problem with the explicit suspend/resume (S3 and S4)? For testing it, try a bigger value in power_save so that you go to S3/S4 before the power save is triggered. > > If this still doesn't help, we need more logs. Build the kernel with > > tracing support, and get the HD-audio verb traces as > > Documentation/sound/alsa/HD-Audio.txt, section Tracepoints. > > > > > > Takashi > > > > Going back to this setting I set out to get the HD-audio verbs to provide > more information: "options snd_hda_intel power_save=1". > > I've attached the trace file which was generated after following your > instructions (I think the kernel already had tracing support enabled > judging by the /proc/config.gz config parameters). The trace already shows the bad read from the controller, so it's likely an issue in the HDA controller and/or communication. In anyway, below is a patch to disable runtime PM of the controller again. It's equivalent as passing power_save_controller=1. Could you give it a test? thanks, Takashi -- 8< -- From: Takashi Iwai Subject: [PATCH] ALSA: hda - Disable runtime PM for Panther Point again This is essentially a partial revert of the commit [b1920c21102a: 'ALSA: hda - Enable runtime PM on Panther Point']. There was a bug report showing the HD-audio bus hang during runtime PM on HP Spectre XT. Reported-by: Dang Sananikone Cc: Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 36d2f20db7a4..4ca3d5d02436 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1966,7 +1966,7 @@ static const struct pci_device_id azx_ids[] = { .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM }, /* Panther Point */ { PCI_DEVICE(0x8086, 0x1e20), - .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, + .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH_NOPM }, /* Lynx Point */ { PCI_DEVICE(0x8086, 0x8c20), .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },