Skip to content

Commit 2c3640b

Browse files
simontrimmerbroonie
authored andcommitted
ASoC: cs35l56: Stop creating ALSA controls for firmware coefficients
A number of laptops have gone to market with old firmware versions that export controls that have since been hidden, but we can't just install a newer firmware because the firmware for each product is customized and qualified by the OEM. The issue is that alsactl save and restore has no idea what controls are good to persist which can lead to misconfiguration. There is no reason that the UCM or user should need to interact with any of the ALSA controls for the firmware coefficients so they can be removed entirely. Fixes: e496112 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56") Signed-off-by: Simon Trimmer <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 45b4aca commit 2c3640b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

sound/soc/codecs/cs35l56.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,11 @@ int cs35l56_system_resume(struct device *dev)
10951095
}
10961096
EXPORT_SYMBOL_GPL(cs35l56_system_resume);
10971097

1098+
static int cs35l56_control_add_nop(struct wm_adsp *dsp, struct cs_dsp_coeff_ctl *cs_ctl)
1099+
{
1100+
return 0;
1101+
}
1102+
10981103
static int cs35l56_dsp_init(struct cs35l56_private *cs35l56)
10991104
{
11001105
struct wm_adsp *dsp;
@@ -1117,6 +1122,12 @@ static int cs35l56_dsp_init(struct cs35l56_private *cs35l56)
11171122
dsp->fw = 12;
11181123
dsp->wmfw_optional = true;
11191124

1125+
/*
1126+
* None of the firmware controls need to be exported so add a no-op
1127+
* callback that suppresses creating an ALSA control.
1128+
*/
1129+
dsp->control_add = &cs35l56_control_add_nop;
1130+
11201131
dev_dbg(cs35l56->base.dev, "DSP system name: '%s'\n", dsp->system_name);
11211132

11221133
ret = wm_halo_init(dsp);

0 commit comments

Comments
 (0)