diff mbox series

ASoC: dpcm: remove confusing trace in dpcm_get_be()

Message ID 20200219115048.934678-1-jbrunet@baylibre.com (mailing list archive)
State Accepted
Commit 9d6ee3656a9fbfe906be5ce6f828f1639da1ee7f
Headers show
Series ASoC: dpcm: remove confusing trace in dpcm_get_be() | expand

Commit Message

Jerome Brunet Feb. 19, 2020, 11:50 a.m. UTC
Now that dpcm_get_be() is used in dpcm_end_walk_at_be(), it is not a error
if this function does not find a BE for the provided widget. Remove the
related dev_err() trace which is confusing since things might be working
as expected.

When called from dpcm_add_paths(), it is an error if dpcm_get_be() fails to
find a BE for the provided widget. The necessary error trace is already
done in this case.

Fixes: 027a48387183 ("ASoC: soc-pcm: use dpcm_get_be() at dpcm_end_walk_at_be()")
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 sound/soc/soc-pcm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Pierre-Louis Bossart Feb. 19, 2020, 9:53 p.m. UTC | #1
On 2/19/20 5:50 AM, Jerome Brunet wrote:
> Now that dpcm_get_be() is used in dpcm_end_walk_at_be(), it is not a error
> if this function does not find a BE for the provided widget. Remove the
> related dev_err() trace which is confusing since things might be working
> as expected.
> 
> When called from dpcm_add_paths(), it is an error if dpcm_get_be() fails to
> find a BE for the provided widget. The necessary error trace is already
> done in this case.
> 
> Fixes: 027a48387183 ("ASoC: soc-pcm: use dpcm_get_be() at dpcm_end_walk_at_be()")
> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>

Good catch, this error log is indeed unnecessary, I see more than 30 
lines of 'can't get capture/playback BE' for all the non-BE widgets in 
our topologies (PCM, buffers, PGA, EQ, etc).

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

> ---
>   sound/soc/soc-pcm.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
> index 63f67eb7c077..aff27c8599ef 100644
> --- a/sound/soc/soc-pcm.c
> +++ b/sound/soc/soc-pcm.c
> @@ -1270,9 +1270,7 @@ static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
>   		}
>   	}
>   
> -	/* dai link name and stream name set correctly ? */
> -	dev_err(card->dev, "ASoC: can't get %s BE for %s\n",
> -		stream ? "capture" : "playback", widget->name);
> +	/* Widget provided is not a BE */
>   	return NULL;
>   }
>   
>
Kuninori Morimoto Feb. 20, 2020, 12:02 a.m. UTC | #2
Hi Jerome

Thank you for your patch

> Now that dpcm_get_be() is used in dpcm_end_walk_at_be(), it is not a error
> if this function does not find a BE for the provided widget. Remove the
> related dev_err() trace which is confusing since things might be working
> as expected.
> 
> When called from dpcm_add_paths(), it is an error if dpcm_get_be() fails to
> find a BE for the provided widget. The necessary error trace is already
> done in this case.
> 
> Fixes: 027a48387183 ("ASoC: soc-pcm: use dpcm_get_be() at dpcm_end_walk_at_be()")
> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
> ---

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Thank you for your help !!
Best regards
---
Kuninori Morimoto
diff mbox series

Patch

diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 63f67eb7c077..aff27c8599ef 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -1270,9 +1270,7 @@  static struct snd_soc_pcm_runtime *dpcm_get_be(struct snd_soc_card *card,
 		}
 	}
 
-	/* dai link name and stream name set correctly ? */
-	dev_err(card->dev, "ASoC: can't get %s BE for %s\n",
-		stream ? "capture" : "playback", widget->name);
+	/* Widget provided is not a BE */
 	return NULL;
 }