From: Richard Fitzgerald <rf@opensource.cirrus.com>
To: broonie@kernel.org
Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org,
patches@opensource.cirrus.com
Subject: [PATCH v2 0/2] ASoC: cs35l56: Support for factory calibration through ALSA controls
Date: Wed, 25 Mar 2026 17:08:39 +0000 [thread overview]
Message-ID: <20260325170841.1405368-1-rf@opensource.cirrus.com> (raw)
Factory calibration is normally done through debugfs files.
Google have requested that factory calibration can be performed by
repair shops. These repair shops only have access to the standard
"user" kernel, which does not include debugfs.
Patch #1 adds a new control definition macro to create a boolean control
with specified access permissions. (new in V2)
Patch #2 is the implementation in the cs35l56 driver.
Changes in V2:
- Rename "Calibrate" control to "Calibrate Switch" to conform to naming
convention for boolean controls.
- Mark "Calibrate Switch" control volatile.
- Cache the value written to the "CAL_AMBIENT" control so that a read will
return the last set value.
- Return 1 from writing "CAL_AMBIENT" if the value was changed.
- Return 1 from writing the "Calibrate Switch" control to true because
that always causes some activity in the amp.
- Replace use of the confusing in_range() with normal comparisons against
limits and make the limits the same as the control definition.
- Simplify the code in cs35l56_calibrate_ctl_set(). It's a boolean so the
value written to it is either false or true.
Richard Fitzgerald (2):
ASoC: soc.h: Add SOC_SINGLE_BOOL_EXT_ACC() to allow setting access
flags
ASoC: cs35l56: Allow factory calibration through ALSA controls
include/sound/cs35l56.h | 1 +
include/sound/soc.h | 6 ++
sound/soc/codecs/Kconfig | 13 +++++
sound/soc/codecs/cs35l56-shared.c | 9 +++
sound/soc/codecs/cs35l56.c | 96 +++++++++++++++++++++++++++++++
sound/soc/codecs/cs35l56.h | 2 +
6 files changed, 127 insertions(+)
--
2.47.3
next reply other threads:[~2026-03-25 17:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 17:08 Richard Fitzgerald [this message]
2026-03-25 17:08 ` [PATCH v2 1/2] ASoC: soc.h: Add SOC_SINGLE_BOOL_EXT_ACC() to allow setting access flags Richard Fitzgerald
2026-03-25 17:08 ` [PATCH v2 2/2] ASoC: cs35l56: Allow factory calibration through ALSA controls Richard Fitzgerald
2026-03-25 17:53 ` Mark Brown
2026-03-26 10:16 ` Richard Fitzgerald
2026-03-26 10:20 ` [PATCH v2 0/2] ASoC: cs35l56: Support for " 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=20260325170841.1405368-1-rf@opensource.cirrus.com \
--to=rf@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.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