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
Subject: Re: [PATCH v3 2/2] ASoC: codecs: nau8360: Add support for NAU83G60 amplifier
Date: Fri, 29 May 2026 16:49:11 +0800 [thread overview]
Message-ID: <1d7a01aa-dd65-129a-c9ac-e24e9b474f8e@gmail.com> (raw)
In-Reply-To: <d4cf4ad9-82fb-4beb-be5b-b3687f822fcf@sirena.org.uk>
On 5/27/26 21:43, Mark Brown wrote:
> On Tue, May 26, 2026 at 09:58:26AM +0800, Neo Chang wrote:
>> Add support for the Nuvoton NAU83G60 audio codec. The NAU83G60 is a
>> stereo 30W+30W smart amplifier with an integrated low-latency
>> Advanced Audio DSP.
> A few things below, you also have a bunch of what look like legitimate
> issues picked up by sashiko (some of which overlap with what I've got
> below):
>
> https://sashiko.dev/#/patchset/20260526015826.440769-1-YLCHANG2%40nuvoton.com
Regarding the sashiko report, I have a few questions:
Are we required to address every issue caught by sashiko? We found that
some of them are actually false positives.
If we need to explain our code regarding sashiko's findings, who should
we send the reply to?
Additionally, is there a way to run the sashiko checks locally before
submitting our patches?
>
>> +static int nau8360_peq_coeff_get(struct snd_kcontrol *kcontrol,
>> + struct snd_ctl_elem_value *ucontrol)
>> +{
> ...
>
>> + snd_soc_component_update_bits(cp, NAU8360_R9D_PEQ_CTL, NAU8360_HW1_MEM_TEST,
>> + NAU8360_HW1_MEM_TEST);
>> + for (i = 0; i < params->max / sizeof(u16); i++) {
>> + value = snd_soc_component_read(cp, reg + i);
>> + *(val + i) = cpu_to_be16(value);
>> + }
>> + snd_soc_component_update_bits(cp, NAU8360_R9D_PEQ_CTL, NAU8360_HW1_MEM_TEST, 0);
>> +
>> + return 0;
>> +}
>
>> +static int nau8360_peq_coeff_put(struct snd_kcontrol *kcontrol,
>> + struct snd_ctl_elem_value *ucontrol)
>> +{
>> + snd_soc_component_update_bits(cp, NAU8360_R9D_PEQ_CTL, NAU8360_HW1_MEM_TEST,
>> + NAU8360_HW1_MEM_TEST);
> ...
>
>> + snd_soc_component_update_bits(cp, NAU8360_R9D_PEQ_CTL, NAU8360_HW1_MEM_TEST, 0);
> We use an rwsem to protect the controls from userspace so we could get
> more than one caller in these, you need some driver local locking.
Got it. I will add local lock in v4.
>
>> +static int nau8360_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
>> + unsigned int rx_mask, int slots, int slot_width)
>> +{
>> + struct snd_soc_component *cp = dai->component;
>> + struct nau8360 *nau8360 = snd_soc_component_get_drvdata(cp);
>> + unsigned int tx_slot_used = 0, rx_slot_used = 0;
>> + int ret = 0;
>> +
>> + if (slot_width != 16 && slot_width != 24 && slot_width != 32) {
>> + dev_err(cp->dev, "Invalid TDM channel length: %d", slot_width);
>> + return -EINVAL;
>> + }
> This stops the support for disabling TDM from working, a slot_width is
> required here.
Got it. I will fix this in v4.
next prev parent reply other threads:[~2026-05-29 8:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 1:58 [PATCH v3 0/2] ASoC: codecs: Add Nuvoton NAU83G60 audio codec driver Neo Chang
2026-05-26 1:58 ` [PATCH v3 1/2] ASoC: dt-bindings: nuvoton,nau8360: Add NAU83G60 Neo Chang
2026-05-27 9:15 ` Krzysztof Kozlowski
2026-05-29 8:46 ` YLCHANG2
2026-05-26 1:58 ` [PATCH v3 2/2] ASoC: codecs: nau8360: Add support for NAU83G60 amplifier Neo Chang
2026-05-26 2:46 ` sashiko-bot
2026-05-27 13:43 ` Mark Brown
2026-05-29 8:49 ` YLCHANG2 [this message]
2026-05-29 11:57 ` Mark Brown
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=1d7a01aa-dd65-129a-c9ac-e24e9b474f8e@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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox