* [PATCH AUTOSEL 5.9 039/147] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work
[not found] <20201026234905.1022767-1-sashal@kernel.org>
@ 2020-10-26 23:47 ` Sasha Levin
2020-11-05 13:48 ` Build error with 5.9.5 in sound/soc/sof/intel/hda-codec.c (was: [PATCH AUTOSEL 5.9 039/147] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work) Thorsten Leemhuis
2020-10-26 23:47 ` [PATCH AUTOSEL 5.9 043/147] ASoC: AMD: Clean kernel log from deferred probe error messages Sasha Levin
1 sibling, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2020-10-26 23:47 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sasha Levin, Guennadi Liakhovetski, alsa-devel, Ranjani Sridharan,
Pierre-Louis Bossart, Mark Brown, Rander Wang, Bard Liao,
sound-open-firmware
From: Rander Wang <rander.wang@intel.com>
[ 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 <rander.wang@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200825235040.1586478-3-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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;
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH AUTOSEL 5.9 043/147] ASoC: AMD: Clean kernel log from deferred probe error messages
[not found] <20201026234905.1022767-1-sashal@kernel.org>
2020-10-26 23:47 ` [PATCH AUTOSEL 5.9 039/147] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work Sasha Levin
@ 2020-10-26 23:47 ` Sasha Levin
1 sibling, 0 replies; 5+ messages in thread
From: Sasha Levin @ 2020-10-26 23:47 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Sasha Levin, alsa-devel, Mark Brown, Akshu Agrawal
From: Akshu Agrawal <akshu.agrawal@amd.com>
[ Upstream commit f7660445c8e7fda91e8b944128554249d886b1d4 ]
While the driver waits for DAIs to be probed and retries probing,
have the error messages at debug level instead of error.
Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Link: https://lore.kernel.org/r/20200826185454.5545-1-akshu.agrawal@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/amd/acp3x-rt5682-max9836.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/sound/soc/amd/acp3x-rt5682-max9836.c b/sound/soc/amd/acp3x-rt5682-max9836.c
index 406526e79af34..1a4e8ca0f99c2 100644
--- a/sound/soc/amd/acp3x-rt5682-max9836.c
+++ b/sound/soc/amd/acp3x-rt5682-max9836.c
@@ -472,12 +472,17 @@ static int acp3x_probe(struct platform_device *pdev)
ret = devm_snd_soc_register_card(&pdev->dev, card);
if (ret) {
- dev_err(&pdev->dev,
+ if (ret != -EPROBE_DEFER)
+ dev_err(&pdev->dev,
"devm_snd_soc_register_card(%s) failed: %d\n",
card->name, ret);
- return ret;
+ else
+ dev_dbg(&pdev->dev,
+ "devm_snd_soc_register_card(%s) probe deferred: %d\n",
+ card->name, ret);
}
- return 0;
+
+ return ret;
}
static const struct acpi_device_id acp3x_audio_acpi_match[] = {
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Build error with 5.9.5 in sound/soc/sof/intel/hda-codec.c (was: [PATCH AUTOSEL 5.9 039/147] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work)
2020-10-26 23:47 ` [PATCH AUTOSEL 5.9 039/147] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work Sasha Levin
@ 2020-11-05 13:48 ` Thorsten Leemhuis
2020-11-05 15:40 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Thorsten Leemhuis @ 2020-11-05 13:48 UTC (permalink / raw)
To: Sasha Levin, linux-kernel, stable
Cc: Guennadi Liakhovetski, alsa-devel, Ranjani Sridharan,
Pierre-Louis Bossart, Mark Brown, Rander Wang, Bard Liao,
sound-open-firmware
Lo! I just tried to compile 5.9.5 and ran into a build error with below
patch. I only did a quick look (I have to leave the keyboard soon), but
seems the patch quoted below that was added to 5.9.5 depends on
11ec0edc6408 (git.kernel.org/linus/11ec0edc6408) which wasn't backported.
The build error can be found here:
https://kojipkgs.fedoraproject.org//work/tasks/8246/54978246/build.log
Relevant part:
+ make -s 'HOSTCFLAGS=-O2 -flto=auto -ffat-lto-objects -fexceptions -g
-grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fcommon -m64
-mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection'
'HOSTLDFLAGS=-Wl,-z,relro -Wl,--as-needed -Wl,-z,now
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' ARCH=x86_64 'KCFLAGS= '
WITH_GCOV=0 -j48 modules
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[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:500: sound/soc/sof] Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [scripts/Makefile.build:500: sound/soc] Error 2
make: *** [Makefile:1784: sound] Error 2
make: *** Waiting for unfinished jobs....
+ exit 1
Looks like the compiler is right from a quick look at
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/sound/soc/sof/intel/hda-codec.c?h=linux-5.9.y&id=43836fdc9e318a11233cf19c5ee7ffb04e8e5d8f
But as I said, I lack the time for a closer look.
Ciao, Thorsten
Am 27.10.20 um 00:47 schrieb Sasha Levin:
> From: Rander Wang <rander.wang@intel.com>
>
> [ 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 <rander.wang@intel.com>
> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
> Link: https://lore.kernel.org/r/20200825235040.1586478-3-ranjani.sridharan@linux.intel.com
> Signed-off-by: Mark Brown <broonie@kernel.org>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> 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;
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Build error with 5.9.5 in sound/soc/sof/intel/hda-codec.c (was: [PATCH AUTOSEL 5.9 039/147] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work)
2020-11-05 13:48 ` Build error with 5.9.5 in sound/soc/sof/intel/hda-codec.c (was: [PATCH AUTOSEL 5.9 039/147] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work) Thorsten Leemhuis
@ 2020-11-05 15:40 ` Greg KH
2020-11-05 21:18 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2020-11-05 15:40 UTC (permalink / raw)
To: Thorsten Leemhuis
Cc: Sasha Levin, Guennadi Liakhovetski, alsa-devel,
Pierre-Louis Bossart, stable, linux-kernel, Mark Brown,
Ranjani Sridharan, Rander Wang, Bard Liao, sound-open-firmware
On Thu, Nov 05, 2020 at 02:48:33PM +0100, Thorsten Leemhuis wrote:
> Lo! I just tried to compile 5.9.5 and ran into a build error with below
> patch. I only did a quick look (I have to leave the keyboard soon), but
> seems the patch quoted below that was added to 5.9.5 depends on 11ec0edc6408
> (git.kernel.org/linus/11ec0edc6408) which wasn't backported.
>
> The build error can be found here:
> https://kojipkgs.fedoraproject.org//work/tasks/8246/54978246/build.log
>
> Relevant part:
>
> + make -s 'HOSTCFLAGS=-O2 -flto=auto -ffat-lto-objects -fexceptions -g
> -grecord-gcc-switches -pipe -Wall -Werror=format-security
> -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
> -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
> -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fcommon -m64 -mtune=generic
> -fasynchronous-unwind-tables -fstack-clash-protection'
> 'HOSTLDFLAGS=-Wl,-z,relro -Wl,--as-needed -Wl,-z,now
> -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' ARCH=x86_64 'KCFLAGS= '
> WITH_GCOV=0 -j48 modules
> 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[3]: *** Waiting for unfinished jobs....
> make[2]: *** [scripts/Makefile.build:500: sound/soc/sof] Error 2
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [scripts/Makefile.build:500: sound/soc] Error 2
> make: *** [Makefile:1784: sound] Error 2
> make: *** Waiting for unfinished jobs....
> + exit 1
>
> Looks like the compiler is right from a quick look at
> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/sound/soc/sof/intel/hda-codec.c?h=linux-5.9.y&id=43836fdc9e318a11233cf19c5ee7ffb04e8e5d8f
>
> But as I said, I lack the time for a closer look.
Thanks, people are looking at it already:
https://lore.kernel.org/r/1f0c6a62-5208-801d-d7c2-725ee8da19b2@linux.intel.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Build error with 5.9.5 in sound/soc/sof/intel/hda-codec.c (was: [PATCH AUTOSEL 5.9 039/147] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work)
2020-11-05 15:40 ` Greg KH
@ 2020-11-05 21:18 ` Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2020-11-05 21:18 UTC (permalink / raw)
To: Thorsten Leemhuis
Cc: Sasha Levin, Guennadi Liakhovetski, alsa-devel,
Pierre-Louis Bossart, stable, linux-kernel, Mark Brown,
Ranjani Sridharan, Rander Wang, Bard Liao, sound-open-firmware
On Thu, Nov 05, 2020 at 04:40:01PM +0100, Greg KH wrote:
> On Thu, Nov 05, 2020 at 02:48:33PM +0100, Thorsten Leemhuis wrote:
> > Lo! I just tried to compile 5.9.5 and ran into a build error with below
> > patch. I only did a quick look (I have to leave the keyboard soon), but
> > seems the patch quoted below that was added to 5.9.5 depends on 11ec0edc6408
> > (git.kernel.org/linus/11ec0edc6408) which wasn't backported.
> >
> > The build error can be found here:
> > https://kojipkgs.fedoraproject.org//work/tasks/8246/54978246/build.log
> >
> > Relevant part:
> >
> > + make -s 'HOSTCFLAGS=-O2 -flto=auto -ffat-lto-objects -fexceptions -g
> > -grecord-gcc-switches -pipe -Wall -Werror=format-security
> > -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS
> > -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
> > -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fcommon -m64 -mtune=generic
> > -fasynchronous-unwind-tables -fstack-clash-protection'
> > 'HOSTLDFLAGS=-Wl,-z,relro -Wl,--as-needed -Wl,-z,now
> > -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' ARCH=x86_64 'KCFLAGS= '
> > WITH_GCOV=0 -j48 modules
> > 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[3]: *** Waiting for unfinished jobs....
> > make[2]: *** [scripts/Makefile.build:500: sound/soc/sof] Error 2
> > make[2]: *** Waiting for unfinished jobs....
> > make[1]: *** [scripts/Makefile.build:500: sound/soc] Error 2
> > make: *** [Makefile:1784: sound] Error 2
> > make: *** Waiting for unfinished jobs....
> > + exit 1
> >
> > Looks like the compiler is right from a quick look at
> > https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/sound/soc/sof/intel/hda-codec.c?h=linux-5.9.y&id=43836fdc9e318a11233cf19c5ee7ffb04e8e5d8f
> >
> > But as I said, I lack the time for a closer look.
>
> Thanks, people are looking at it already:
> https://lore.kernel.org/r/1f0c6a62-5208-801d-d7c2-725ee8da19b2@linux.intel.com
Should now be fixed in 5.9.6.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-11-06 8:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20201026234905.1022767-1-sashal@kernel.org>
2020-10-26 23:47 ` [PATCH AUTOSEL 5.9 039/147] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work Sasha Levin
2020-11-05 13:48 ` Build error with 5.9.5 in sound/soc/sof/intel/hda-codec.c (was: [PATCH AUTOSEL 5.9 039/147] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesn't work) Thorsten Leemhuis
2020-11-05 15:40 ` Greg KH
2020-11-05 21:18 ` Greg KH
2020-10-26 23:47 ` [PATCH AUTOSEL 5.9 043/147] ASoC: AMD: Clean kernel log from deferred probe error messages Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).