ASoC: codecs: tx-macro: correct TX SMIC MUXn widgets on SM8350+
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 26 Feb 2024 11:59:25 +0000 (12:59 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 26 Feb 2024 13:46:14 +0000 (13:46 +0000)
commitd34f0c8ee2e30b8a1470ce635289591148552a93
treec994bf08cc090a85b26aafd0158f6e1f1d488375
parent051e887264b3e161cf2c1e163321b31191bf78a4
ASoC: codecs: tx-macro: correct TX SMIC MUXn widgets on SM8350+

Starting with Qualcomm SM8350 SoC, so Low Power Audio SubSystem (LPASS)
block version v9.2, the register responsible for TX SMIC MUXn muxes is
different.  In earlier LPASS versions this mux had bit fields for
analogue (ADCn) and digital (SWR_DMICn) MICs.  Choice of ADCn was
selecting the analogue path in CDC_TX_TOP_CSR_SWR_DMICn_CTL register.

With LPASS v9.2 and newer, the bit fields are integrated into just
SWR_MICn and there is no distinction for analogue or digital MIC in the
register.

Fix support for LPASS v9.2+:
1. Add new set of widgets and audio routes for LPASS v9.2.
2. Do not choose analogue or digital in CDC_TX_TOP_CSR_SWR_DMICn_CTL
   based on value of the mux.
3. Replace all the input widgets (TX SWR_ADCn, TX SWR_DMICn) with TX
   SWR_INPUTn ones.

The change is not backwards compatible with older DTBs and existing
mixer settings, therefore it does not change handling of older platforms
with working micrphones (SC8280xp) but only the ones with issues
(SM8450, SM8550) which need the fix.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://msgid.link/r/20240226115925.53953-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/lpass-macro-common.h
sound/soc/codecs/lpass-tx-macro.c