From: HyeongJun An <sammiee5311@gmail.com>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
HyeongJun An <sammiee5311@gmail.com>
Subject: [PATCH 0/6] ASoC: Fix controls that write another control's bits
Date: Thu, 8 Oct 2026 22:09:46 +0900 [thread overview]
Message-ID: <20261008130953.2446692-1-sammiee5311@gmail.com> (raw)
In the es8316 thread Mark suggested checking at registration time for
controls whose register fields overlap [1]. Before adding such a check,
I wanted to see what it would find in the tree today.
A script expanded the control tables of every ASoC driver built by
allmodconfig and looked for two controls in one table whose register
fields overlap. It found 80 pairs in 33 drivers. Most are real bugs.
The rest are deliberate, where two names drive the same field, such as
the AC and DRC mode thresholds in sta32x.
This series fixes six that I could confirm against the vendor
datasheet. In each one, writing a control changes a different control,
and the bits it should own cannot be reached. Most date back to the
first version of the driver.
One more is left out on purpose. The cs42l56 ADC Mute Switch writes the
ADC invert bits. The real mute bits are also written by the
cs42l56_mute() callback on every stream start and stop, so moving the
control there would let the stream mute override it. I am not sure
whether you would rather move it or drop it.
I have none of this hardware, so these are checked against the
datasheets only. More fixes, checked against the register headers,
and the registration time check would follow.
[1] https://lore.kernel.org/all/0fefbfe1-021b-46b2-8945-15956e75e37f@sirena.org.uk/
HyeongJun An (6):
ASoC: cs42l56: Put the Limiter Cushion control on the limiter register
ASoC: cs42l52: Fix the NG Type Switch bit
ASoC: pcm3168a: Fix the DAC zero flag polarity bit
ASoC: max98371: Fix the Speaker DHT Min Volume bits
ASoC: wm8978: Fix the 128x oversampling switch bits
ASoC: nau8822: Fix the 128x oversampling switch bits
sound/soc/codecs/cs42l52.c | 2 +-
sound/soc/codecs/cs42l56.c | 2 +-
sound/soc/codecs/max98371.c | 2 +-
sound/soc/codecs/nau8822.c | 4 ++--
sound/soc/codecs/pcm3168a.c | 2 +-
sound/soc/codecs/wm8978.c | 4 ++--
6 files changed, 8 insertions(+), 8 deletions(-)
--
2.43.0
next reply other threads:[~2026-10-08 13:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 13:09 HyeongJun An [this message]
2026-10-08 13:09 ` [PATCH 1/6] ASoC: cs42l56: Put the Limiter Cushion control on the limiter register HyeongJun An
2026-10-08 13:09 ` [PATCH 2/6] ASoC: cs42l52: Fix the NG Type Switch bit HyeongJun An
2026-10-08 13:09 ` [PATCH 3/6] ASoC: pcm3168a: Fix the DAC zero flag polarity bit HyeongJun An
2026-10-09 10:51 ` Cezary Rojewski
2026-10-08 13:09 ` [PATCH 4/6] ASoC: max98371: Fix the Speaker DHT Min Volume bits HyeongJun An
2026-10-08 13:09 ` [PATCH 5/6] ASoC: wm8978: Fix the 128x oversampling switch bits HyeongJun An
2026-10-08 13:09 ` [PATCH 6/6] ASoC: nau8822: " HyeongJun An
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=20261008130953.2446692-1-sammiee5311@gmail.com \
--to=sammiee5311@gmail.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
/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®