Commit 5552cccb authored by Mark Brown's avatar Mark Brown

ASoC: codecs: warn on unknown codec version

Merge series from Dmitry Baryshkov <dmitry.baryshkov@linaro.org>:

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)
parents 72776774 a9a7a2d8
...@@ -49,6 +49,12 @@ static inline void lpass_macro_pds_exit_action(void *pds) ...@@ -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) static inline const char *lpass_macro_get_codec_version_string(int version)
{ {
switch (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: case LPASS_CODEC_VERSION_2_0:
return "v2.0"; return "v2.0";
case LPASS_CODEC_VERSION_2_1: case LPASS_CODEC_VERSION_2_1:
......
...@@ -1485,6 +1485,10 @@ static void va_macro_set_lpass_codec_version(struct va_macro *va) ...@@ -1485,6 +1485,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)) if ((core_id_0 == 0x02) && (core_id_1 == 0x0F) && (core_id_2 == 0x80 || core_id_2 == 0x81))
version = LPASS_CODEC_VERSION_2_8; 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); lpass_macro_set_codec_version(version);
dev_dbg(va->dev, "LPASS Codec Version %s\n", lpass_macro_get_codec_version_string(version)); dev_dbg(va->dev, "LPASS Codec Version %s\n", lpass_macro_get_codec_version_string(version));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment