mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: codecs: lpass-va-macro: Fix LPASS Codec Version for SC7280
@ 2026-05-26 15:03 Luca Weiss
  2026-06-09 14:52 ` Konrad Dybcio
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Luca Weiss @ 2026-05-26 15:03 UTC (permalink / raw)
  To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Dmitry Baryshkov
  Cc: ~postmarketos/upstreaming, phone-devel, linux-sound,
	linux-arm-msm, linux-kernel, Luca Weiss

According to both the static definition in downstream...

  yupik-audio-overlay.dtsi: qcom,bolero-version = <4>;
  #define BOLERO_VERSION_2_0 0x0004)

and the runtime detection:

  CDC_VA_TOP_CSR_CORE_ID_0=0x1
  CDC_VA_TOP_CSR_CORE_ID_1=0xf

SC7280 has LPASS Codec Version 2.0 and not, as declared with
sm8250_va_data LPASS_CODEC_VERSION_1_0.

Create new va_macro_data with .version not set to use the runtime
detection and correctly get .version = LPASS_CODEC_VERSION_2_0.

Fixes: 77212f300bfd ("ASoC: codecs: lpass-va-macro: set the default codec version for sm8250")
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
I'm fairly confident this is correct, but please someone double check
this if they can.
---
 sound/soc/codecs/lpass-va-macro.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c
index 528d5b167ecf..58a5798823d7 100644
--- a/sound/soc/codecs/lpass-va-macro.c
+++ b/sound/soc/codecs/lpass-va-macro.c
@@ -244,6 +244,11 @@ static const struct va_macro_data sm8250_va_data = {
 	.version = LPASS_CODEC_VERSION_1_0,
 };
 
+static const struct va_macro_data sc7280_va_data = {
+	.has_swr_master = false,
+	.has_npl_clk = false,
+};
+
 static const struct va_macro_data sm8450_va_data = {
 	.has_swr_master = true,
 	.has_npl_clk = true,
@@ -1755,7 +1760,7 @@ static const struct dev_pm_ops va_macro_pm_ops = {
 };
 
 static const struct of_device_id va_macro_dt_match[] = {
-	{ .compatible = "qcom,sc7280-lpass-va-macro", .data = &sm8250_va_data },
+	{ .compatible = "qcom,sc7280-lpass-va-macro", .data = &sc7280_va_data },
 	{ .compatible = "qcom,sm6115-lpass-va-macro", .data = &sm8450_va_data },
 	{ .compatible = "qcom,sm8250-lpass-va-macro", .data = &sm8250_va_data },
 	{ .compatible = "qcom,sm8450-lpass-va-macro", .data = &sm8450_va_data },

---
base-commit: 550604d6c9b9efc8d068aff94dc301694a7afdee
change-id: 20260526-sc7280-va-macro-2-0-f0d4591a611b

Best regards,
--  
Luca Weiss <luca.weiss@fairphone.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: codecs: lpass-va-macro: Fix LPASS Codec Version for SC7280
  2026-05-26 15:03 [PATCH] ASoC: codecs: lpass-va-macro: Fix LPASS Codec Version for SC7280 Luca Weiss
@ 2026-06-09 14:52 ` Konrad Dybcio
  2026-06-10 10:52 ` Srinivas Kandagatla
  2026-06-30 11:27 ` Mark Brown
  2 siblings, 0 replies; 6+ messages in thread
From: Konrad Dybcio @ 2026-06-09 14:52 UTC (permalink / raw)
  To: Luca Weiss, Srinivas Kandagatla, Liam Girdwood, Mark Brown,
	Jaroslav Kysela, Takashi Iwai, Dmitry Baryshkov,
	Mohammad Rafi Shaik, Srinivas Kandagatla
  Cc: ~postmarketos/upstreaming, phone-devel, linux-sound,
	linux-arm-msm, linux-kernel

On 5/26/26 5:03 PM, Luca Weiss wrote:
> According to both the static definition in downstream...
> 
>   yupik-audio-overlay.dtsi: qcom,bolero-version = <4>;
>   #define BOLERO_VERSION_2_0 0x0004)
> 
> and the runtime detection:
> 
>   CDC_VA_TOP_CSR_CORE_ID_0=0x1
>   CDC_VA_TOP_CSR_CORE_ID_1=0xf

Some page tells me this corresponds to Bolero v1.0.0 (as found on sm8350)

But maybe +Srini or +Mohammad will know more

Konrad

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: codecs: lpass-va-macro: Fix LPASS Codec Version for SC7280
  2026-05-26 15:03 [PATCH] ASoC: codecs: lpass-va-macro: Fix LPASS Codec Version for SC7280 Luca Weiss
  2026-06-09 14:52 ` Konrad Dybcio
@ 2026-06-10 10:52 ` Srinivas Kandagatla
  2026-06-11 10:16   ` Luca Weiss
  2026-06-30 11:27 ` Mark Brown
  2 siblings, 1 reply; 6+ messages in thread
From: Srinivas Kandagatla @ 2026-06-10 10:52 UTC (permalink / raw)
  To: Luca Weiss, Srinivas Kandagatla, Liam Girdwood, Mark Brown,
	Jaroslav Kysela, Takashi Iwai, Dmitry Baryshkov
  Cc: ~postmarketos/upstreaming, phone-devel, linux-sound,
	linux-arm-msm, linux-kernel


Thanks Luca for the patch,

On 5/26/26 4:03 PM, Luca Weiss wrote:
> According to both the static definition in downstream...
> 
>   yupik-audio-overlay.dtsi: qcom,bolero-version = <4>;
>   #define BOLERO_VERSION_2_0 0x0004)
> 
> and the runtime detection:
> 
>   CDC_VA_TOP_CSR_CORE_ID_0=0x1
>   CDC_VA_TOP_CSR_CORE_ID_1=0xf
> 
> SC7280 has LPASS Codec Version 2.0 and not, as declared with
> sm8250_va_data LPASS_CODEC_VERSION_1_0.
> 
> Create new va_macro_data with .version not set to use the runtime
> detection and correctly get .version = LPASS_CODEC_VERSION_2_0.
> 
> Fixes: 77212f300bfd ("ASoC: codecs: lpass-va-macro: set the default codec version for sm8250")

Can you help me understand if this change was fixing any issue, if so
can you pl add CC stable

> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> I'm fairly confident this is correct, but please someone double check
> this if they can.

Yes, you are correct, this is actually Bolero 1.1.0 Version where things
have changed in codec. if you read major number it will be 1
This has been artificially tagged as 2.0 in the driver.
So the change that you are doing is correct.



Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>

--srini
> ---
>  sound/soc/codecs/lpass-va-macro.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/soc/codecs/lpass-va-macro.c b/sound/soc/codecs/lpass-va-macro.c
> index 528d5b167ecf..58a5798823d7 100644
> --- a/sound/soc/codecs/lpass-va-macro.c
> +++ b/sound/soc/codecs/lpass-va-macro.c
> @@ -244,6 +244,11 @@ static const struct va_macro_data sm8250_va_data = {
>  	.version = LPASS_CODEC_VERSION_1_0,
>  };
>  
> +static const struct va_macro_data sc7280_va_data = {
> +	.has_swr_master = false,
> +	.has_npl_clk = false,
> +};
> +
>  static const struct va_macro_data sm8450_va_data = {
>  	.has_swr_master = true,
>  	.has_npl_clk = true,
> @@ -1755,7 +1760,7 @@ static const struct dev_pm_ops va_macro_pm_ops = {
>  };
>  
>  static const struct of_device_id va_macro_dt_match[] = {
> -	{ .compatible = "qcom,sc7280-lpass-va-macro", .data = &sm8250_va_data },
> +	{ .compatible = "qcom,sc7280-lpass-va-macro", .data = &sc7280_va_data },
>  	{ .compatible = "qcom,sm6115-lpass-va-macro", .data = &sm8450_va_data },
>  	{ .compatible = "qcom,sm8250-lpass-va-macro", .data = &sm8250_va_data },
>  	{ .compatible = "qcom,sm8450-lpass-va-macro", .data = &sm8450_va_data },
> 
> ---
> base-commit: 550604d6c9b9efc8d068aff94dc301694a7afdee
> change-id: 20260526-sc7280-va-macro-2-0-f0d4591a611b
> 
> Best regards,
> --  
> Luca Weiss <luca.weiss@fairphone.com>
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: codecs: lpass-va-macro: Fix LPASS Codec Version for SC7280
  2026-06-10 10:52 ` Srinivas Kandagatla
@ 2026-06-11 10:16   ` Luca Weiss
  2026-06-14 21:40     ` Srinivas Kandagatla
  0 siblings, 1 reply; 6+ messages in thread
From: Luca Weiss @ 2026-06-11 10:16 UTC (permalink / raw)
  To: Srinivas Kandagatla, Luca Weiss, Srinivas Kandagatla,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Dmitry Baryshkov
  Cc: ~postmarketos/upstreaming, phone-devel, linux-sound,
	linux-arm-msm, linux-kernel

On Wed Jun 10, 2026 at 12:52 PM CEST, Srinivas Kandagatla wrote:
>
> Thanks Luca for the patch,
>
> On 5/26/26 4:03 PM, Luca Weiss wrote:
>> According to both the static definition in downstream...
>> 
>>   yupik-audio-overlay.dtsi: qcom,bolero-version = <4>;
>>   #define BOLERO_VERSION_2_0 0x0004)
>> 
>> and the runtime detection:
>> 
>>   CDC_VA_TOP_CSR_CORE_ID_0=0x1
>>   CDC_VA_TOP_CSR_CORE_ID_1=0xf
>> 
>> SC7280 has LPASS Codec Version 2.0 and not, as declared with
>> sm8250_va_data LPASS_CODEC_VERSION_1_0.
>> 
>> Create new va_macro_data with .version not set to use the runtime
>> detection and correctly get .version = LPASS_CODEC_VERSION_2_0.
>> 
>> Fixes: 77212f300bfd ("ASoC: codecs: lpass-va-macro: set the default codec version for sm8250")
>
> Can you help me understand if this change was fixing any issue, if so
> can you pl add CC stable

I'm pretty sure that just came around because I was looking at the
different parts of the audio stack and trying to figure out if there's
something wrong somewhere, and how the different versions floating
around downstream & upstream & documentation match up.

I'm not aware of a situation where this change makes a difference -
apart from the dev_dbg() print.

>
>> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
>> ---
>> I'm fairly confident this is correct, but please someone double check
>> this if they can.
>
> Yes, you are correct, this is actually Bolero 1.1.0 Version where things
> have changed in codec. if you read major number it will be 1
> This has been artificially tagged as 2.0 in the driver.
> So the change that you are doing is correct.
>
> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>

Thanks a lot for checking! Opens even more questions in my mind, why
1.1.0 == 2.0 but somebody somewhere decided that at some point I guess.

Regards
Luca

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: codecs: lpass-va-macro: Fix LPASS Codec Version for SC7280
  2026-06-11 10:16   ` Luca Weiss
@ 2026-06-14 21:40     ` Srinivas Kandagatla
  0 siblings, 0 replies; 6+ messages in thread
From: Srinivas Kandagatla @ 2026-06-14 21:40 UTC (permalink / raw)
  To: Luca Weiss, Srinivas Kandagatla, Srinivas Kandagatla,
	Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Dmitry Baryshkov
  Cc: ~postmarketos/upstreaming, phone-devel, linux-sound,
	linux-arm-msm, linux-kernel



On 6/11/26 11:16 AM, Luca Weiss wrote:
> On Wed Jun 10, 2026 at 12:52 PM CEST, Srinivas Kandagatla wrote:
>>
>> Thanks Luca for the patch,
>>
>> On 5/26/26 4:03 PM, Luca Weiss wrote:
>>> According to both the static definition in downstream...
>>>
>>>   yupik-audio-overlay.dtsi: qcom,bolero-version = <4>;
>>>   #define BOLERO_VERSION_2_0 0x0004)
>>>
>>> and the runtime detection:
>>>
>>>   CDC_VA_TOP_CSR_CORE_ID_0=0x1
>>>   CDC_VA_TOP_CSR_CORE_ID_1=0xf
>>>
>>> SC7280 has LPASS Codec Version 2.0 and not, as declared with
>>> sm8250_va_data LPASS_CODEC_VERSION_1_0.
>>>
>>> Create new va_macro_data with .version not set to use the runtime
>>> detection and correctly get .version = LPASS_CODEC_VERSION_2_0.
>>>
>>> Fixes: 77212f300bfd ("ASoC: codecs: lpass-va-macro: set the default codec version for sm8250")
>>
>> Can you help me understand if this change was fixing any issue, if so
>> can you pl add CC stable
> 
> I'm pretty sure that just came around because I was looking at the
> different parts of the audio stack and trying to figure out if there's
> something wrong somewhere, and how the different versions floating
> around downstream & upstream & documentation match up.
> 
> I'm not aware of a situation where this change makes a difference -
> apart from the dev_dbg() print.
> 
>>
>>> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
>>> ---
>>> I'm fairly confident this is correct, but please someone double check
>>> this if they can.
>>
>> Yes, you are correct, this is actually Bolero 1.1.0 Version where things
>> have changed in codec. if you read major number it will be 1
>> This has been artificially tagged as 2.0 in the driver.
>> So the change that you are doing is correct.
>>
>> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
> 
> Thanks a lot for checking! Opens even more questions in my mind, why
> 1.1.0 == 2.0 but somebody somewhere decided that at some point I guess.

I have no idea why this was done, Looking at the downstream drivers, am
guessing that there were two different variants of lpass codec drivers
in downstream one is less than v1 and other one is v2. 1.1.0 is
supported in v2 driver.

--srini
> 
> Regards
> Luca


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ASoC: codecs: lpass-va-macro: Fix LPASS Codec Version for SC7280
  2026-05-26 15:03 [PATCH] ASoC: codecs: lpass-va-macro: Fix LPASS Codec Version for SC7280 Luca Weiss
  2026-06-09 14:52 ` Konrad Dybcio
  2026-06-10 10:52 ` Srinivas Kandagatla
@ 2026-06-30 11:27 ` Mark Brown
  2 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2026-06-30 11:27 UTC (permalink / raw)
  To: Srinivas Kandagatla, Liam Girdwood, Jaroslav Kysela,
	Takashi Iwai, Dmitry Baryshkov, Luca Weiss
  Cc: ~postmarketos/upstreaming, phone-devel, linux-sound,
	linux-arm-msm, linux-kernel

On Tue, 26 May 2026 17:03:05 +0200, Luca Weiss wrote:
> ASoC: codecs: lpass-va-macro: Fix LPASS Codec Version for SC7280

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.2

Thanks!

[1/1] ASoC: codecs: lpass-va-macro: Fix LPASS Codec Version for SC7280
      https://git.kernel.org/broonie/sound/c/0773610eef71

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-06-30 15:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-26 15:03 [PATCH] ASoC: codecs: lpass-va-macro: Fix LPASS Codec Version for SC7280 Luca Weiss
2026-06-09 14:52 ` Konrad Dybcio
2026-06-10 10:52 ` Srinivas Kandagatla
2026-06-11 10:16   ` Luca Weiss
2026-06-14 21:40     ` Srinivas Kandagatla
2026-06-30 11:27 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®