mbox series

[v3,0/3] ASoC: codecs: lpass: add support for v2.5 rx macro

Message ID 20240612-lpass-codec-v25-v1-0-9f40611a1370@linaro.org
Headers show
Series ASoC: codecs: lpass: add support for v2.5 rx macro | expand

Message

Srinivas Kandagatla June 12, 2024, 4:57 p.m. UTC
This patchset adds support to reading codec version and also adds
support for v2.5 codec version in rx macro. 

LPASS 2.5 and up versions have changes in some of the rx blocks which
are required to get headset functional correctly.

Tested this on SM8450, X13s and x1e80100 crd.

This changes also fixes issue with sm8450, sm8550, sm8660 and x1e80100.

@Neil Armstrong  can you pl test it on sm8650

@Krzysztof Kozlowski can you pl test it on sm8550

Thanks,
Srini

Changes since v2:
	- added some locking around version variable.
	- split 2.5 changes to a new patch.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
Srinivas Kandagatla (3):
      ASoC: codecs: lpass-macro: add helpers to get codec version
      ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions
      ASoC: codec: lpass-rx-macro: add support for 2.5 codec version

 sound/soc/codecs/lpass-macro-common.c |  23 ++
 sound/soc/codecs/lpass-macro-common.h |  35 +++
 sound/soc/codecs/lpass-rx-macro.c     | 555 ++++++++++++++++++++++++----------
 sound/soc/codecs/lpass-va-macro.c     |  29 ++
 4 files changed, 490 insertions(+), 152 deletions(-)
---
base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
change-id: 20240612-lpass-codec-v25-4e960abd661f

Best regards,

Comments

Srinivas Kandagatla June 12, 2024, 6:19 p.m. UTC | #1
On 12/06/2024 19:18, Dmitry Baryshkov wrote:
>> -	memcpy(&reg_defaults[0], rx_defaults, sizeof(rx_defaults));
>> -	memcpy(&reg_defaults[ARRAY_SIZE(rx_defaults)],
>> -			rx_pre_2_5_defaults, sizeof(rx_pre_2_5_defaults));
>> +	switch (rx->codec_version) {
>> +	case LPASS_CODEC_VERSION_2_5 ... LPASS_CODEC_VERSION_2_8:
> I don't like that the next 2.9 version will end up in a default bucket.
> It might be better to have an explicit list of versions instead and then
> return -EINVAL in the default case.
makes sense

--srini
Neil Armstrong June 13, 2024, 10:20 a.m. UTC | #2
On 12/06/2024 18:57, Srinivas Kandagatla wrote:
> This patchset adds support to reading codec version and also adds
> support for v2.5 codec version in rx macro.
> 
> LPASS 2.5 and up versions have changes in some of the rx blocks which
> are required to get headset functional correctly.
> 
> Tested this on SM8450, X13s and x1e80100 crd.
> 
> This changes also fixes issue with sm8450, sm8550, sm8660 and x1e80100.
> 
> @Neil Armstrong  can you pl test it on sm8650
> 
> @Krzysztof Kozlowski can you pl test it on sm8550
> 
> Thanks,
> Srini
> 
> Changes since v2:
> 	- added some locking around version variable.
> 	- split 2.5 changes to a new patch.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
> Srinivas Kandagatla (3):
>        ASoC: codecs: lpass-macro: add helpers to get codec version
>        ASoC: codec: lpass-rx-macro: prepare driver to accomdate new codec versions
>        ASoC: codec: lpass-rx-macro: add support for 2.5 codec version
> 
>   sound/soc/codecs/lpass-macro-common.c |  23 ++
>   sound/soc/codecs/lpass-macro-common.h |  35 +++
>   sound/soc/codecs/lpass-rx-macro.c     | 555 ++++++++++++++++++++++++----------
>   sound/soc/codecs/lpass-va-macro.c     |  29 ++
>   4 files changed, 490 insertions(+), 152 deletions(-)
> ---
> base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
> change-id: 20240612-lpass-codec-v25-4e960abd661f
> 
> Best regards,

[replied to the wrong version, tested v3]

Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8650-HDK

Successfully fixes dual channel output on headset, previously I would only hear
sound on a single channel.

Thanks,
Neil