Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp63037pxu; Tue, 5 Jan 2021 05:20:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJwiZrEeS1ObDAeQNyhaeerwLf/6v5d8t8Iys9Mfl552mrxG8QpRAVkVtftH35GwwdMKaW3s X-Received: by 2002:a05:6402:1516:: with SMTP id f22mr21667670edw.382.1609852819011; Tue, 05 Jan 2021 05:20:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609852819; cv=none; d=google.com; s=arc-20160816; b=uS4WZSeQGwNcp7qmJhAIbuGpC5sUm5uTGCrUyl+0Qs7SU6zDW0xc4rgT9rEGBRq/RW FEmNjuuP867ovFJLBtBVGbsM+vmV6cPemD2In/quyVfS7V25OCHq+J94qoxjdQ634IT5 C1gR5j1U8HeKjbSgsTx9ljXC+Y0bNP4kiOKqf/cRekc3qsECKMOHelGCJxOA6jUY0I/i j+qJ+HVD9HVu7tfbqtBHEfXZC50jZGQW6MSbDGuQFjuAmF4gIAd8hJ/CbpNltNCP6o7z /bZxECKOWOITtp47MTgCEczammGTgNyxl3+nOK5oQM0CouUGKWBoNuUVvsL4uACjmHp4 Afeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:organization:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:ironport-sdr :ironport-sdr; bh=KPCN+R65rpu1b3c6ZX7uSZzAe3dTObIGJ/WicQOzmlE=; b=i/rYb0mSdqQk4QFArV0UVp0CCHBIfLfyQvgZo9bQstetMyXlUqTGgCzukMY5FWEL9U WN6UYXp3e7hFq8yPT80errKoyVCiT+nWCnuvGrHMMCYRxwlEjvktcbSmexQd7yyaJVGs gvyPm8ZgKAxI6OMk4DMchYLIzlwGRb04hbJBFXyQqlZSbiOAB77fPHJcmXkWfD7qPI0c Ji1at52nI7As+FpYqdrXFV+Bym5Q3b3zgKwI1I8cmd7IyzcST5exlh0BeD5FFc5ZRH7z Es8WzhoGmWJi56YP/H5Xbe3Q/AO2SeZmBjAH7tLzyEpRA4/9ZhxL7Sg4i0tem+zfq3gJ ufvQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay21si33321406edb.575.2021.01.05.05.19.55; Tue, 05 Jan 2021 05:20:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730161AbhAEMac (ORCPT + 99 others); Tue, 5 Jan 2021 07:30:32 -0500 Received: from mga06.intel.com ([134.134.136.31]:61562 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728748AbhAEMab (ORCPT ); Tue, 5 Jan 2021 07:30:31 -0500 IronPort-SDR: 6gVfW9dDPwV8naYPN2hqhZfXbuPpuNvGkUThigIzs+tyxSDR8Q0/RhQEwiSP0GQxV51HP3LDwZ hGCS54KHVbAg== X-IronPort-AV: E=McAfee;i="6000,8403,9854"; a="238648483" X-IronPort-AV: E=Sophos;i="5.78,476,1599548400"; d="scan'208";a="238648483" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2021 04:28:44 -0800 IronPort-SDR: oV0oLDcpmc1m6hLknczWLIBVxARy3d03mwwTfWBlVhQoOM/I6mJq083EN/khUPNLvtl4oJx7Te lk5+boiVwd/w== X-IronPort-AV: E=Sophos;i="5.78,476,1599548400"; d="scan'208";a="378851997" Received: from eliteleevi.tm.intel.com ([10.237.54.20]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2021 04:28:40 -0800 Date: Tue, 5 Jan 2021 14:25:43 +0200 (EET) From: Kai Vehmanen X-X-Sender: kvehmane@eliteleevi.tm.intel.com To: Kai-Heng Feng cc: pierre-louis.bossart@linux.intel.com, lgirdwood@gmail.com, ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com, daniel.baluta@nxp.com, Mark Brown , Jaroslav Kysela , Takashi Iwai , Keyon Jie , Kuninori Morimoto , Marcin Rajwa , Payal Kshirsagar , "moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS" , "moderated list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: Re: [PATCH v2 3/3] ASoC: SOF: Intel: hda: Avoid checking jack on system suspend In-Reply-To: <20210104140853.228448-3-kai.heng.feng@canonical.com> Message-ID: References: <20210104140853.228448-1-kai.heng.feng@canonical.com> <20210104140853.228448-3-kai.heng.feng@canonical.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7 02160 Espoo MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey, On Mon, 4 Jan 2021, Kai-Heng Feng wrote: > System takes a very long time to suspend after commit 215a22ed31a1 > ("ALSA: hda: Refactor codec PM to use direct-complete optimization"): > [ 90.065964] PM: suspend entry (s2idle) the patch itself looks good, but can you explain a bit more in what conditions you hit the delay? I tried to reproduce the delay on multiple systems (with tip of tiwai/master), but with no luck. I can see hda_jackpoll_work() called, but at this point runtime pm has been disabled already (via __device_suspend()) and snd_hdac_is_power_on() will return true even when pm_runtime_suspended() is true as well (which is expected as runtime-pm is disabled at this point for system suspend). End result is codec is not powered up in hda_jackpoll_work() and suspend is not delayed. The patch still seems correct. You would hit the problem you describe if jackpoll_interval was set to a non-zero value (not the case on most systems supported by SOF, but still a possibility). I'm still curious how you hit the problem. At minimum, we are missing a scenario in our testing. Br, Kai