summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-03-26 13:20:46 +0300
committerMark Brown <broonie@kernel.org>2026-03-26 13:20:46 +0300
commit7b907b55eb180f89b5ce9d66ed230892aef30e33 (patch)
treea63808684c2e5656bdf6cffdb4fadc114a630e75 /include
parent8a6391ec669366cbe7bde92b468c561e8b309fd6 (diff)
parentee7d655dbaf5e57145c73fd3925b5f44f7a1a5cc (diff)
downloadlinux-7b907b55eb180f89b5ce9d66ed230892aef30e33.tar.xz
ASoC: cs35l56: Support for factory calibration through ALSA controls
Richard Fitzgerald <rf@opensource.cirrus.com> says: 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.
Diffstat (limited to 'include')
-rw-r--r--include/sound/cs35l56.h1
-rw-r--r--include/sound/soc.h6
2 files changed, 7 insertions, 0 deletions
diff --git a/include/sound/cs35l56.h b/include/sound/cs35l56.h
index 7ca25487030a..c3b10587cb4c 100644
--- a/include/sound/cs35l56.h
+++ b/include/sound/cs35l56.h
@@ -435,6 +435,7 @@ ssize_t cs35l56_cal_data_debugfs_read(struct cs35l56_base *cs35l56_base,
ssize_t cs35l56_cal_data_debugfs_write(struct cs35l56_base *cs35l56_base,
const char __user *from, size_t count,
loff_t *ppos);
+int cs35l56_factory_calibrate(struct cs35l56_base *cs35l56_base);
void cs35l56_create_cal_debugfs(struct cs35l56_base *cs35l56_base,
const struct cs35l56_cal_debugfs_fops *fops);
void cs35l56_remove_cal_debugfs(struct cs35l56_base *cs35l56_base);
diff --git a/include/sound/soc.h b/include/sound/soc.h
index a30f95ff7d86..fd6c1c8055d2 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -311,6 +311,12 @@ struct platform_device;
.info = snd_soc_info_bool_ext, \
.get = xhandler_get, .put = xhandler_put, \
.private_value = xdata }
+#define SOC_SINGLE_BOOL_EXT_ACC(xname, xdata, xhandler_get, xhandler_put, xaccess) \
+{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
+ .access = xaccess, \
+ .info = snd_soc_info_bool_ext, \
+ .get = xhandler_get, .put = xhandler_put, \
+ .private_value = xdata }
#define SOC_ENUM_EXT(xname, xenum, xhandler_get, xhandler_put) \
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
.info = snd_soc_info_enum_double, \