Re: [PATCH v6 v6 3/9] ASoC: qcom: lpass-rx-macro: Add shikra compatible

From: Mohammad Rafi Shaik

Date: Thu Nov 12 2026 - 05:32:08 EST




On 11/9/2026 8:45 PM, Srinivas Kandagatla wrote:


On 11/6/26 12:33 PM, Mohammad Rafi Shaik wrote:
Add shikra RX macro compatible data and hook it into the LPASS codec
v4.1 flow.

The RX macro register layout of LPASS codec v4.1 matches the v2.5+
layout, so reuse the existing v2.5 register access helpers, controls
and widgets for it.

v4.1 additionally requires the FS counter to be bypassed before it is
enabled during MCLK enable. This is a property of the codec version and
not of the board, so key it off the version detected by the VA macro
rather than off match data.

Reviewed-by: Ajay Kumar Nandam <ajay.nandam@xxxxxxxxxxxxxxxx>
Signed-off-by: Mohammad Rafi Shaik <mohammad.rafi.shaik@xxxxxxxxxxxxxxxx>
---
sound/soc/codecs/lpass-macro-common.h | 3 +++
sound/soc/codecs/lpass-rx-macro.c | 14 ++++++++++++++
2 files changed, 17 insertions(+)

diff --git a/sound/soc/codecs/lpass-macro-common.h b/sound/soc/codecs/lpass-macro-common.h
index 573b2145e1c4..b52665b11e35 100644
--- a/sound/soc/codecs/lpass-macro-common.h
+++ b/sound/soc/codecs/lpass-macro-common.h
@@ -30,6 +30,7 @@ enum lpass_codec_version {
LPASS_CODEC_VERSION_2_7,
LPASS_CODEC_VERSION_2_8,
LPASS_CODEC_VERSION_2_9,
+ LPASS_CODEC_VERSION_4_1,
};
case LPASS_CODEC_VERSION_2_8:
+ case LPASS_CODEC_VERSION_4_1:
rx->rxn_reg_stride = 0xc0;
rx->rxn_reg_stride2 = 0x0;
+ rx->fs_cnt_bypass = (rx->codec_version == LPASS_CODEC_VERSION_4_1);

This does not look great, can we move this to of data?


The FS control bypass is version-specific rather than SoC-specific. I initially handled this through OF match data, but later moved it to the codec-version check since the behavior depends on the codec version.

Best Regards,
Rafi.


--srini

def_count = ARRAY_SIZE(rx_defaults) + ARRAY_SIZE(rx_2_5_defaults);
reg_defaults = kmalloc_objs(struct reg_default, def_count);
if (!reg_defaults)
@@ -3951,6 +3962,9 @@ static const struct of_device_id rx_macro_dt_match[] = {
}, {
.compatible = "qcom,sc8280xp-lpass-rx-macro",
.data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK,
+ }, {
+ .compatible = "qcom,shikra-lpass-rx-macro",
+ .data = (void *)LPASS_MACRO_FLAG_HAS_NPL_CLOCK,
},
{ }
};