2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-11-23 10:06:28 +08:00

UPSTREAM: 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>

---

Changes in v3:
1. Do not change driver match data for SC8280xp, because of
   compatibility reasons. Unlike on other newer platforms like SM8450
   and SM8550, microphones are working fine on SC8280xp so apparently
   the fix is not necessary on SC8280xp.

Changes in v2:
1. Keep all the MSM_DMIC/TX DMIC MUX audio routes in the shared
   tx_audio_map, because it does not differ between v9 and v9.2.

2. Drop backwards compatible widgets because they create issues with
   routes in existing DTS.

(cherry picked from commit 5ef64853515dcaaaf7095e739392ffa2c8921901)
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
This commit is contained in:
Krzysztof Kozlowski 2024-02-02 16:17:53 +01:00 committed by Xilin Wu
parent 1fdafa1c6e
commit ba1d39f0e3

View File

@ -2539,7 +2539,7 @@ static const struct of_device_id tx_macro_dt_match[] = {
* is not necessary. * is not necessary.
*/ */
.compatible = "qcom,sc7280-lpass-tx-macro", .compatible = "qcom,sc7280-lpass-tx-macro",
.data = &lpass_ver_9, .data = &lpass_ver_9_2,
}, { }, {
.compatible = "qcom,sm6115-lpass-tx-macro", .compatible = "qcom,sm6115-lpass-tx-macro",
.data = &lpass_ver_10_sm6115, .data = &lpass_ver_10_sm6115,