From: YLCHANG2 <neo.chang70@gmail.com>
To: Mark Brown <broonie@kernel.org>, Neo Chang <YLCHANG2@nuvoton.com>
Cc: lgirdwood@gmail.com, perex@perex.cz, robh@kernel.org,
krzk+dt@kernel.org, linux-sound@vger.kernel.org,
devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
kchsu0@nuvoton.com, sjlin0@nuvoton.com, lkp@intel.com
Subject: Re: [PATCH v2 2/2] ASoC: codecs: nau8310: Add support for NAU83G10 amplifier
Date: Tue, 17 Nov 2026 11:39:57 +0800 [thread overview]
Message-ID: <e87bc85d-c9e3-44b5-99e6-007944d75200@gmail.com> (raw)
In-Reply-To: <179425369963.3711751.8538085283431158098.b4-review@b4>
On 11/10/26 03:48, Mark Brown wrote:
>> Add support for the Nuvoton NAU83G10 audio amplifier.
>> The NAU83G10 is a mono boost Class-D audio amplifier with
>> integrated DSP and I/V-sense support.
>> +config SND_SOC_NAU8310
>> + tristate "Nuvoton Technology Corporation NAU83G10 Mono Boosted Amplifier"
> This handles NAU83G20 as well.
Got it. I will update the config description to include NAU83G20 in the
next version.
>
>> +static int nau8310_dsp_idle(struct snd_soc_component *cp)
>> +{
>> + struct nau8310 *nau8310 = snd_soc_component_get_drvdata(cp);
>> + struct regmap *regmap = nau8310->regmap;
>> + unsigned int idle_pattern, timeout = NAU8310_DSP_IDLE_RETRY * USEC_PER_MSEC;
>> + int ret = 0;
>> +
>> + ret = regmap_read_poll_timeout(regmap,
>> + NAU8310_RF000_DSP_COMM, idle_pattern,
>> + idle_pattern == NAU8310_DSP_COMM_IDLE_WORD, USEC_PER_MSEC, timeout);
>> + if (ret) {
>> + dev_err(nau8310->dev, "Timeout waiting for DSP idle state: %d", ret);
>> + nau8310_sw_reset_chip(regmap);
> If you need to reset the chip you should probably also resync the cache,
> and there's some redundancy here with nau8310_software_reset().
This reset function only resets the internal state machines without
clearing the register values, so a cache resync is not necessary.
I will remove the redundant function in the next version.
>
>> +int nau8310_dsp_init(struct snd_soc_component *cp)
>> +{
>> + struct regmap *regmap = cp->regmap;
>> +
>> + nau8310_sw_reset_chip(regmap);
>> +
>> + /* wait for the power ready */
>> + msleep(120);
>> +
>> + regmap_update_bits(regmap, NAU8310_R1A_DSP_CORE_CTRL2,
>> + NAU8310_DSP_RUNSTALL | NAU8310_DAC_SEL_DSP_OUT, NAU8310_DAC_SEL_DSP_OUT);
> NAU8310_DAC_SEL_DSP_OUT is used by DAPM, you might want to solve this
> the way nau8360 does.
Got it. I will remove NAU8310_DAC_SEL_DSP_OUT from here in the next version.
>
>> +static int nau8310_biq_coeff_put(struct snd_kcontrol *kcontrol,
>> + struct snd_ctl_elem_value *ucontrol)
>> +{
>> + struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kcontrol);
>> + struct snd_soc_component *cp = snd_soc_dapm_to_component(dapm);
> This is the same issue as was fixed in nau8310_clkdet_put() in this
> version.
Got it. I will fix it in the next version.
>
>> + /* Boost Control Target Value Limit. 0.16 V per step. */
>> + SOC_SINGLE("Boost Target Limit", NAU8310_R17_BOOST_CTRL1,
>> + NAU8310_BSTLIMIT_SFT, NAU8310_BSTLIMIT_MAX, 0),
> The binding describes nuvoton,boost-target-limit/-margin as having
> 0.19V steps - either that or the comment here is wrong.
Got it. I will fix the comment/binding to match the correct value in the
next version.
>
>> + ret = nau8310_clock_config(nau8310, fs, nau8310->mclk);
>> + if (ret)
>> + return -EINVAL;
> Just return ret in case it's more descriptive.
Got it. I will return 'ret' directly instead of -EINVAL in the next version.
>
>> +static struct i2c_driver nau8310_i2c_driver = {
>> + .driver = {
>> + .name = "nau8310",
>> + .of_match_table = of_match_ptr(nau8310_of_ids),
>> + .acpi_match_table = ACPI_PTR(nau8310_acpi_match),
> We don't need the wrappers for these pointers these days.
Got it. I will remove the wrappers (of_match_ptr and ACPI_PTR) in the
next version.
>
prev parent reply other threads:[~2026-11-17 3:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 5:12 [PATCH v2 0/2] ASoC: codecs: nau8310: Add NAU83G10 amplifier Neo Chang
2026-11-09 5:12 ` [PATCH v2 1/2] ASoC: dt-bindings: nuvoton,nau8310: Add NAU83G10 Neo Chang
2026-11-09 5:23 ` sashiko-bot
2026-11-09 13:11 ` Krzysztof Kozlowski
2026-11-17 3:38 ` YLCHANG2
2026-11-09 5:12 ` [PATCH v2 2/2] ASoC: codecs: nau8310: Add support for NAU83G10 amplifier Neo Chang
2026-11-09 5:44 ` sashiko-bot
2026-11-09 13:15 ` Krzysztof Kozlowski
2026-11-17 3:38 ` YLCHANG2
2026-11-17 9:28 ` Krzysztof Kozlowski
2026-11-17 9:54 ` YLCHANG2
2026-11-09 19:48 ` Mark Brown
2026-11-17 3:39 ` YLCHANG2 [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=e87bc85d-c9e3-44b5-99e6-007944d75200@gmail.com \
--to=neo.chang70@gmail.com \
--cc=YLCHANG2@nuvoton.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kchsu0@nuvoton.com \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=lkp@intel.com \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=sjlin0@nuvoton.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.