From: "Trevor Wu (吳文良)" <Trevor.Wu@mediatek.com>
To: "robh+dt@kernel.org" <robh+dt@kernel.org>,
"broonie@kernel.org" <broonie@kernel.org>,
"tiwai@suse.com" <tiwai@suse.com>,
"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
"krzysztof.kozlowski+dt@linaro.org"
<krzysztof.kozlowski+dt@linaro.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"perex@perex.cz" <perex@perex.cz>,
"angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH 3/7] ASoC: mediatek: mt8188: revise ETDM control flow
Date: Mon, 17 Apr 2023 02:52:35 +0000 [thread overview]
Message-ID: <228e990dcb46d5640f03deeeec720f6a4d4715b3.camel@mediatek.com> (raw)
In-Reply-To: <e36598dd-4f83-90b4-1744-61d18744b02d@collabora.com>
On Thu, 2023-04-13 at 15:17 +0200, AngeloGioacchino Del Regno wrote:
>
> > +static int mtk_etdm_mclk_connect(struct snd_soc_dapm_widget
> > *source,
> > + struct snd_soc_dapm_widget *sink)
> > +{
> > + struct snd_soc_dapm_widget *w = sink;
> > + struct snd_soc_component *cmpnt =
> > snd_soc_dapm_to_component(w->dapm);
> > + struct mtk_base_afe *afe =
> > snd_soc_component_get_drvdata(cmpnt);
> > + struct mt8188_afe_private *afe_priv = afe->platform_priv;
> > + struct mtk_dai_etdm_priv *etdm_priv;
> > + int mclk_id;
> > +
> > + mclk_id = get_etdm_id_by_name(afe, source->name);
> > + if (mclk_id < 0) {
> > + dev_info(afe->dev, "mclk_id < 0");
>
> Since you're returning 0, this doesn't appear to be an error and this
> print is
> useless unless it is used for debugging purposes.
>
> Please change it to dev_dbg().
>
> > + return 0;
> > + }
> > +
> > + etdm_priv = get_etdm_priv_by_name(afe, w->name);
> > + if (!etdm_priv) {
> > + dev_info(afe->dev, "etdm_priv == NULL");
>
> dev_dbg()
>
> > + return 0;
> > + }
> > +
> > + if (get_etdm_id_by_name(afe, sink->name) == mclk_id)
> > + return !!(etdm_priv->mclk_freq > 0);
> > +
> > + if (etdm_priv->cowork_source_id == mclk_id) {
> > + etdm_priv = afe_priv->dai_priv[mclk_id];
> > + return !!(etdm_priv->mclk_freq > 0);
> > + }
> > +
> > + return 0;
> > +}
> > +
> > +static int mtk_etdm_cowork_connect(struct snd_soc_dapm_widget
> > *source,
> > + struct snd_soc_dapm_widget *sink)
> > +{
> > + struct snd_soc_dapm_widget *w = sink;
> > + struct snd_soc_component *cmpnt =
> > snd_soc_dapm_to_component(w->dapm);
> > + struct mtk_base_afe *afe =
> > snd_soc_component_get_drvdata(cmpnt);
> > + struct mt8188_afe_private *afe_priv = afe->platform_priv;
> > + struct mtk_dai_etdm_priv *etdm_priv;
> > + int source_id;
> > + int i;
> > +
> > + source_id = get_etdm_id_by_name(afe, source->name);
> > + if (source_id < 0) {
> > + dev_info(afe->dev, "%s() source_id < 0\n", __func__);
>
> dev_dbg() please
>
> > + return 0;
> > + }
> > +
> > + etdm_priv = get_etdm_priv_by_name(afe, w->name);
> > + if (!etdm_priv) {
> > + dev_info(afe->dev, "%s() etdm_priv == NULL\n",
> > __func__);
>
> ...again... and everywhere else.
>
> > + return 0;
> > + }
> > +
>
OK, I will review all dev_info and replace them with dev_dbg in V2.
Thanks,
Trevor
>
next prev parent reply other threads:[~2023-04-17 3:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-13 10:47 [PATCH 0/7] ASoC: mediatek: mt8188: revise AFE driver Trevor Wu
2023-04-13 10:47 ` [PATCH 1/7] ASoC: mediatek: mt8188: remove supply AUDIO_HIRES Trevor Wu
2023-04-13 13:17 ` AngeloGioacchino Del Regno
2023-04-13 10:47 ` [PATCH 2/7] ASoC: mediatek: mt8188: complete set_tdm_slot function Trevor Wu
2023-04-13 10:47 ` [PATCH 3/7] ASoC: mediatek: mt8188: revise ETDM control flow Trevor Wu
2023-04-13 13:17 ` AngeloGioacchino Del Regno
2023-04-17 2:52 ` Trevor Wu (吳文良) [this message]
2023-04-13 10:47 ` [PATCH 4/7] ASoC: mediatek: mt8188: refine APLL control Trevor Wu
2023-04-13 10:47 ` [PATCH 5/7] ASoC: mediatek: mt8188: combine afe component registration Trevor Wu
2023-04-13 10:47 ` [PATCH 6/7] ASoC: mediatek: mt8188: add bus protection Trevor Wu
2023-04-13 13:19 ` AngeloGioacchino Del Regno
2023-04-20 6:44 ` Trevor Wu (吳文良)
2023-04-13 10:47 ` [PATCH 7/7] ASoC: dt-bindings: mediatek,mt8188-afe: add audio properties Trevor Wu
2023-04-15 9:00 ` Krzysztof Kozlowski
2023-04-17 2:44 ` Trevor Wu (吳文良)
2023-04-17 7:55 ` AngeloGioacchino Del Regno
2023-04-18 10:23 ` Trevor Wu (吳文良)
2023-04-18 12:25 ` Krzysztof Kozlowski
2023-04-20 6:25 ` Trevor Wu (吳文良)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=228e990dcb46d5640f03deeeec720f6a4d4715b3.camel@mediatek.com \
--to=trevor.wu@mediatek.com \
--cc=alsa-devel@alsa-project.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox