[PATCH 0/4] ASoC: cs35l56: Set access permissions on volatile read-only controls

Richard Fitzgerald posted 4 patches 1 week, 4 days ago
include/sound/soc.h        | 14 ++++++++++++++
sound/soc/codecs/cs35l56.c | 15 +++++++++------
2 files changed, 23 insertions(+), 6 deletions(-)
[PATCH 0/4] ASoC: cs35l56: Set access permissions on volatile read-only controls
Posted by Richard Fitzgerald 1 week, 4 days ago
The CAL_SET_STATUS and CAL_DATA_RB controls are volatile and read-only, but
the existing ASoC macros to define controls don't allow setting access
permissions, so those controls were marked as non-volatile read/write.
These four patches fix that.

The first two patches add two new control macros to soc.h. I really don't
like codec drivers open-coding a kcontrol_new content for a control that
will be managed by the ASoC info/get/put handlers. If a new type of ASoC
control definition is needed it's better to have it in soc.h so all the
dependencies between ASoC and the kcontrol_new content are in one place.

Richard Fitzgerald (4):
  ASoC: soc.h: Add SOC_ENUM_EXT_ACC() to allow setting access flags
  ASoC: soc.h: Add SND_SOC_BYTES_E_ACC() to allow setting access flags
  ASoC: cs35l56: Use SOC_ENUM_EXT_ACC() for CAL_SET_STATUS control
  ASoC: cs35l56: Use SND_SOC_BYTES_E_ACC() for CAL_DATA_RB control

 include/sound/soc.h        | 14 ++++++++++++++
 sound/soc/codecs/cs35l56.c | 15 +++++++++------
 2 files changed, 23 insertions(+), 6 deletions(-)

-- 
2.47.3
Re: [PATCH 0/4] ASoC: cs35l56: Set access permissions on volatile read-only controls
Posted by Mark Brown 1 week, 3 days ago
On Thu, 20 Nov 2025 13:44:33 +0000, Richard Fitzgerald wrote:
> The CAL_SET_STATUS and CAL_DATA_RB controls are volatile and read-only, but
> the existing ASoC macros to define controls don't allow setting access
> permissions, so those controls were marked as non-volatile read/write.
> These four patches fix that.
> 
> The first two patches add two new control macros to soc.h. I really don't
> like codec drivers open-coding a kcontrol_new content for a control that
> will be managed by the ASoC info/get/put handlers. If a new type of ASoC
> control definition is needed it's better to have it in soc.h so all the
> dependencies between ASoC and the kcontrol_new content are in one place.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/4] ASoC: soc.h: Add SOC_ENUM_EXT_ACC() to allow setting access flags
      commit: cf6ec18ea6e12569b83af2709d0bd0cc09da198f
[2/4] ASoC: soc.h: Add SND_SOC_BYTES_E_ACC() to allow setting access flags
      commit: d7a82707f19c7a11ce42dd46cb22ca34a58cc9b0
[3/4] ASoC: cs35l56: Use SOC_ENUM_EXT_ACC() for CAL_SET_STATUS control
      commit: 4dd7f8aeed4c85234f3855ef3188ed2202f2c947
[4/4] ASoC: cs35l56: Use SND_SOC_BYTES_E_ACC() for CAL_DATA_RB control
      commit: 33822d795ab93067d9a65f42003c0d01c65d4a9d

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark