Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp533798pxb; Thu, 5 Nov 2020 06:39:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJzEcoeP5sP6V91nX1GSsHKKP+TENCmt5Ua8AwbP/OeIbdwfNZVqT6g31WhXPsQW0YaFn0yk X-Received: by 2002:a17:906:6987:: with SMTP id i7mr2739577ejr.18.1604587178693; Thu, 05 Nov 2020 06:39:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604587178; cv=none; d=google.com; s=arc-20160816; b=WULJzLap/ldUJllm0r4Fp/ur8XzZtGQxGWNqN1twVZ4O+kEVst4skwwHh2h7OozY2K i+4KFViUL+Y0HFo+ckb1wTgiyOhq7j0oGVBTvMeF6b2L1kGoL0uZXBwK6BbmIWxIstqr v7ZbNwhHli4O43+ExX52/ZgJDWmV4XMzFUghAN0FnKw9Ptgchagvr+pcSHo7j3OVD+Qy l3K27+tBblMrTNI7mo5l9NlsjRPXGdRk5WeMVPzlSSIrctdIbVUgUqbWutfQuyKA3Vz6 a4RmOqXGcleXFJYhczZfXMSYHUf9a2v2K7AsGTBtBl+Bb0iEYKnpuIitgIpShuoby36q DtcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=DmPisG1zNnU48ZfdH2o0lQ8prgiy1mFUVXUXdMc3wSI=; b=AAyvYMj18KLj9QiPiHiuO/tZzgliSAWRKDU4iFkXqVaY5tnEWKOFaUbrI7aQYQM12f OKs6e9WbySWcbSjFqWy+/ILglpF8v3BXnRAk7Igp7m3iakCP6vLYU9GgBGFjrz2+rnml 8ig9PGTqdjuc7rDtVm+ILgPYwXhlsSUGSjmKDE2Zg42JqfZUBB8nlA4zRhcWggWwdHUP /kA8pz3faGDYdxUvFKGIDck9j+3MIovdNOdvenVn9Wf8OMNwgagwQ5PQvhvBKfe18fNO nylvaP2T1/27+V7jCX0ZcMnMIYk9IcgoSLYqx+mXfpHpKI0irDdqRDDNybcHsgpA9Wqr GdAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kKBwXk3B; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m4si1263788edp.439.2020.11.05.06.39.14; Thu, 05 Nov 2020 06:39:38 -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; dkim=pass header.i=@kernel.org header.s=default header.b=kKBwXk3B; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730960AbgKEOf4 (ORCPT + 99 others); Thu, 5 Nov 2020 09:35:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:46308 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726874AbgKEOfz (ORCPT ); Thu, 5 Nov 2020 09:35:55 -0500 Received: from localhost (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C5EE22078E; Thu, 5 Nov 2020 14:35:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604586955; bh=koczk0h3+aDrB9Ca+JmHyqTqMhq2kIrm4R015M/HJ/Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kKBwXk3B8KxkvQG9GhCCbGla8J26xCjbh4VFwWKX9F77ErtYQVK6QeT8xrfQAaP8T EVaTHdzMp+e0HonLp01wH4DaoaipM2c878cnCQW2xUxjOw6+oQhkJmpsfvVj3bGvMq NLVs4JBJJznPkkW6VOAaDH2w+tZR3qsXPTQHUYw8= Date: Thu, 5 Nov 2020 09:35:51 -0500 From: Sasha Levin To: Paul Bolle Cc: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Rander Wang , Pierre-Louis Bossart , Bard Liao , Guennadi Liakhovetski , Ranjani Sridharan , Mark Brown Subject: Re: [PATCH 5.9 080/391] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesnt work Message-ID: <20201105143551.GH2092@sasha-vm> References: <20201103203348.153465465@linuxfoundation.org> <20201103203352.505472614@linuxfoundation.org> <64a618a3cc00de4a1c3887b57447906351db77b9.camel@tiscali.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <64a618a3cc00de4a1c3887b57447906351db77b9.camel@tiscali.nl> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 05, 2020 at 02:23:35PM +0100, Paul Bolle wrote: >Greg Kroah-Hartman schreef op di 03-11-2020 om 21:32 [+0100]: >> From: Rander Wang >> >> [ Upstream commit 6c63c954e1c52f1262f986f36d95f557c6f8fa94 ] >> >> When hda_codec_probe() doesn't initialize audio component, we disable >> the codec and keep going. However,the resources are not released. The >> child_count of SOF device is increased in snd_hdac_ext_bus_device_init >> but is not decrease in error case, so SOF can't get suspended. >> >> snd_hdac_ext_bus_device_exit will be invoked in HDA framework if it >> gets a error. Now copy this behavior to release resources and decrease >> SOF device child_count to release SOF device. >> >> Signed-off-by: Rander Wang >> Reviewed-by: Pierre-Louis Bossart >> Reviewed-by: Bard Liao >> Reviewed-by: Guennadi Liakhovetski >> Signed-off-by: Ranjani Sridharan >> Link: https://lore.kernel.org/r/20200825235040.1586478-3-ranjani.sridharan@linux.intel.com >> Signed-off-by: Mark Brown >> Signed-off-by: Sasha Levin >> --- >> sound/soc/sof/intel/hda-codec.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/sound/soc/sof/intel/hda-codec.c b/sound/soc/sof/intel/hda-codec.c >> index 2c5c451fa19d7..c475955c6eeba 100644 >> --- a/sound/soc/sof/intel/hda-codec.c >> +++ b/sound/soc/sof/intel/hda-codec.c >> @@ -151,7 +151,7 @@ static int hda_codec_probe(struct snd_sof_dev *sdev, int address, >> if (!hdev->bus->audio_component) { >> dev_dbg(sdev->dev, >> "iDisp hw present but no driver\n"); >> - return -ENOENT; >> + goto error; >> } >> hda_priv->need_display_power = true; >> } >> @@ -174,7 +174,7 @@ static int hda_codec_probe(struct snd_sof_dev *sdev, int address, >> * other return codes without modification >> */ >> if (ret == 0) >> - ret = -ENOENT; >> + goto error; >> } >> >> return ret; > >My local build of v5.9.5 broke on this patch. > >sound/soc/sof/intel/hda-codec.c: In function 'hda_codec_probe': >sound/soc/sof/intel/hda-codec.c:177:4: error: label 'error' used but not defined > 177 | goto error; > | ^~~~ >make[4]: *** [scripts/Makefile.build:283: sound/soc/sof/intel/hda-codec.o] Error 1 >make[3]: *** [scripts/Makefile.build:500: sound/soc/sof/intel] Error 2 >make[2]: *** [scripts/Makefile.build:500: sound/soc/sof] Error 2 >make[1]: *** [scripts/Makefile.build:500: sound/soc] Error 2 >make: *** [Makefile:1778: sound] Error 2 > >There's indeed no error label in v5.9.5. (There is one in v5.10-rc2, I just >checked.) Is no-one else running into this? It seems that setting CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC=y is very "difficult", it's not being set by allmodconfig nor is it easy to manually set it up. I'll revert the patch, but it would be nice to make sure it's easier to test this out too. -- Thanks, Sasha