Skip to content

ASoC: cs35l56: Set access permissions on volatile read-only controls

Richard Fitzgerald linux-sound lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4ASoC: soc.h: Add SOC_ENUM_EXT_ACC() to allow setting access flagsinclude/sound/soc.h+7 -00 replies
2/4ASoC: soc.h: Add SND_SOC_BYTES_E_ACC() to allow setting access flagsinclude/sound/soc.h+7 -00 replies
3/4ASoC: cs35l56: Use SOC_ENUM_EXT_ACC() for CAL_SET_STATUS controlsound/soc/codecs/cs35l56.c+6 -40 replies
4/4ASoC: cs35l56: Use SND_SOC_BYTES_E_ACC() for CAL_DATA_RB controlsound/soc/codecs/cs35l56.c+3 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

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(-)
Signature · 1 line
2.47.3