Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp816485pxb; Thu, 28 Jan 2021 00:23:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJyCJkf6CFPMuYjz23UKDgx4rIw88k9RG7eHUKSjNCBy8O0w+ksFA+n2h/m0pmh9jzm/Ts/U X-Received: by 2002:a05:6402:79a:: with SMTP id d26mr12522794edy.266.1611822187043; Thu, 28 Jan 2021 00:23:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611822187; cv=none; d=google.com; s=arc-20160816; b=FjdQE6gCvvYF6Yen63FgpYagjp3oZmeu8qEZXZ6E4ClpGx9tAhYaAB5vHY2pXFga5P 67FUs4/OT27516txbgCZ+z0dG+96J4iSmGuWXSY/4kVJeJzbrfDSlnbj/iR5u09lwR81 fUFPXDia9Uqqa4HkmKa/ORtsCHTeYbP9zJJRJOcve4CQ8bTrwVhR0DgVOhyYkuYEBT4+ ATktcSgzr791cDvgRrGljPzeW/d/AmEGa6DOZR/JzDoxH333nuY10dDsyCLTdM7qvHGQ q5niCWKAhWKk1j0D2sKqNZuWH136SmVzRopGyUKIM4GSFYvSiOn1486EkEQPng//BvGX yPcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date; bh=wUYmGkjqP9lvxS/+8rVa/UZyHbOfEmszmtW+Jfvm/Sk=; b=yXhkDe6FYE3p1WPoVm2HAarXGwlYE9kufGokwA9Vdqxpk2GX2LRTwA8GpDxODTsnsh 1ZSav1FWMHFFcJ8awk90AHXCwQpbuS2Jq1+gQhOY5iuU2678y+YWvIinzzqb2IArqjdU UHJyn/7Ri+tf7mFyuk48VpqihJgwDPsoIQXH7dFVD3lQBzsOQQBBZ49UiXvvgn5afgB+ +lysASuSyO1rPsQy+hX167bBDsBMsxm+H8YucZGkBYwrrvMt6fZo/Vu7xIAVTayW7+4A hp0oUPSzmstYXrv/boO7WW2TFTxhMO8KHcaZqceMN4AXcbylKVc8NpNEeAefrUPsyPpQ vPkQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f16si2607731edy.306.2021.01.28.00.22.42; Thu, 28 Jan 2021 00:23:07 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231545AbhA1IVG (ORCPT + 99 others); Thu, 28 Jan 2021 03:21:06 -0500 Received: from mx2.suse.de ([195.135.220.15]:44112 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231725AbhA1IUk (ORCPT ); Thu, 28 Jan 2021 03:20:40 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 7C593AEDA; Thu, 28 Jan 2021 08:19:58 +0000 (UTC) Date: Thu, 28 Jan 2021 09:19:58 +0100 Message-ID: From: Takashi Iwai To: Kai-Heng Feng Cc: "Rafael J. Wysocki" , "Kenneth R . Crudup" , Pavel Machek , Len Brown , Greg Kroah-Hartman , "open list:HIBERNATION (aka Software Suspend, aka swsusp)" , open list Subject: Re: [PATCH] PM: sleep: core: Resume suspended device if direct-complete is disabled In-Reply-To: References: <20201231060319.137133-1-kai.heng.feng@canonical.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/25.3 (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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 28 Jan 2021 09:15:10 +0100, Kai-Heng Feng wrote: > > On Thu, Jan 28, 2021 at 4:09 PM Takashi Iwai wrote: > > > > On Thu, 31 Dec 2020 07:03:19 +0100, > > Kai-Heng Feng wrote: > > > > > > HDA controller can't be runtime-suspended after commit 215a22ed31a1 > > > ("ALSA: hda: Refactor codjc PM to use direct-complete optimization"), > > > which enables direct-complete for HDA codec. > > > > > > The HDA codec driver doesn't expect direct-complete will be disabled > > > after it returns a positive value from prepare() callback. So freeze() > > > is called directly when it's runtime-suspended, breaks the balance of > > > its internal codec_powered counting. > > > > > > So if a device is prepared for direct-complete but PM core breaks the > > > assumption, resume the device to keep PM operations balanced. > > > > > > Fixes: 215a22ed31a1 ("ALSA: hda: Refactor codec PM to use direct-complete optimization") > > > Signed-off-by: Kai-Heng Feng > > > > Kai-Heng, is this fix still needed for 5.11? > > No it's not needed anymore because "ALSA: hda: Balance runtime/system > PM if direct-complete is disabled" is in place. > > > > > The description mentions about HD-audio controller, while the recent > > revert was the HD-audio codec, so I suppose it's still affected? > > Not affected anymore if above mentioned patch is applied. OK, thanks for clarification! Takashi