diff options
| author | Richard Fitzgerald <rf@opensource.cirrus.com> | 2025-11-10 11:43:27 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2025-11-10 12:26:32 +0000 |
| commit | 772ada50282b0c80343c8989147db816961f571d (patch) | |
| tree | f440b620e1d8f1ebb2a2ae21c990a21c637fe12f /tools/lib/python | |
| parent | 4acbfcf11cbe6c46c42091b49875c7002b0bff3d (diff) | |
ASoC: cs35l56: Alter error codes for calibration routine
Adjust the error codes returned by the calibration debugfs files
to provide a wider range of errors and make them more consistent.
There is a limited number of standard errors and it's not always
easy to find an error code that accurately describes what happened.
Additionally, user code often uses strerror() or something similar
to report a generic error description. The original calibration
code used a limited set of errors to attempt to avoid user error
strings that would be confusing or unclear on a file read/write.
However, this restricts the ability to provide informative errors.
This limited error range didn't help very much with debugging so
it has been expanded, rather than worrying about what strerror()
would return.
The errors are now more consistent:
ENXIO Calibration is not supported by the driver.
EOPNOTSUPP The given calibration command is not supported.
EBUSY Cannot calibrate because the amp is playing audio.
ERANGE Calibration result was out-of-range.
ETIMEDOUT Calibration did not complete.
EMSGSIZE Blob written to cal_data is the wrong size.
ENODATA No calibration data available to read from cal_data,
or
Blob written to cal_data does not contain calibration,
or
No calibration data available to save to UEFI.
EIO General failure to communicate with the firmware, mainly
indicating that firmware controls are missing.
EINVAL Has its normal meaning that an invalid argument was passed.
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20251110114327.84370-1-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
