From: Trevor Wu <trevor.wu@mediatek.com>
To: Tzung-Bi Shih <tzungbi@kernel.org>
Cc: <broonie@kernel.org>, <tiwai@suse.com>, <robh+dt@kernel.org>,
<matthias.bgg@gmail.com>, <alsa-devel@alsa-project.org>,
<linux-mediatek@lists.infradead.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
<aaronyu@google.com>, <angelogioacchino.delregno@collabora.com>,
<yc.hung@mediatek.com>
Subject: Re: [PATCH v3 2/6] ASoC: mediatek: mt8195: merge machine driver
Date: Wed, 23 Mar 2022 16:15:30 +0800 [thread overview]
Message-ID: <1d3f9ddc742c8af2e4613e6e1008b4a63b33e244.camel@mediatek.com> (raw)
In-Reply-To: <YjiVySElUQZnJG9C@google.com>
On Mon, 2022-03-21 at 23:12 +0800, Tzung-Bi Shih wrote:
> On Mon, Mar 21, 2022 at 03:23:08PM +0800, Trevor Wu wrote:
> > -config SND_SOC_MT8195_MT6359_RT1019_RT5682
> > - tristate "ASoC Audio driver for MT8195 with MT6359 RT1019
> > RT5682 codec"
> > - depends on I2C && GPIOLIB
> > - depends on SND_SOC_MT8195 && MTK_PMIC_WRAP
> > - select SND_SOC_MT6359
> > - select SND_SOC_RT1015P
> > - select SND_SOC_RT5682_I2C
> > - select SND_SOC_RT5682S
> > - select SND_SOC_DMIC
> > - select SND_SOC_HDMI_CODEC
> > - help
> > - This adds ASoC driver for Mediatek MT8195 boards
> > - with the MT6359 RT1019 RT5682 audio codec.
> > - Select Y if you have such device.
> > - If unsure select "N".
> > -
> > -config SND_SOC_MT8195_MT6359_RT1011_RT5682
> > - tristate "ASoC Audio driver for MT8195 with MT6359 RT1011
> > RT5682 codec"
> > +config SND_SOC_MT8195_MT6359
> > + tristate "ASoC Audio driver for MT8195 with MT6359 and I2S
> > codec"
>
> s/codec/codecs/.
OK.
>
> > help
> > - This adds ASoC driver for Mediatek MT8195 boards
> > - with the MT6359 RT1011 RT5682 audio codec.
> > + This adds support for ASoC machine driver for Mediatek
> > MT8195
> > + boards with the MT6359 and other I2S audio codec.
>
> s/codec/codecs/.
OK.
>
> > diff --git a/sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-
> > rt5682.c b/sound/soc/mediatek/mt8195/mt8195-mt6359.c
>
> [...]
> > +static int mt8195_rt1011_etdm_hw_params(struct snd_pcm_substream
> > *substream,
> > + struct snd_pcm_hw_params
> > *params)
> > +{
> > + struct snd_soc_pcm_runtime *rtd =
> > asoc_substream_to_rtd(substream);
> > + struct snd_soc_dai *codec_dai;
> > + struct snd_soc_card *card = rtd->card;
> > + int srate, i, ret = 0;
> > +
> > + srate = params_rate(params);
> > +
> > + for_each_rtd_codec_dais(rtd, i, codec_dai) {
> > + ret = snd_soc_dai_set_pll(codec_dai, 0,
> > RT1011_PLL1_S_BCLK,
> > + 64 * srate, 256 * srate);
> > + if (ret < 0) {
> > + dev_err(card->dev, "codec_dai clock not
> > set\n");
> > + return ret;
> > + }
> > +
> > + ret = snd_soc_dai_set_sysclk(codec_dai,
> > + RT1011_FS_SYS_PRE_S_PLL1,
> > + 256 * srate,
> > SND_SOC_CLOCK_IN);
> > + if (ret < 0) {
> > + dev_err(card->dev, "codec_dai clock not
> > set\n");
> > + return ret;
> > + }
> > + }
> > + return ret;
>
> I guess it may be just copied from mt8195-mt6359-rt1011-
> rt5682.c. However, it
> is good to turn the code into a better shape. To be clear, just
> return 0 here
> so that the initialization can be removed.
>
Yes, I copied it directly.
I will update this in v4.
> > +static int mt8195_rt1011_init(struct snd_soc_pcm_runtime *rtd)
>
> [...]
> > + ret = snd_soc_dapm_add_routes(&card->dapm,
> > mt8195_rt1011_routes,
> > + ARRAY_SIZE(mt8195_rt1011_routes))
> > ;
> > +
> > + if (ret)
>
> Remove the extra blank line.
OK. I didn't notice the blank line.
>
> > +static int mt8195_rt1019_init(struct snd_soc_pcm_runtime *rtd)
>
> [...]
> > + ret = snd_soc_dapm_add_routes(&card->dapm,
> > mt8195_rt1019_routes,
> > + ARRAY_SIZE(mt8195_rt1019_routes))
> > ;
> > +
> > + if (ret)
>
> Remove the extra blank line.
OK.
Thanks,
Trevor
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-03-23 8:26 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-21 7:23 [PATCH v3 0/6] ASoC: mediatek: Add support for MT8195 sound card with max98390 and rt5682 Trevor Wu
2022-03-21 7:23 ` [PATCH v3 1/6] ASoC: mediatek: mt8195: revise mt8195-mt6359-rt1019-rt5682.c Trevor Wu
2022-03-21 15:10 ` Tzung-Bi Shih
2022-03-21 7:23 ` [PATCH v3 2/6] ASoC: mediatek: mt8195: merge machine driver Trevor Wu
2022-03-21 15:12 ` Tzung-Bi Shih
2022-03-23 8:15 ` Trevor Wu [this message]
2022-03-21 7:23 ` [PATCH v3 3/6] ASoC: dt-bindings: mediatek: mt8195: merge mt8195 machine yaml Trevor Wu
2022-03-21 23:30 ` Miles Chen
2022-03-23 7:27 ` Trevor Wu
2022-03-21 7:23 ` [PATCH v3 4/6] ASoC: mediatek: mt8195: rename card controls Trevor Wu
2022-03-21 15:12 ` Tzung-Bi Shih
2022-03-21 7:23 ` [PATCH v3 5/6] ASoC: mediatek: mt8195: add machine support for max98390 and rt5682 Trevor Wu
2022-03-21 15:12 ` Tzung-Bi Shih
2022-03-23 7:29 ` Trevor Wu
2022-03-21 7:23 ` [PATCH v3 6/6] ASoC: dt-bindings: mediatek: mt8195: support mt8195-mt6359-max98390-rt5682 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=1d3f9ddc742c8af2e4613e6e1008b4a63b33e244.camel@mediatek.com \
--to=trevor.wu@mediatek.com \
--cc=aaronyu@google.com \
--cc=alsa-devel@alsa-project.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--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=robh+dt@kernel.org \
--cc=tiwai@suse.com \
--cc=tzungbi@kernel.org \
--cc=yc.hung@mediatek.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;
as well as URLs for NNTP newsgroup(s).