All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: soc-pcm: change error message to debug message
@ 2021-02-08  8:12 Shengjiu Wang
  2021-02-08 15:06 ` Pierre-Louis Bossart
  2021-02-10 20:11 ` Mark Brown
  0 siblings, 2 replies; 9+ messages in thread
From: Shengjiu Wang @ 2021-02-08  8:12 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, alsa-devel, linux-kernel

This log message should be a debug message, because it
doesn't return directly but continue next loop.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
 sound/soc/soc-pcm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 605acec48971..cd9e919d7b99 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1344,8 +1344,8 @@ static int dpcm_add_paths(struct snd_soc_pcm_runtime *fe, int stream,
 		/* is there a valid BE rtd for this widget */
 		be = dpcm_get_be(card, widget, stream);
 		if (!be) {
-			dev_err(fe->dev, "ASoC: no BE found for %s\n",
-					widget->name);
+			dev_dbg(fe->dev, "ASoC: no BE found for %s\n",
+				widget->name);
 			continue;
 		}
 
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: soc-pcm: change error message to debug message
  2021-02-08  8:12 [PATCH] ASoC: soc-pcm: change error message to debug message Shengjiu Wang
@ 2021-02-08 15:06 ` Pierre-Louis Bossart
  2021-02-09  7:37     ` Shengjiu Wang
  2021-02-09 22:23     ` Mark Brown
  2021-02-10 20:11 ` Mark Brown
  1 sibling, 2 replies; 9+ messages in thread
From: Pierre-Louis Bossart @ 2021-02-08 15:06 UTC (permalink / raw)
  To: Shengjiu Wang, lgirdwood, broonie, perex, tiwai, alsa-devel,
	linux-kernel



On 2/8/21 2:12 AM, Shengjiu Wang wrote:
> This log message should be a debug message, because it
> doesn't return directly but continue next loop.
> 
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---
>   sound/soc/soc-pcm.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
> index 605acec48971..cd9e919d7b99 100644
> --- a/sound/soc/soc-pcm.c
> +++ b/sound/soc/soc-pcm.c
> @@ -1344,8 +1344,8 @@ static int dpcm_add_paths(struct snd_soc_pcm_runtime *fe, int stream,
>   		/* is there a valid BE rtd for this widget */
>   		be = dpcm_get_be(card, widget, stream);
>   		if (!be) {
> -			dev_err(fe->dev, "ASoC: no BE found for %s\n",
> -					widget->name);
> +			dev_dbg(fe->dev, "ASoC: no BE found for %s\n",
> +				widget->name);

Do we really want to do this?

This error message has historically been the means by which we detect 
that userspace didn't set the right mixers (e.g. on Intel Baytrail) or 
the topology was incorrect. And it's really an error in the sense that 
you will not get audio in or out.

If you demote this to dev_dbg, we'll have to ask every single user who 
reports 'sound is broken' to enable dynamic debug traces. I really don't 
see the benefit, this is a clear case of 'fail big and fail early', 
partly concealing the problem doesn't make it go away but harder to 
diagnose.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: soc-pcm: change error message to debug message
  2021-02-08 15:06 ` Pierre-Louis Bossart
@ 2021-02-09  7:37     ` Shengjiu Wang
  2021-02-09 22:23     ` Mark Brown
  1 sibling, 0 replies; 9+ messages in thread
From: Shengjiu Wang @ 2021-02-09  7:37 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: Shengjiu Wang, Liam Girdwood, Mark Brown, perex, Takashi Iwai,
	alsa-devel, linux-kernel

On Tue, Feb 9, 2021 at 12:39 AM Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
>
>
>
> On 2/8/21 2:12 AM, Shengjiu Wang wrote:
> > This log message should be a debug message, because it
> > doesn't return directly but continue next loop.
> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > ---
> >   sound/soc/soc-pcm.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
> > index 605acec48971..cd9e919d7b99 100644
> > --- a/sound/soc/soc-pcm.c
> > +++ b/sound/soc/soc-pcm.c
> > @@ -1344,8 +1344,8 @@ static int dpcm_add_paths(struct snd_soc_pcm_runtime *fe, int stream,
> >               /* is there a valid BE rtd for this widget */
> >               be = dpcm_get_be(card, widget, stream);
> >               if (!be) {
> > -                     dev_err(fe->dev, "ASoC: no BE found for %s\n",
> > -                                     widget->name);
> > +                     dev_dbg(fe->dev, "ASoC: no BE found for %s\n",
> > +                             widget->name);
>
> Do we really want to do this?
>
> This error message has historically been the means by which we detect
> that userspace didn't set the right mixers (e.g. on Intel Baytrail) or
> the topology was incorrect. And it's really an error in the sense that
> you will not get audio in or out.
>
> If you demote this to dev_dbg, we'll have to ask every single user who
> reports 'sound is broken' to enable dynamic debug traces. I really don't
> see the benefit, this is a clear case of 'fail big and fail early',
> partly concealing the problem doesn't make it go away but harder to
> diagnose.

Thanks for the explanation,  it seems I misunderstood this error message.

Best regards
Wang shengjiu

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: soc-pcm: change error message to debug message
@ 2021-02-09  7:37     ` Shengjiu Wang
  0 siblings, 0 replies; 9+ messages in thread
From: Shengjiu Wang @ 2021-02-09  7:37 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: alsa-devel, linux-kernel, Shengjiu Wang, Takashi Iwai,
	Liam Girdwood, Mark Brown

On Tue, Feb 9, 2021 at 12:39 AM Pierre-Louis Bossart
<pierre-louis.bossart@linux.intel.com> wrote:
>
>
>
> On 2/8/21 2:12 AM, Shengjiu Wang wrote:
> > This log message should be a debug message, because it
> > doesn't return directly but continue next loop.
> >
> > Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> > ---
> >   sound/soc/soc-pcm.c | 4 ++--
> >   1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
> > index 605acec48971..cd9e919d7b99 100644
> > --- a/sound/soc/soc-pcm.c
> > +++ b/sound/soc/soc-pcm.c
> > @@ -1344,8 +1344,8 @@ static int dpcm_add_paths(struct snd_soc_pcm_runtime *fe, int stream,
> >               /* is there a valid BE rtd for this widget */
> >               be = dpcm_get_be(card, widget, stream);
> >               if (!be) {
> > -                     dev_err(fe->dev, "ASoC: no BE found for %s\n",
> > -                                     widget->name);
> > +                     dev_dbg(fe->dev, "ASoC: no BE found for %s\n",
> > +                             widget->name);
>
> Do we really want to do this?
>
> This error message has historically been the means by which we detect
> that userspace didn't set the right mixers (e.g. on Intel Baytrail) or
> the topology was incorrect. And it's really an error in the sense that
> you will not get audio in or out.
>
> If you demote this to dev_dbg, we'll have to ask every single user who
> reports 'sound is broken' to enable dynamic debug traces. I really don't
> see the benefit, this is a clear case of 'fail big and fail early',
> partly concealing the problem doesn't make it go away but harder to
> diagnose.

Thanks for the explanation,  it seems I misunderstood this error message.

Best regards
Wang shengjiu

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: soc-pcm: change error message to debug message
  2021-02-08 15:06 ` Pierre-Louis Bossart
@ 2021-02-09 22:23     ` Mark Brown
  2021-02-09 22:23     ` Mark Brown
  1 sibling, 0 replies; 9+ messages in thread
From: Mark Brown @ 2021-02-09 22:23 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: Shengjiu Wang, lgirdwood, perex, tiwai, alsa-devel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]

On Mon, Feb 08, 2021 at 09:06:44AM -0600, Pierre-Louis Bossart wrote:

> If you demote this to dev_dbg, we'll have to ask every single user who
> reports 'sound is broken' to enable dynamic debug traces. I really don't see
> the benefit, this is a clear case of 'fail big and fail early', partly
> concealing the problem doesn't make it go away but harder to diagnose.

Don't you also get the same information out of the DAPM debugfs or did
I misread where the error is generated from?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: soc-pcm: change error message to debug message
@ 2021-02-09 22:23     ` Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2021-02-09 22:23 UTC (permalink / raw)
  To: Pierre-Louis Bossart
  Cc: alsa-devel, lgirdwood, Shengjiu Wang, linux-kernel, tiwai

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]

On Mon, Feb 08, 2021 at 09:06:44AM -0600, Pierre-Louis Bossart wrote:

> If you demote this to dev_dbg, we'll have to ask every single user who
> reports 'sound is broken' to enable dynamic debug traces. I really don't see
> the benefit, this is a clear case of 'fail big and fail early', partly
> concealing the problem doesn't make it go away but harder to diagnose.

Don't you also get the same information out of the DAPM debugfs or did
I misread where the error is generated from?

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: soc-pcm: change error message to debug message
  2021-02-09 22:23     ` Mark Brown
@ 2021-02-09 23:05       ` Pierre-Louis Bossart
  -1 siblings, 0 replies; 9+ messages in thread
From: Pierre-Louis Bossart @ 2021-02-09 23:05 UTC (permalink / raw)
  To: Mark Brown
  Cc: Shengjiu Wang, lgirdwood, perex, tiwai, alsa-devel, linux-kernel



On 2/9/21 4:23 PM, Mark Brown wrote:
> On Mon, Feb 08, 2021 at 09:06:44AM -0600, Pierre-Louis Bossart wrote:
> 
>> If you demote this to dev_dbg, we'll have to ask every single user who
>> reports 'sound is broken' to enable dynamic debug traces. I really don't see
>> the benefit, this is a clear case of 'fail big and fail early', partly
>> concealing the problem doesn't make it go away but harder to diagnose.
> 
> Don't you also get the same information out of the DAPM debugfs or did
> I misread where the error is generated from?

I re-checked and I will back-pedal on my comment. I confused this error 
message with the classic "ASoC: no backend DAIs enabled for %s".

I didn't find a single occurrence of this "ASoC: no BE found for %s" in 
any bug report or Google search.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: soc-pcm: change error message to debug message
@ 2021-02-09 23:05       ` Pierre-Louis Bossart
  0 siblings, 0 replies; 9+ messages in thread
From: Pierre-Louis Bossart @ 2021-02-09 23:05 UTC (permalink / raw)
  To: Mark Brown; +Cc: alsa-devel, lgirdwood, Shengjiu Wang, linux-kernel, tiwai



On 2/9/21 4:23 PM, Mark Brown wrote:
> On Mon, Feb 08, 2021 at 09:06:44AM -0600, Pierre-Louis Bossart wrote:
> 
>> If you demote this to dev_dbg, we'll have to ask every single user who
>> reports 'sound is broken' to enable dynamic debug traces. I really don't see
>> the benefit, this is a clear case of 'fail big and fail early', partly
>> concealing the problem doesn't make it go away but harder to diagnose.
> 
> Don't you also get the same information out of the DAPM debugfs or did
> I misread where the error is generated from?

I re-checked and I will back-pedal on my comment. I confused this error 
message with the classic "ASoC: no backend DAIs enabled for %s".

I didn't find a single occurrence of this "ASoC: no BE found for %s" in 
any bug report or Google search.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] ASoC: soc-pcm: change error message to debug message
  2021-02-08  8:12 [PATCH] ASoC: soc-pcm: change error message to debug message Shengjiu Wang
  2021-02-08 15:06 ` Pierre-Louis Bossart
@ 2021-02-10 20:11 ` Mark Brown
  1 sibling, 0 replies; 9+ messages in thread
From: Mark Brown @ 2021-02-10 20:11 UTC (permalink / raw)
  To: perex, Shengjiu Wang, lgirdwood, linux-kernel, alsa-devel, tiwai

On Mon, 8 Feb 2021 16:12:45 +0800, Shengjiu Wang wrote:
> This log message should be a debug message, because it
> doesn't return directly but continue next loop.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/1] ASoC: soc-pcm: change error message to debug message
      commit: b6eabd247db8bb2d013fb9a9451ecb04a44ee58f

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-02-10 20:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-08  8:12 [PATCH] ASoC: soc-pcm: change error message to debug message Shengjiu Wang
2021-02-08 15:06 ` Pierre-Louis Bossart
2021-02-09  7:37   ` Shengjiu Wang
2021-02-09  7:37     ` Shengjiu Wang
2021-02-09 22:23   ` Mark Brown
2021-02-09 22:23     ` Mark Brown
2021-02-09 23:05     ` Pierre-Louis Bossart
2021-02-09 23:05       ` Pierre-Louis Bossart
2021-02-10 20:11 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.