* [PATCH] ASoC: cs-amp-lib: Check for no firmware controls when writing calibration
@ 2024-03-25 14:44 Richard Fitzgerald
2024-03-25 22:27 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: Richard Fitzgerald @ 2024-03-25 14:44 UTC (permalink / raw)
To: broonie
Cc: linux-sound, alsa-devel, linux-kernel, patches, Simon Trimmer,
Richard Fitzgerald
From: Simon Trimmer <simont@opensource.cirrus.com>
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>
---
sound/soc/codecs/cs-amp-lib.c | 5 +++++
1 file changed, 5 insertions(+)
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;
--
2.39.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ASoC: cs-amp-lib: Check for no firmware controls when writing calibration
2024-03-25 14:44 [PATCH] ASoC: cs-amp-lib: Check for no firmware controls when writing calibration Richard Fitzgerald
@ 2024-03-25 22:27 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2024-03-25 22:27 UTC (permalink / raw)
To: Richard Fitzgerald
Cc: linux-sound, alsa-devel, linux-kernel, patches, Simon Trimmer
On Mon, 25 Mar 2024 14:44:50 +0000, Richard Fitzgerald wrote:
> 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.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: cs-amp-lib: Check for no firmware controls when writing calibration
commit: e2d7ad717a6b0880843dbc60855a5b97ad0395f8
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-25 22:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-25 14:44 [PATCH] ASoC: cs-amp-lib: Check for no firmware controls when writing calibration Richard Fitzgerald
2024-03-25 22:27 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox