[PATCH 0/2] ASoC: codecs: warn on unknown codec version
While debugging broken audio issues on some of Qualcomm platforms I stumbled upon the kernel not providing the actual error information. It prints an error from the wsa_macro driver, but the actual issue is in the VA macro driver. Add error message to point to the actual error location.
va_macro 3370000.codec: Unknown VA Codec version, ID: 00 / 0f / 00 wsa_macro 3240000.codec: Unsupported Codec version (0)
Signed-off-by: Dmitry Baryshkov dmitry.baryshkov@linaro.org --- Dmitry Baryshkov (2): ASoC: codecs: lpass-macro: fix version strings returned for 1.x codecs ASoC: codecs: lpass-va-macro: warn on unknown version
sound/soc/codecs/lpass-macro-common.h | 6 ++++++ sound/soc/codecs/lpass-va-macro.c | 4 ++++ 2 files changed, 10 insertions(+) --- base-commit: 668d33c9ff922c4590c58754ab064aaf53c387dd change-id: 20240803-codec-version-db6f65ab51ce
Best regards,
Add missing cases to lpass_macro_get_codec_version_string() to let it print the correct codec version for 1.x codec platforms.
Fixes: 378918d59181 ("ASoC: codecs: lpass-macro: add helpers to get codec version") Signed-off-by: Dmitry Baryshkov dmitry.baryshkov@linaro.org --- sound/soc/codecs/lpass-macro-common.h | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/sound/soc/codecs/lpass-macro-common.h b/sound/soc/codecs/lpass-macro-common.h index 21cb30ab706d..fb4b96cb2b23 100644 --- a/sound/soc/codecs/lpass-macro-common.h +++ b/sound/soc/codecs/lpass-macro-common.h @@ -49,6 +49,12 @@ static inline void lpass_macro_pds_exit_action(void *pds) static inline const char *lpass_macro_get_codec_version_string(int version) { switch (version) { + case LPASS_CODEC_VERSION_1_0: + return "v1.0"; + case LPASS_CODEC_VERSION_1_1: + return "v1.1"; + case LPASS_CODEC_VERSION_1_2: + return "v1.2"; case LPASS_CODEC_VERSION_2_0: return "v2.0"; case LPASS_CODEC_VERSION_2_1:
Warn the users if the driver doesn't know the codec version. This helps in debugging the issues with other codec not detecting the correct version.
va_macro 3370000.codec: Unknown VA Codec version, ID: 00 / 0f / 00
Signed-off-by: Dmitry Baryshkov dmitry.baryshkov@linaro.org --- sound/soc/codecs/lpass-va-macro.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c index b852cc7ffad9..cdc090418d74 100644 --- a/sound/soc/codecs/lpass-va-macro.c +++ b/sound/soc/codecs/lpass-va-macro.c @@ -1483,6 +1483,10 @@ static void va_macro_set_lpass_codec_version(struct va_macro *va) if ((core_id_0 == 0x02) && (core_id_1 == 0x0F) && (core_id_2 == 0x80 || core_id_2 == 0x81)) version = LPASS_CODEC_VERSION_2_8;
+ if (version == LPASS_CODEC_VERSION_UNKNOWN) + dev_warn(va->dev, "Unknown Codec version, ID: %02x / %02x / %02x\n", + core_id_0, core_id_1, core_id_2); + lpass_macro_set_codec_version(version);
dev_dbg(va->dev, "LPASS Codec Version %s\n", lpass_macro_get_codec_version_string(version));
On Sat, 03 Aug 2024 13:41:39 +0300, Dmitry Baryshkov wrote:
While debugging broken audio issues on some of Qualcomm platforms I stumbled upon the kernel not providing the actual error information. It prints an error from the wsa_macro driver, but the actual issue is in the VA macro driver. Add error message to point to the actual error location.
va_macro 3370000.codec: Unknown VA Codec version, ID: 00 / 0f / 00 wsa_macro 3240000.codec: Unsupported Codec version (0)
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/2] ASoC: codecs: lpass-macro: fix version strings returned for 1.x codecs commit: 49f6202ce991742f451fc724f03d0c17460d06cd [2/2] ASoC: codecs: lpass-va-macro: warn on unknown version commit: a9a7a2d80790d06cd32c535e2e7b10f72ce592e7
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
participants (2)
-
Dmitry Baryshkov
-
Mark Brown