From patchwork Thu Nov 26 08:07:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 7705191 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BE1DB9F443 for ; Thu, 26 Nov 2015 08:07:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EFEA9206BC for ; Thu, 26 Nov 2015 08:07:37 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id B405520629 for ; Thu, 26 Nov 2015 08:07:36 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 9DF872665D3; Thu, 26 Nov 2015 09:07:34 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9AED6266587; Thu, 26 Nov 2015 09:07:26 +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 E0B5F26658E; Thu, 26 Nov 2015 09:07:25 +0100 (CET) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 8556A264F23 for ; Thu, 26 Nov 2015 09:07:18 +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 D279DAAB6; Thu, 26 Nov 2015 08:05:37 +0000 (UTC) Date: Thu, 26 Nov 2015 09:07:17 +0100 Message-ID: From: Takashi Iwai To: "Zhang, Xiong Y" In-Reply-To: <8082FF9BCB2B054996454E47167FF4EC0B0F2951@SHSMSX104.ccr.corp.intel.com> References: <1440781350-12053-1-git-send-email-david.henningsson@canonical.com> <1440781350-12053-5-git-send-email-david.henningsson@canonical.com> <8082FF9BCB2B054996454E47167FF4EC0B0F19F8@SHSMSX104.ccr.corp.intel.com> <8082FF9BCB2B054996454E47167FF4EC0B0F1AE8@SHSMSX104.ccr.corp.intel.com> <8082FF9BCB2B054996454E47167FF4EC0B0F2834@SHSMSX104.ccr.corp.intel.com> <8082FF9BCB2B054996454E47167FF4EC0B0F2951@SHSMSX104.ccr.corp.intel.com> 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.5 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Cc: "Yang, Libin" , "alsa-devel@alsa-project.org" , "intel-gfx@lists.freedesktop.org" , "jani.nikula@linux.intel.com" , "Vetter, Daniel" , David Henningsson Subject: Re: [alsa-devel] [Intel-gfx] [PATCH 4/4] ALSA: hda - Wake the codec up on pin/ELD notify events 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 On Thu, 26 Nov 2015 08:57:30 +0100, Zhang, Xiong Y wrote: > > > > > BTW, I have a patchset to avoid the audio h/w wakeup by a new > > > > component ops to get ELD and connection states. It was posted to > > > > alsa-devel shortly ago just as a reference, but this should work well > > > > in such a case, too. The test patches are found in test/hdmi-jack > > > > branch of my sound git tree. > > > > Did you try this branch (merge onto intel-test-nightly)? > > > [Zhang, Xiong Y] Yes, this branch could fix my issue. OK, good to hear. But this isn't for 4.4 or backport, as it's more radical changes. Could you check the patch below instead? This suppresses the notifier handling during suspend. It's bad, but the hotplug should be still handled via normal unsol event, so it should keep working, good enough as a stop gap. Takashi diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c index bdb6f226d006..f7c70e2ae65c 100644 --- a/sound/pci/hda/patch_hdmi.c +++ b/sound/pci/hda/patch_hdmi.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -2352,7 +2353,9 @@ static void intel_pin_eld_notify(void *audio_ptr, int port) struct hda_codec *codec = audio_ptr; int pin_nid = port + 0x04; - check_presence_and_report(codec, pin_nid); + if (!atomic_read(&codec->core.in_pm) && + !pm_runtime_suspended(hda_codec_dev(codec))) + check_presence_and_report(codec, pin_nid); } static int patch_generic_hdmi(struct hda_codec *codec)