Message ID | 20241231033841.6213-3-gordoste@iinet.net.au (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Minor debugging improvements | expand |
Hi Stephen > It is handy to know whether the link is playback-only/capture-only when > debugging. > > Signed-off-by: Stephen Gordon <gordoste@iinet.net.au> > --- > include/sound/simple_card_utils.h | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h > index af79f680c72a..fc149fc18ad6 100644 > --- a/include/sound/simple_card_utils.h > +++ b/include/sound/simple_card_utils.h > @@ -267,6 +267,9 @@ static inline void simple_util_debug_info(struct simple_util_priv *priv) > dev_dbg(dev, "link name = %s\n", link->name); > if (link->dai_fmt) > dev_dbg(dev, "link format = %04x\n", link->dai_fmt); > + if (link->playback_only || link->capture_only) > + dev_dbg(dev, "link is %s only", > + link->playback_only ? "PLAYBACK" : "CAPTURE"); > if (props->adata.convert_rate) > dev_dbg(dev, "convert_rate = %d\n", props->adata.convert_rate); > if (props->adata.convert_channels) I like this instead. It will be less misunderstand. if (link->playback_only) dev_dbg(dev, "link has playback_only"); if (link->capture_only) dev_dbg(dev, "link has capture_only"); Please add "To: Mark Brown <broonie@kernel.org>" on this patch. In Subject, - asoc: ... + ASoC: ... Thank you for your help !! Best regards --- Kuninori Morimoto
diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h index af79f680c72a..fc149fc18ad6 100644 --- a/include/sound/simple_card_utils.h +++ b/include/sound/simple_card_utils.h @@ -267,6 +267,9 @@ static inline void simple_util_debug_info(struct simple_util_priv *priv) dev_dbg(dev, "link name = %s\n", link->name); if (link->dai_fmt) dev_dbg(dev, "link format = %04x\n", link->dai_fmt); + if (link->playback_only || link->capture_only) + dev_dbg(dev, "link is %s only", + link->playback_only ? "PLAYBACK" : "CAPTURE"); if (props->adata.convert_rate) dev_dbg(dev, "convert_rate = %d\n", props->adata.convert_rate); if (props->adata.convert_channels)
It is handy to know whether the link is playback-only/capture-only when debugging. Signed-off-by: Stephen Gordon <gordoste@iinet.net.au> --- include/sound/simple_card_utils.h | 3 +++ 1 file changed, 3 insertions(+)