[PATCH 0/4] ASoC: cs35l56: Set access permissions on volatile read-only controls
From: Richard Fitzgerald
Date: Thu Nov 20 2025 - 08:44:43 EST
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