]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: codecs: lpass-macro: fix missing codec version
authorJohan Hovold <johan+linaro@kernel.org>
Mon, 29 Jul 2024 13:13:51 +0000 (15:13 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 5 Aug 2024 17:26:28 +0000 (18:26 +0100)
Recent changes that started checking the codec version broke audio on
the Lenovo ThinkPad X13s:

wsa_macro 3240000.codec: Unsupported Codec version (0)
wsa_macro 3240000.codec: probe with driver wsa_macro failed with error -22
rx_macro 3200000.rxmacro: Unsupported Codec version (0)
rx_macro 3200000.rxmacro: probe with driver rx_macro failed with error -22

Add the missing codec version to the lookup table so that the codec
drivers probe successfully.

Note that I'm just assuming that this is a 2.0 codec based on the fact
that this device uses the older register layout.

Fixes: 378918d59181 ("ASoC: codecs: lpass-macro: add helpers to get codec version")
Fixes: dbacef05898d ("ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions")
Fixes: 727de4fbc546 ("ASoC: codecs: lpass-wsa-macro: Correct support for newer v2.5 version")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240729131351.27886-1-johan+linaro@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/lpass-va-macro.c

index b852cc7ffad9d9417897acbf79fa64e6a9b58dbe..a62ccd09bacd72d24012a6f88f0aafcbcb4b77e0 100644 (file)
@@ -1472,6 +1472,8 @@ static void va_macro_set_lpass_codec_version(struct va_macro *va)
 
        if ((core_id_0 == 0x01) && (core_id_1 == 0x0F))
                version = LPASS_CODEC_VERSION_2_0;
+       if ((core_id_0 == 0x02) && (core_id_1 == 0x0F) && core_id_2 == 0x01)
+               version = LPASS_CODEC_VERSION_2_0;
        if ((core_id_0 == 0x02) && (core_id_1 == 0x0E))
                version = LPASS_CODEC_VERSION_2_1;
        if ((core_id_0 == 0x02) && (core_id_1 == 0x0F) && (core_id_2 == 0x50 || core_id_2 == 0x51))