diff options
author | Simon Trimmer <simont@opensource.cirrus.com> | 2024-03-25 15:44:50 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-03-25 17:37:09 +0100 |
commit | e2d7ad717a6b0880843dbc60855a5b97ad0395f8 (patch) | |
tree | 40da443b3d49d7ee46807391cf49875788cb95e7 /sound | |
parent | ASoC: SOF: Intel: hda-dsp: Skip IMR boot on ACE platforms in case of S3 suspend (diff) | |
download | linux-e2d7ad717a6b0880843dbc60855a5b97ad0395f8.tar.xz linux-e2d7ad717a6b0880843dbc60855a5b97ad0395f8.zip |
ASoC: cs-amp-lib: Check for no firmware controls when writing calibration
When a wmfw file has not been loaded the firmware control descriptions
necessary to write a stored calibration are not present. In this case
print a more descriptive error message.
The message is logged at info level because it is not fatal, and does
not necessarily imply that anything is broken.
Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://msgid.link/r/20240325144450.293630-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/cs-amp-lib.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/codecs/cs-amp-lib.c b/sound/soc/codecs/cs-amp-lib.c index 01ef4db5407d..287ac01a3873 100644 --- a/sound/soc/codecs/cs-amp-lib.c +++ b/sound/soc/codecs/cs-amp-lib.c @@ -56,6 +56,11 @@ static int _cs_amp_write_cal_coeffs(struct cs_dsp *dsp, dev_dbg(dsp->dev, "Calibration: Ambient=%#x, Status=%#x, CalR=%d\n", data->calAmbient, data->calStatus, data->calR); + if (list_empty(&dsp->ctl_list)) { + dev_info(dsp->dev, "Calibration disabled due to missing firmware controls\n"); + return -ENOENT; + } + ret = cs_amp_write_cal_coeff(dsp, controls, controls->ambient, data->calAmbient); if (ret) return ret; |