Re: [PATCH 5.9 080/391] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesnt work
On Thu, Nov 05, 2020 at 10:17:57AM -0600, Pierre-Louis Bossart wrote: > > > > > > 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. > > > > > > this issue comes from out-of-order patches, give me a couple of > > > hours to look into this before reverting. thanks! > > > > Sure! Thanks for looking into this. > > I would recommend adding this commit to 5.9-stable: > > 11ec0edc6408a ('ASOC: SOF: Intel: hda-codec: move unused label to correct > position') > > I just tried with 5.9.5 and the compilation error is solved with this > commit. > > It was initially intended to solve a minor 'defined but not used' issue, > which somehow became a bad 'used but not defined' one. Probably a bad git > merge I did, sorry about that. Will go do that now and push out a new release, thanks! greg k-h
Re: [PATCH 5.9 080/391] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesnt work
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. this issue comes from out-of-order patches, give me a couple of hours to look into this before reverting. thanks! Sure! Thanks for looking into this. I would recommend adding this commit to 5.9-stable: 11ec0edc6408a ('ASOC: SOF: Intel: hda-codec: move unused label to correct position') I just tried with 5.9.5 and the compilation error is solved with this commit. It was initially intended to solve a minor 'defined but not used' issue, which somehow became a bad 'used but not defined' one. Probably a bad git merge I did, sorry about that. Thanks! -Pierre
Re: [PATCH 5.9 080/391] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesnt work
On Thu, Nov 05, 2020 at 08:47:57AM -0600, Pierre-Louis Bossart wrote: On 11/5/20 8:35 AM, Sasha Levin wrote: 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.sridha...@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. this issue comes from out-of-order patches, give me a couple of hours to look into this before reverting. thanks! Sure! Thanks for looking into this. -- Thanks, Sasha
Re: [PATCH 5.9 080/391] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesnt work
On 11/5/20 8:35 AM, Sasha Levin wrote: 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.sridha...@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. this issue comes from out-of-order patches, give me a couple of hours to look into this before reverting. thanks!
Re: [PATCH 5.9 080/391] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesnt work
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.sridha...@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
Re: [PATCH 5.9 080/391] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesnt work
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.sridha...@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? Thanks, Paul Bolle
[PATCH 5.9 080/391] ASoC: SOF: fix a runtime pm issue in SOF when HDMI codec doesnt work
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.sridha...@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; -- 2.27.0