From: sashiko-bot@kernel.org
To: "Mohammad Rafi Shaik" <mohammad.rafi.shaik@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 3/7] ASoC: codec: pcm1681: Add TDM support
Date: Fri, 09 Oct 2026 13:20:50 +0000 [thread overview]
Message-ID: <sashiko-outbox-165620@kernel.org> (raw)
In-Reply-To: <20261009-nord-asoc-driver-support-v3-v3-3-0c1897f21ccf@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] ASoC: missing regmap_update_bits error check in pcm1681_set_deemph()
--
commit c7cf94fd54a2248eb129e6005f0299fa2844892f
Author: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>
ASoC: codec: pcm1681: Add TDM support
The PCM1681 selects the audio interface format using FMT[3:0] in the format
register. This commit adds support for SND_SOC_DAIFMT_DSP_A and programs the
PCM1681 I2S TDM format when it is selected. It also corrects the reset
default for the format register to match the hardware reset value.
> diff --git a/sound/soc/codecs/pcm1681.c b/sound/soc/codecs/pcm1681.c
> index a1ccf1edf4819..3675b2236d663 100644
> --- a/sound/soc/codecs/pcm1681.c
> +++ b/sound/soc/codecs/pcm1681.c
[ ... ]
> @@ -217,6 +217,9 @@ static int pcm1681_hw_params(struct snd_pcm_substream *substream,
> case SND_SOC_DAIFMT_LEFT_J:
> val = 0x05;
> break;
> + case SND_SOC_DAIFMT_DSP_A:
> + val = 0x06;
> + break;
> default:
> dev_err(component->dev, "Invalid DAI format\n");
> return -EINVAL;
[Severity: Low]
Does this code ignore the return value of the first regmap_update_bits() call
in pcm1681_set_deemph()?
When pcm1681_hw_params() finishes successfully, it calls pcm1681_set_deemph():
sound/soc/codecs/pcm1681.c:pcm1681_set_deemph() {
...
if (val != -1) {
regmap_update_bits(priv->regmap, PCM1681_DEEMPH_CONTROL,
PCM1681_DEEMPH_RATE_MASK, val << 3);
enable = 1;
} else {
...
}
If the first register update to set the de-emphasis rate fails due to a
transient bus error, its return value is ignored before executing the
subsequent update.
If the subsequent transaction to enable it succeeds, the codec will have
de-emphasis enabled with an incorrect or default rate, potentially causing
minor audio distortion.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261009-nord-asoc-driver-support-v3-v3-0-0c1897f21ccf@oss.qualcomm.com?part=3
next prev parent reply other threads:[~2026-10-09 13:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-09 13:12 [PATCH v3 0/7] ASoC: qcom: Add Nord audio support Mohammad Rafi Shaik
2026-10-09 13:12 ` [PATCH v3 1/7] ASoC: dt-bindings: ti,pcm1681: Document the optional SCK clock Mohammad Rafi Shaik
2026-10-13 7:01 ` Krzysztof Kozlowski
2026-10-09 13:12 ` [PATCH v3 2/7] ASoC: codec: pcm1681: Add optional SCK clock and runtime PM support Mohammad Rafi Shaik
2026-10-09 13:23 ` sashiko-bot
2026-10-10 3:07 ` Wang, Sen
2026-10-09 13:12 ` [PATCH v3 3/7] ASoC: codec: pcm1681: Add TDM support Mohammad Rafi Shaik
2026-10-09 13:20 ` sashiko-bot [this message]
2026-10-10 3:12 ` Wang, Sen
2026-10-09 13:12 ` [PATCH v3 4/7] ASoC: dt-bindings: ti,pcm1681: Document the PCM1681 supplies Mohammad Rafi Shaik
2026-10-12 6:25 ` Krzysztof Kozlowski
2026-10-09 13:12 ` [PATCH v3 5/7] ASoC: codec: pcm1681: Enable " Mohammad Rafi Shaik
2026-10-09 13:21 ` sashiko-bot
2026-10-10 3:13 ` Wang, Sen
2026-10-09 13:12 ` [PATCH v3 6/7] ASoC: dt-bindings: qcom,sm8250: Add Nord sound card Mohammad Rafi Shaik
2026-10-09 13:12 ` [PATCH v3 7/7] ASoC: qcom: sc8280xp: Add Nord sound card support Mohammad Rafi Shaik
2026-10-13 9:09 ` Ajay Kumar Nandam
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=sashiko-outbox-165620@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=mohammad.rafi.shaik@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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.