From: WTLI <wtli@nuvoton.com>
To: Mark Brown <broonie@kernel.org>
Cc: lgirdwood@gmail.com, alsa-devel@alsa-project.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
robh+dt@kernel.org, conor+dt@kernel.org, YHCHuang@nuvoton.com,
KCHSU0@nuvoton.com, CTLIN0@nuvoton.com, SJLIN0@nuvoton.com,
scott6986@gmail.com, supercraig0719@gmail.com,
dardar923@gmail.com
Subject: Re: [PATCH v2 2/2] ASoC: nau8325: new driver
Date: Fri, 1 Mar 2024 14:35:51 +0800 [thread overview]
Message-ID: <9258eb2a-8764-4b2a-9c40-de3faf903610@nuvoton.com> (raw)
In-Reply-To: <6ffb4165-95e0-4ccd-868f-8ecda56b4079@sirena.org.uk>
Mark Brown 於 2/22/2024 11:47 PM 寫道:
> On Thu, Feb 22, 2024 at 04:38:25PM +0800, Seven Lee wrote:
>
> A few very minor things below but basically this looks good.
>
>> +static int nau8325_clksrc_choose(struct nau8325 *nau8325,
>> + const struct nau8325_srate_attr **srate_table,
>> + int *n1_sel, int *mult_sel, int *n2_sel)
>> +{
>> +proc_done:
>> + dev_err(nau8325->dev, "nau8325->fs=%d,range=0x%x, %s, (n1,mu,n2,dmu):(%d,%d,%d), MCLK_SRC=%uHz (%d)",
>> + nau8325->fs, (*srate_table)->range,
>> + (*srate_table)->max ? "MAX" : "MIN",
>> + *n1_sel == CLK_PROC_BYPASS ?
>> + CLK_PROC_BYPASS : mclk_n1_div[*n1_sel].param,
>> + *mult_sel == CLK_PROC_BYPASS ?
>> + CLK_PROC_BYPASS : 1 << mclk_n3_mult[*mult_sel].param,
>> + 1 << mclk_n2_div[*n2_sel].param,
>> + (*srate_table)->mclk_src[ratio],
>> + (*srate_table)->mclk_src[ratio] / nau8325->fs);
> This should be a dev_dbg(), dev_err() will be very noisy in normal
> operation.
okay, I will make the correction to dev_dbg().
>
>> +static int nau8325_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
>> +{
>> + struct snd_soc_component *component = dai->component;
>> + struct nau8325 *nau8325 = snd_soc_component_get_drvdata(component);
>> + unsigned int ctrl1_val = 0;
>> +
>> + switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
>> + case SND_SOC_DAIFMT_CBS_CFS:
>> + break;
> Please use the modern _CBC_CFC defines.
okay, I will revise.
>
>> + ret = regmap_read(nau8325->regmap, NAU8325_R02_DEVICE_ID, &value);
>> + if (ret) {
>> + dev_err(dev, "Failed to read device id (%d)", ret);
>> + goto err;
>> + }
> Probably a good idea to check that the device ID is what we expected
> too.
okay, thanks.
________________________________
________________________________
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.
prev parent reply other threads:[~2024-03-01 6:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 8:38 [PATCH v2 0/2] ASoC: nau8325: Modify driver code and dtschema Seven Lee
2024-02-22 8:38 ` [PATCH v2 1/2] ASoC: dt-bindings: Added schema for "nuvoton,nau8325" Seven Lee
2024-02-22 9:44 ` Rob Herring
2024-02-22 14:16 ` Rob Herring
2024-03-01 6:26 ` WTLI
2024-02-22 8:38 ` [PATCH v2 2/2] ASoC: nau8325: new driver Seven Lee
2024-02-22 15:47 ` Mark Brown
2024-03-01 6:35 ` WTLI [this message]
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=9258eb2a-8764-4b2a-9c40-de3faf903610@nuvoton.com \
--to=wtli@nuvoton.com \
--cc=CTLIN0@nuvoton.com \
--cc=KCHSU0@nuvoton.com \
--cc=SJLIN0@nuvoton.com \
--cc=YHCHuang@nuvoton.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=dardar923@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=scott6986@gmail.com \
--cc=supercraig0719@gmail.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
all inboxes | Powered by JetHome®