* [PATCH 1/4] ASoC: codecs: wsa883x: fix unnecessary initialisation
2026-01-02 11:14 [PATCH 0/4] ASoC: codecs: wsa88xx: fix codec initialisation Johan Hovold
@ 2026-01-02 11:14 ` Johan Hovold
2026-01-05 9:31 ` Krzysztof Kozlowski
2026-01-02 11:14 ` [PATCH 2/4] ASoC: codecs: wsa881x: " Johan Hovold
` (4 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Johan Hovold @ 2026-01-02 11:14 UTC (permalink / raw)
To: Srinivas Kandagatla, Mark Brown
Cc: Liam Girdwood, linux-sound, linux-arm-msm, linux-kernel,
Johan Hovold, stable
The soundwire update_status() callback may be called multiple times with
the same ATTACHED status but initialisation should only be done when
transitioning from UNATTACHED to ATTACHED.
This avoids repeated initialisation of the codecs during boot of
machines like the Lenovo ThinkPad X13s:
[ 11.614523] wsa883x-codec sdw:1:0:0217:0202:00:1: WSA883X Version 1_1, Variant: WSA8835_V2
[ 11.618022] wsa883x-codec sdw:1:0:0217:0202:00:1: WSA883X Version 1_1, Variant: WSA8835_V2
[ 11.621377] wsa883x-codec sdw:1:0:0217:0202:00:1: WSA883X Version 1_1, Variant: WSA8835_V2
[ 11.624065] wsa883x-codec sdw:1:0:0217:0202:00:1: WSA883X Version 1_1, Variant: WSA8835_V2
[ 11.631382] wsa883x-codec sdw:1:0:0217:0202:00:2: WSA883X Version 1_1, Variant: WSA8835_V2
[ 11.634424] wsa883x-codec sdw:1:0:0217:0202:00:2: WSA883X Version 1_1, Variant: WSA8835_V2
Fixes: 43b8c7dc85a1 ("ASoC: codecs: add wsa883x amplifier support")
Cc: stable@vger.kernel.org # 6.0
Cc: Srinivas Kandagatla <srini@kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
sound/soc/codecs/wsa883x.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c
index c3046e260cb9..3ffea56aeb0f 100644
--- a/sound/soc/codecs/wsa883x.c
+++ b/sound/soc/codecs/wsa883x.c
@@ -475,6 +475,7 @@ struct wsa883x_priv {
int active_ports;
int dev_mode;
int comp_offset;
+ bool hw_init;
/*
* Protects temperature reading code (related to speaker protection) and
* fields: temperature and pa_on.
@@ -1043,6 +1044,9 @@ static int wsa883x_init(struct wsa883x_priv *wsa883x)
struct regmap *regmap = wsa883x->regmap;
int variant, version, ret;
+ if (wsa883x->hw_init)
+ return 0;
+
ret = regmap_read(regmap, WSA883X_OTP_REG_0, &variant);
if (ret)
return ret;
@@ -1085,6 +1089,8 @@ static int wsa883x_init(struct wsa883x_priv *wsa883x)
wsa883x->comp_offset);
}
+ wsa883x->hw_init = true;
+
return 0;
}
@@ -1093,6 +1099,9 @@ static int wsa883x_update_status(struct sdw_slave *slave,
{
struct wsa883x_priv *wsa883x = dev_get_drvdata(&slave->dev);
+ if (status == SDW_SLAVE_UNATTACHED)
+ wsa883x->hw_init = false;
+
if (status == SDW_SLAVE_ATTACHED && slave->dev_num > 0)
return wsa883x_init(wsa883x);
--
2.51.2
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH 1/4] ASoC: codecs: wsa883x: fix unnecessary initialisation
2026-01-02 11:14 ` [PATCH 1/4] ASoC: codecs: wsa883x: fix unnecessary initialisation Johan Hovold
@ 2026-01-05 9:31 ` Krzysztof Kozlowski
0 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-05 9:31 UTC (permalink / raw)
To: Johan Hovold, Srinivas Kandagatla, Mark Brown
Cc: Liam Girdwood, linux-sound, linux-arm-msm, linux-kernel, stable
On 02/01/2026 12:14, Johan Hovold wrote:
> The soundwire update_status() callback may be called multiple times with
> the same ATTACHED status but initialisation should only be done when
> transitioning from UNATTACHED to ATTACHED.
>
> This avoids repeated initialisation of the codecs during boot of
> machines like the Lenovo ThinkPad X13s:
>
> [ 11.614523] wsa883x-codec sdw:1:0:0217:0202:00:1: WSA883X Version 1_1, Variant: WSA8835_V2
> [ 11.618022] wsa883x-codec sdw:1:0:0217:0202:00:1: WSA883X Version 1_1, Variant: WSA8835_V2
> [ 11.621377] wsa883x-codec sdw:1:0:0217:0202:00:1: WSA883X Version 1_1, Variant: WSA8835_V2
> [ 11.624065] wsa883x-codec sdw:1:0:0217:0202:00:1: WSA883X Version 1_1, Variant: WSA8835_V2
> [ 11.631382] wsa883x-codec sdw:1:0:0217:0202:00:2: WSA883X Version 1_1, Variant: WSA8835_V2
> [ 11.634424] wsa883x-codec sdw:1:0:0217:0202:00:2: WSA883X Version 1_1, Variant: WSA8835_V2
>
> Fixes: 43b8c7dc85a1 ("ASoC: codecs: add wsa883x amplifier support")
> Cc: stable@vger.kernel.org # 6.0
> Cc: Srinivas Kandagatla <srini@kernel.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 2/4] ASoC: codecs: wsa881x: fix unnecessary initialisation
2026-01-02 11:14 [PATCH 0/4] ASoC: codecs: wsa88xx: fix codec initialisation Johan Hovold
2026-01-02 11:14 ` [PATCH 1/4] ASoC: codecs: wsa883x: fix unnecessary initialisation Johan Hovold
@ 2026-01-02 11:14 ` Johan Hovold
2026-01-05 9:32 ` Krzysztof Kozlowski
2026-01-02 11:14 ` [PATCH 3/4] ASoC: codecs: wsa884x: fix codec initialisation Johan Hovold
` (3 subsequent siblings)
5 siblings, 1 reply; 16+ messages in thread
From: Johan Hovold @ 2026-01-02 11:14 UTC (permalink / raw)
To: Srinivas Kandagatla, Mark Brown
Cc: Liam Girdwood, linux-sound, linux-arm-msm, linux-kernel,
Johan Hovold, stable
The soundwire update_status() callback may be called multiple times with
the same ATTACHED status but initialisation should only be done when
transitioning from UNATTACHED to ATTACHED.
Fixes: a0aab9e1404a ("ASoC: codecs: add wsa881x amplifier support")
Cc: stable@vger.kernel.org # 5.6
Cc: Srinivas Kandagatla <srini@kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
sound/soc/codecs/wsa881x.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/sound/soc/codecs/wsa881x.c b/sound/soc/codecs/wsa881x.c
index d7aca6567c2d..2fc234adca5f 100644
--- a/sound/soc/codecs/wsa881x.c
+++ b/sound/soc/codecs/wsa881x.c
@@ -678,6 +678,7 @@ struct wsa881x_priv {
*/
unsigned int sd_n_val;
int active_ports;
+ bool hw_init;
bool port_prepared[WSA881X_MAX_SWR_PORTS];
bool port_enable[WSA881X_MAX_SWR_PORTS];
};
@@ -687,6 +688,9 @@ static void wsa881x_init(struct wsa881x_priv *wsa881x)
struct regmap *rm = wsa881x->regmap;
unsigned int val = 0;
+ if (wsa881x->hw_init)
+ return;
+
regmap_register_patch(wsa881x->regmap, wsa881x_rev_2_0,
ARRAY_SIZE(wsa881x_rev_2_0));
@@ -724,6 +728,8 @@ static void wsa881x_init(struct wsa881x_priv *wsa881x)
regmap_update_bits(rm, WSA881X_OTP_REG_28, 0x3F, 0x3A);
regmap_update_bits(rm, WSA881X_BONGO_RESRV_REG1, 0xFF, 0xB2);
regmap_update_bits(rm, WSA881X_BONGO_RESRV_REG2, 0xFF, 0x05);
+
+ wsa881x->hw_init = true;
}
static int wsa881x_component_probe(struct snd_soc_component *comp)
@@ -1067,6 +1073,9 @@ static int wsa881x_update_status(struct sdw_slave *slave,
{
struct wsa881x_priv *wsa881x = dev_get_drvdata(&slave->dev);
+ if (status == SDW_SLAVE_UNATTACHED)
+ wsa881x->hw_init = false;
+
if (status == SDW_SLAVE_ATTACHED && slave->dev_num > 0)
wsa881x_init(wsa881x);
--
2.51.2
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH 2/4] ASoC: codecs: wsa881x: fix unnecessary initialisation
2026-01-02 11:14 ` [PATCH 2/4] ASoC: codecs: wsa881x: " Johan Hovold
@ 2026-01-05 9:32 ` Krzysztof Kozlowski
0 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-05 9:32 UTC (permalink / raw)
To: Johan Hovold, Srinivas Kandagatla, Mark Brown
Cc: Liam Girdwood, linux-sound, linux-arm-msm, linux-kernel, stable
On 02/01/2026 12:14, Johan Hovold wrote:
> The soundwire update_status() callback may be called multiple times with
> the same ATTACHED status but initialisation should only be done when
> transitioning from UNATTACHED to ATTACHED.
>
> Fixes: a0aab9e1404a ("ASoC: codecs: add wsa881x amplifier support")
> Cc: stable@vger.kernel.org # 5.6
> Cc: Srinivas Kandagatla <srini@kernel.org>
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 3/4] ASoC: codecs: wsa884x: fix codec initialisation
2026-01-02 11:14 [PATCH 0/4] ASoC: codecs: wsa88xx: fix codec initialisation Johan Hovold
2026-01-02 11:14 ` [PATCH 1/4] ASoC: codecs: wsa883x: fix unnecessary initialisation Johan Hovold
2026-01-02 11:14 ` [PATCH 2/4] ASoC: codecs: wsa881x: " Johan Hovold
@ 2026-01-02 11:14 ` Johan Hovold
2026-01-02 11:31 ` Krzysztof Kozlowski
2026-01-05 9:30 ` Krzysztof Kozlowski
2026-01-02 11:14 ` [PATCH 4/4] ASoC: codecs: wsa883x: suppress variant printk Johan Hovold
` (2 subsequent siblings)
5 siblings, 2 replies; 16+ messages in thread
From: Johan Hovold @ 2026-01-02 11:14 UTC (permalink / raw)
To: Srinivas Kandagatla, Mark Brown
Cc: Liam Girdwood, linux-sound, linux-arm-msm, linux-kernel,
Johan Hovold, stable, Krzysztof Kozlowski
The soundwire update_status() callback may be called multiple times with
the same ATTACHED status but initialisation should only be done when
transitioning from UNATTACHED to ATTACHED.
Fix the inverted hw_init flag which was set to false instead of true
after initialisation which defeats its purpose and may result in
repeated unnecessary initialisation.
Similarly, the initial state of the flag was also inverted so that the
codec would only be initialised and brought out of regmap cache only
mode if its status first transitions to UNATTACHED.
Fixes: aa21a7d4f68a ("ASoC: codecs: wsa884x: Add WSA884x family of speakers")
Cc: stable@vger.kernel.org # 6.5
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
---
sound/soc/codecs/wsa884x.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wsa884x.c b/sound/soc/codecs/wsa884x.c
index 887edd2be705..6c6b497657d0 100644
--- a/sound/soc/codecs/wsa884x.c
+++ b/sound/soc/codecs/wsa884x.c
@@ -1534,7 +1534,7 @@ static void wsa884x_init(struct wsa884x_priv *wsa884x)
wsa884x_set_gain_parameters(wsa884x);
- wsa884x->hw_init = false;
+ wsa884x->hw_init = true;
}
static int wsa884x_update_status(struct sdw_slave *slave,
@@ -2109,7 +2109,6 @@ static int wsa884x_probe(struct sdw_slave *pdev,
/* Start in cache-only until device is enumerated */
regcache_cache_only(wsa884x->regmap, true);
- wsa884x->hw_init = true;
if (IS_REACHABLE(CONFIG_HWMON)) {
struct device *hwmon;
--
2.51.2
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH 3/4] ASoC: codecs: wsa884x: fix codec initialisation
2026-01-02 11:14 ` [PATCH 3/4] ASoC: codecs: wsa884x: fix codec initialisation Johan Hovold
@ 2026-01-02 11:31 ` Krzysztof Kozlowski
2026-01-02 11:43 ` Johan Hovold
2026-01-05 9:30 ` Krzysztof Kozlowski
1 sibling, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-02 11:31 UTC (permalink / raw)
To: Johan Hovold, Srinivas Kandagatla, Mark Brown
Cc: Liam Girdwood, linux-sound, linux-arm-msm, linux-kernel, stable
On 02/01/2026 12:14, Johan Hovold wrote:
> The soundwire update_status() callback may be called multiple times with
> the same ATTACHED status but initialisation should only be done when
> transitioning from UNATTACHED to ATTACHED.
>
> Fix the inverted hw_init flag which was set to false instead of true
> after initialisation which defeats its purpose and may result in
> repeated unnecessary initialisation.
Either it results or it does not, not "may". If the device moves to
UNATTACHED state flag should be probably set to "true". This is the bug.
>
> Similarly, the initial state of the flag was also inverted so that the
> codec would only be initialised and brought out of regmap cache only
> mode if its status first transitions to UNATTACHED.
Maybe that's confusing wording but existing code was intentional and IMO
almost correct. The flag is saying - we need hw init - that's why it is
set to true in the probe and to false AFTER the proper hw initialization
which is done after ATTACHED state.
If you find naming confusing, maybe rename it to other style or fix the
false -> true when going to unattached stat, but not everything at once.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/4] ASoC: codecs: wsa884x: fix codec initialisation
2026-01-02 11:31 ` Krzysztof Kozlowski
@ 2026-01-02 11:43 ` Johan Hovold
2026-01-02 11:50 ` Krzysztof Kozlowski
0 siblings, 1 reply; 16+ messages in thread
From: Johan Hovold @ 2026-01-02 11:43 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Srinivas Kandagatla, Mark Brown, Liam Girdwood, linux-sound,
linux-arm-msm, linux-kernel, stable
On Fri, Jan 02, 2026 at 12:31:21PM +0100, Krzysztof Kozlowski wrote:
> On 02/01/2026 12:14, Johan Hovold wrote:
> > The soundwire update_status() callback may be called multiple times with
> > the same ATTACHED status but initialisation should only be done when
> > transitioning from UNATTACHED to ATTACHED.
> >
> > Fix the inverted hw_init flag which was set to false instead of true
> > after initialisation which defeats its purpose and may result in
> > repeated unnecessary initialisation.
>
> Either it results or it does not, not "may".
No, it depends on whether update_status() is called with the same status
more than once. So "may" is correct here.
> If the device moves to
> UNATTACHED state flag should be probably set to "true". This is the bug.
No, update_status() has:
if (wsa884x->hw_init || status != SDW_SLAVE_ATTACHED)
return 0;
...
wsa884x_init(wsa884x);
so if you set hw_init to true then init is never called when status is
changed to ATTACHED.
> >
> > Similarly, the initial state of the flag was also inverted so that the
> > codec would only be initialised and brought out of regmap cache only
> > mode if its status first transitions to UNATTACHED.
>
> Maybe that's confusing wording but existing code was intentional and IMO
> almost correct. The flag is saying - we need hw init - that's why it is
> set to true in the probe and to false AFTER the proper hw initialization
> which is done after ATTACHED state.
All other codec drivers have hw_init mean that init has been done and
the check in update_status() reflects that too so this driver is still
broken.
Johan
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/4] ASoC: codecs: wsa884x: fix codec initialisation
2026-01-02 11:43 ` Johan Hovold
@ 2026-01-02 11:50 ` Krzysztof Kozlowski
2026-01-02 12:17 ` Johan Hovold
0 siblings, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-02 11:50 UTC (permalink / raw)
To: Johan Hovold
Cc: Srinivas Kandagatla, Mark Brown, Liam Girdwood, linux-sound,
linux-arm-msm, linux-kernel, stable
On 02/01/2026 12:43, Johan Hovold wrote:
> On Fri, Jan 02, 2026 at 12:31:21PM +0100, Krzysztof Kozlowski wrote:
>> On 02/01/2026 12:14, Johan Hovold wrote:
>>> The soundwire update_status() callback may be called multiple times with
>>> the same ATTACHED status but initialisation should only be done when
>>> transitioning from UNATTACHED to ATTACHED.
>>>
>>> Fix the inverted hw_init flag which was set to false instead of true
>>> after initialisation which defeats its purpose and may result in
>>> repeated unnecessary initialisation.
>>
>> Either it results or it does not, not "may".
>
> No, it depends on whether update_status() is called with the same status
> more than once. So "may" is correct here.
>
>> If the device moves to
>> UNATTACHED state flag should be probably set to "true". This is the bug.
>
> No, update_status() has:
>
> if (wsa884x->hw_init || status != SDW_SLAVE_ATTACHED)
> return 0;
>
> ...
>
> wsa884x_init(wsa884x);
>
> so if you set hw_init to true then init is never called when status is
> changed to ATTACHED.
Uh, indeed, so this was supposed to be !wsa884x->hw_init... or indeed
your meaning. This also means that this was never passing above if() and
the init() was never called.
regcache was probably synced via runtime PM, so at least that part worked.
Did you test this driver on actual device how it affects the behavior?
>
>>>
>>> Similarly, the initial state of the flag was also inverted so that the
>>> codec would only be initialised and brought out of regmap cache only
>>> mode if its status first transitions to UNATTACHED.
>>
>> Maybe that's confusing wording but existing code was intentional and IMO
>> almost correct. The flag is saying - we need hw init - that's why it is
>> set to true in the probe and to false AFTER the proper hw initialization
>> which is done after ATTACHED state.
>
> All other codec drivers have hw_init mean that init has been done and
> the check in update_status() reflects that too so this driver is still
> broken.
ok
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/4] ASoC: codecs: wsa884x: fix codec initialisation
2026-01-02 11:50 ` Krzysztof Kozlowski
@ 2026-01-02 12:17 ` Johan Hovold
2026-01-02 12:26 ` Krzysztof Kozlowski
0 siblings, 1 reply; 16+ messages in thread
From: Johan Hovold @ 2026-01-02 12:17 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Srinivas Kandagatla, Mark Brown, Liam Girdwood, linux-sound,
linux-arm-msm, linux-kernel, stable
On Fri, Jan 02, 2026 at 12:50:45PM +0100, Krzysztof Kozlowski wrote:
> On 02/01/2026 12:43, Johan Hovold wrote:
> > On Fri, Jan 02, 2026 at 12:31:21PM +0100, Krzysztof Kozlowski wrote:
> >> On 02/01/2026 12:14, Johan Hovold wrote:
> >>> The soundwire update_status() callback may be called multiple times with
> >>> the same ATTACHED status but initialisation should only be done when
> >>> transitioning from UNATTACHED to ATTACHED.
> >>>
> >>> Fix the inverted hw_init flag which was set to false instead of true
> >>> after initialisation which defeats its purpose and may result in
> >>> repeated unnecessary initialisation.
> > No, update_status() has:
> >
> > if (wsa884x->hw_init || status != SDW_SLAVE_ATTACHED)
> > return 0;
> >
> > ...
> >
> > wsa884x_init(wsa884x);
> >
> > so if you set hw_init to true then init is never called when status is
> > changed to ATTACHED.
>
> Uh, indeed, so this was supposed to be !wsa884x->hw_init... or indeed
> your meaning. This also means that this was never passing above if() and
> the init() was never called.
>
> regcache was probably synced via runtime PM, so at least that part worked.
>
> Did you test this driver on actual device how it affects the behavior?
No, I don't have a device that uses this codec anymore.
If you could give it a spin that would be great. It seems we have been
depending on reset values or an UNATTACHED => ATTACHED transition so
far.
Johan
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/4] ASoC: codecs: wsa884x: fix codec initialisation
2026-01-02 12:17 ` Johan Hovold
@ 2026-01-02 12:26 ` Krzysztof Kozlowski
0 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-02 12:26 UTC (permalink / raw)
To: Johan Hovold
Cc: Srinivas Kandagatla, Mark Brown, Liam Girdwood, linux-sound,
linux-arm-msm, linux-kernel, stable
On 02/01/2026 13:17, Johan Hovold wrote:
>>> ...
>>>
>>> wsa884x_init(wsa884x);
>>>
>>> so if you set hw_init to true then init is never called when status is
>>> changed to ATTACHED.
>>
>> Uh, indeed, so this was supposed to be !wsa884x->hw_init... or indeed
>> your meaning. This also means that this was never passing above if() and
>> the init() was never called.
>>
>> regcache was probably synced via runtime PM, so at least that part worked.
>>
>> Did you test this driver on actual device how it affects the behavior?
>
> No, I don't have a device that uses this codec anymore.
>
> If you could give it a spin that would be great. It seems we have been
> depending on reset values or an UNATTACHED => ATTACHED transition so
> far.
I can test it, maybe after the weekend.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 3/4] ASoC: codecs: wsa884x: fix codec initialisation
2026-01-02 11:14 ` [PATCH 3/4] ASoC: codecs: wsa884x: fix codec initialisation Johan Hovold
2026-01-02 11:31 ` Krzysztof Kozlowski
@ 2026-01-05 9:30 ` Krzysztof Kozlowski
1 sibling, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-05 9:30 UTC (permalink / raw)
To: Johan Hovold, Srinivas Kandagatla, Mark Brown
Cc: Liam Girdwood, linux-sound, linux-arm-msm, linux-kernel, stable
On 02/01/2026 12:14, Johan Hovold wrote:
> The soundwire update_status() callback may be called multiple times with
> the same ATTACHED status but initialisation should only be done when
> transitioning from UNATTACHED to ATTACHED.
>
> Fix the inverted hw_init flag which was set to false instead of true
> after initialisation which defeats its purpose and may result in
> repeated unnecessary initialisation.
>
> Similarly, the initial state of the flag was also inverted so that the
> codec would only be initialised and brought out of regmap cache only
> mode if its status first transitions to UNATTACHED.
>
> Fixes: aa21a7d4f68a ("ASoC: codecs: wsa884x: Add WSA884x family of speakers")
> Cc: stable@vger.kernel.org # 6.5
> Cc: Krzysztof Kozlowski <krzk@kernel.org>
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Tested on Lenovo T14s:
Tested-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH 4/4] ASoC: codecs: wsa883x: suppress variant printk
2026-01-02 11:14 [PATCH 0/4] ASoC: codecs: wsa88xx: fix codec initialisation Johan Hovold
` (2 preceding siblings ...)
2026-01-02 11:14 ` [PATCH 3/4] ASoC: codecs: wsa884x: fix codec initialisation Johan Hovold
@ 2026-01-02 11:14 ` Johan Hovold
2026-01-05 9:32 ` Krzysztof Kozlowski
2026-01-05 11:50 ` [PATCH 0/4] ASoC: codecs: wsa88xx: fix codec initialisation Srinivas Kandagatla
2026-01-06 18:48 ` Mark Brown
5 siblings, 1 reply; 16+ messages in thread
From: Johan Hovold @ 2026-01-02 11:14 UTC (permalink / raw)
To: Srinivas Kandagatla, Mark Brown
Cc: Liam Girdwood, linux-sound, linux-arm-msm, linux-kernel,
Johan Hovold
Drivers should generally be silent on successful probe.
Demote the codec variant printk to debug level and instead add a warning
in case an unknown variant is ever encountered.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
sound/soc/codecs/wsa883x.c | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c
index 3ffea56aeb0f..468d2b38a22a 100644
--- a/sound/soc/codecs/wsa883x.c
+++ b/sound/soc/codecs/wsa883x.c
@@ -1058,22 +1058,23 @@ static int wsa883x_init(struct wsa883x_priv *wsa883x)
switch (variant) {
case WSA8830:
- dev_info(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8830\n",
- version);
+ dev_dbg(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8830\n",
+ version);
break;
case WSA8835:
- dev_info(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8835\n",
- version);
+ dev_dbg(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8835\n",
+ version);
break;
case WSA8832:
- dev_info(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8832\n",
- version);
+ dev_dbg(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8832\n",
+ version);
break;
case WSA8835_V2:
- dev_info(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8835_V2\n",
- version);
+ dev_dbg(wsa883x->dev, "WSA883X Version 1_%d, Variant: WSA8835_V2\n",
+ version);
break;
default:
+ dev_warn(wsa883x->dev, "unknown variant: %d\n", variant);
break;
}
--
2.51.2
^ permalink raw reply related [flat|nested] 16+ messages in thread* Re: [PATCH 4/4] ASoC: codecs: wsa883x: suppress variant printk
2026-01-02 11:14 ` [PATCH 4/4] ASoC: codecs: wsa883x: suppress variant printk Johan Hovold
@ 2026-01-05 9:32 ` Krzysztof Kozlowski
0 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2026-01-05 9:32 UTC (permalink / raw)
To: Johan Hovold, Srinivas Kandagatla, Mark Brown
Cc: Liam Girdwood, linux-sound, linux-arm-msm, linux-kernel
On 02/01/2026 12:14, Johan Hovold wrote:
> Drivers should generally be silent on successful probe.
>
> Demote the codec variant printk to debug level and instead add a warning
> in case an unknown variant is ever encountered.
>
> Signed-off-by: Johan Hovold <johan@kernel.org>
> ---
> sound/soc/codecs/wsa883x.c | 17 +++++++++--------
> 1 file changed, 9 insertions(+), 8 deletions(-)
>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH 0/4] ASoC: codecs: wsa88xx: fix codec initialisation
2026-01-02 11:14 [PATCH 0/4] ASoC: codecs: wsa88xx: fix codec initialisation Johan Hovold
` (3 preceding siblings ...)
2026-01-02 11:14 ` [PATCH 4/4] ASoC: codecs: wsa883x: suppress variant printk Johan Hovold
@ 2026-01-05 11:50 ` Srinivas Kandagatla
2026-01-06 18:48 ` Mark Brown
5 siblings, 0 replies; 16+ messages in thread
From: Srinivas Kandagatla @ 2026-01-05 11:50 UTC (permalink / raw)
To: Johan Hovold, Srinivas Kandagatla, Mark Brown
Cc: Liam Girdwood, linux-sound, linux-arm-msm, linux-kernel
On 1/2/26 11:14 AM, Johan Hovold wrote:
> The soundwire update_status() callback may be called multiple times with
> the same ATTACHED status but initialisation should only be done when
> transitioning from UNATTACHED to ATTACHED.
>
> This series fixes the Qualcomm wsa88xx codec drivers that do unnecessary
> reinitialisation or potentially fail to initialise at all.
>
> Included is also a related clean up suppressing a related codec variant
> printk.
>
> Johan
>
>
Thanks Johan for cleaning this up.
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
--srini
> Johan Hovold (4):
> ASoC: codecs: wsa883x: fix unnecessary initialisation
> ASoC: codecs: wsa881x: fix unnecessary initialisation
> ASoC: codecs: wsa884x: fix codec initialisation
> ASoC: codecs: wsa883x: suppress variant printk
>
> sound/soc/codecs/wsa881x.c | 9 +++++++++
> sound/soc/codecs/wsa883x.c | 26 ++++++++++++++++++--------
> sound/soc/codecs/wsa884x.c | 3 +--
> 3 files changed, 28 insertions(+), 10 deletions(-)
>
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: [PATCH 0/4] ASoC: codecs: wsa88xx: fix codec initialisation
2026-01-02 11:14 [PATCH 0/4] ASoC: codecs: wsa88xx: fix codec initialisation Johan Hovold
` (4 preceding siblings ...)
2026-01-05 11:50 ` [PATCH 0/4] ASoC: codecs: wsa88xx: fix codec initialisation Srinivas Kandagatla
@ 2026-01-06 18:48 ` Mark Brown
5 siblings, 0 replies; 16+ messages in thread
From: Mark Brown @ 2026-01-06 18:48 UTC (permalink / raw)
To: Srinivas Kandagatla, Johan Hovold
Cc: Liam Girdwood, linux-sound, linux-arm-msm, linux-kernel
On Fri, 02 Jan 2026 12:14:09 +0100, Johan Hovold wrote:
> The soundwire update_status() callback may be called multiple times with
> the same ATTACHED status but initialisation should only be done when
> transitioning from UNATTACHED to ATTACHED.
>
> This series fixes the Qualcomm wsa88xx codec drivers that do unnecessary
> reinitialisation or potentially fail to initialise at all.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/4] ASoC: codecs: wsa883x: fix unnecessary initialisation
commit: 49aadf830eb048134d33ad7329d92ecff45d8dbb
[2/4] ASoC: codecs: wsa881x: fix unnecessary initialisation
commit: 29d71b8a5a40708b3eed9ba4953bfc2312c9c776
[3/4] ASoC: codecs: wsa884x: fix codec initialisation
commit: 120f3e6ff76209ee2f62a64e5e7e9d70274df42b
[4/4] ASoC: codecs: wsa883x: suppress variant printk
commit: 46a16d89d097ac2c93b63382a37d60aa7f21dc71
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] 16+ messages in thread