ASoC: codecs: lpass-wsa-macro: Prepare to accommodate new codec versions
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Tue, 25 Jun 2024 16:58:46 +0000 (18:58 +0200)
committerMark Brown <broonie@kernel.org>
Wed, 26 Jun 2024 11:09:52 +0000 (12:09 +0100)
commit5dcf442bbbcada62631f5a376c44ff794596c2f0
tree30a24ce58174fcea867b5602fc95c0b09c15d6e1
parent04f4de6f68eec73595682f32952467591f0cc016
ASoC: codecs: lpass-wsa-macro: Prepare to accommodate new codec versions

The driver for Qualcomm LPASS WSA macro codec was developed and tested
on codec v2.1, however v2.5 has significant changes in the registers.
The driver correctly works for v2.1 codec, but has issues when running
on SoC with v2.5 codec (so starting with SM8450, even though playback
works properly on that SoC).

Prepare the driver for handling differences in register layouts of newer
version.  This does not have functional impact on older codec versions,
but just:
1. Renames few soc_enums and widgets as v2.1,
2. For registers being different in v2.5, moves the defaults and regmap
   configuration to new structures,
3. Adds new 'struct wsa_reg_layout' with offsets and masks for few
   registers, so most of the code can stay unchaged on v2.5,
4. Chooses proper widgets, regmap config and register layout based on
   version of the codec.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://patch.msgid.link/20240625-qcom-audio-wsa-second-speaker-v1-2-f65ffdfc368c@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/lpass-wsa-macro.c