* [PATCH 0/5] Fix SoundWire randconfig issues
@ 2026-06-20 11:02 Charles Keepax
2026-06-20 11:02 ` [PATCH 1/5] soundwire: Move wait for initialisation helper to header Charles Keepax
` (5 more replies)
0 siblings, 6 replies; 8+ messages in thread
From: Charles Keepax @ 2026-06-20 11:02 UTC (permalink / raw)
To: broonie, vkoul, arnd
Cc: lgirdwood, pierre-louis.bossart, yung-chuan.liao, peter.ujfalusi,
oder_chiou, jack.yu, shumingf, niranjan.hy, shenghao-ding,
kevin-lu, baojun.xu, sen, zhangyi, linux-sound, linux-kernel,
patches
Moving all the waiting for soundwire devices to enumerate into the core
code [1] has caused some randconfig issues. This is the second attempt
to fix this after there were some short coming in [2].
Sorry for sending during the merge window, but people are keen to see
a solution posted.
Thanks,
Charles
[1] https://lore.kernel.org/linux-sound/20260608102714.2503120-1-ckeepax@opensource.cirrus.com/
[2] https://lore.kernel.org/lkml/20260615150523.4006982-1-ckeepax@opensource.cirrus.com/
Charles Keepax (5):
soundwire: Move wait for initialisation helper to header
ASoC: es9356: Add back local call to sdw_show_ping_status()
ASoC: max98373: Add back local call to sdw_show_ping_status()
ASoC: ti: Add back local call to sdw_show_ping_status()
ASoC: realtek: Add back local call to sdw_show_ping_status()
drivers/soundwire/bus.c | 28 ----------------------
include/linux/soundwire/sdw.h | 37 +++++++++++++++++++++++-------
sound/soc/codecs/es9356.c | 4 +++-
sound/soc/codecs/max98373-sdw.c | 4 +++-
sound/soc/codecs/rt1017-sdca-sdw.c | 4 +++-
sound/soc/codecs/rt1308-sdw.c | 4 +++-
sound/soc/codecs/rt1316-sdw.c | 4 +++-
sound/soc/codecs/rt5682-sdw.c | 4 +++-
sound/soc/codecs/rt700-sdw.c | 4 +++-
sound/soc/codecs/rt711-sdca-sdw.c | 4 +++-
sound/soc/codecs/rt712-sdca-dmic.c | 4 +++-
sound/soc/codecs/rt712-sdca-sdw.c | 4 +++-
sound/soc/codecs/rt715-sdca-sdw.c | 4 +++-
sound/soc/codecs/rt715-sdw.c | 4 +++-
sound/soc/codecs/rt721-sdca-sdw.c | 4 +++-
sound/soc/codecs/rt722-sdca-sdw.c | 4 +++-
sound/soc/codecs/tac5xx2-sdw.c | 4 +++-
sound/soc/codecs/tas2783-sdw.c | 4 +++-
18 files changed, 77 insertions(+), 52 deletions(-)
--
2.47.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/5] soundwire: Move wait for initialisation helper to header
2026-06-20 11:02 [PATCH 0/5] Fix SoundWire randconfig issues Charles Keepax
@ 2026-06-20 11:02 ` Charles Keepax
2026-06-22 4:45 ` Vinod Koul
2026-06-20 11:02 ` [PATCH 2/5] ASoC: es9356: Add back local call to sdw_show_ping_status() Charles Keepax
` (4 subsequent siblings)
5 siblings, 1 reply; 8+ messages in thread
From: Charles Keepax @ 2026-06-20 11:02 UTC (permalink / raw)
To: broonie, vkoul, arnd
Cc: lgirdwood, pierre-louis.bossart, yung-chuan.liao, peter.ujfalusi,
oder_chiou, jack.yu, shumingf, niranjan.hy, shenghao-ding,
kevin-lu, baojun.xu, sen, zhangyi, linux-sound, linux-kernel,
patches
As SoundWire devices tend to enumerate on the bus after probe, drivers
frequently need to wait for the device to initialise from common driver
code. The common system is to split drivers into a core module and then
a module for each communication bus. These two facts tend to cause
Kconfig issues, the issue tends to be when SOUNDWIRE=m and DRIVER_I2C=y,
this usually selects DRIVER=y. The driver code then wants to call
sdw_slave_wait_for_init(), but this results in calling a module function
from built in code. A depends on SOUNDWIRE | !SOUNDWIRE could be added to
the end driver but this seems slightly off as it adds a lot of counter
intuitive depends.
A simpler solution is to make sdw_slave_wait_for_init() a static inline
function. As part of doing this add a check for the slave device being
NULL acknowledging that this is likely called from code that is shared
between control buses. It does require dropping the call to
sdw_show_ping_status() but this can be added back in end drivers that
used it originally.
Currently this is causing rand config issues on RT5682 and will soon
also cause similar problems on cs42l43.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
drivers/soundwire/bus.c | 28 --------------------------
include/linux/soundwire/sdw.h | 37 +++++++++++++++++++++++++++--------
2 files changed, 29 insertions(+), 36 deletions(-)
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
index b7bdf19ebb42e..fe5316d93fefe 100644
--- a/drivers/soundwire/bus.c
+++ b/drivers/soundwire/bus.c
@@ -1372,34 +1372,6 @@ int sdw_slave_get_current_bank(struct sdw_slave *slave)
}
EXPORT_SYMBOL_GPL(sdw_slave_get_current_bank);
-/**
- * sdw_slave_wait_for_init - Wait for device initialisation
- * @slave: Pointer to the SoundWire peripheral.
- * @timeout_ms: Timeout in milliseconds.
- *
- * Wait for a peripheral device to enumerate and be initialised by the
- * SoundWire core.
- *
- * Return: Zero on success, and a negative error code on failure.
- */
-int sdw_slave_wait_for_init(struct sdw_slave *slave, int timeout_ms)
-{
- unsigned long time;
-
- time = wait_for_completion_timeout(&slave->initialization_complete,
- msecs_to_jiffies(timeout_ms));
- if (!time) {
- dev_err(&slave->dev, "Initialization not complete\n");
- sdw_show_ping_status(slave->bus, true);
- return -ETIMEDOUT;
- }
-
- slave->unattach_request = 0;
-
- return 0;
-}
-EXPORT_SYMBOL_GPL(sdw_slave_wait_for_init);
-
static int sdw_slave_set_frequency(struct sdw_slave *slave)
{
int scale_index;
diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h
index a46cbaec59491..92dc051b71b57 100644
--- a/include/linux/soundwire/sdw.h
+++ b/include/linux/soundwire/sdw.h
@@ -1093,8 +1093,6 @@ int sdw_slave_get_current_bank(struct sdw_slave *sdev);
int sdw_slave_get_scale_index(struct sdw_slave *slave, u8 *base);
-int sdw_slave_wait_for_init(struct sdw_slave *slave, int timeout_ms);
-
/* messaging and data APIs */
int sdw_read(struct sdw_slave *slave, u32 addr);
int sdw_write(struct sdw_slave *slave, u32 addr, u8 value);
@@ -1138,12 +1136,6 @@ static inline int sdw_slave_get_current_bank(struct sdw_slave *sdev)
return -EINVAL;
}
-static inline int sdw_slave_wait_for_init(struct sdw_slave *slave, int timeout_ms)
-{
- WARN_ONCE(1, "SoundWire API is disabled");
- return -EINVAL;
-}
-
/* messaging and data APIs */
static inline int sdw_read(struct sdw_slave *slave, u32 addr)
{
@@ -1207,4 +1199,33 @@ static inline int sdw_update_no_pm(struct sdw_slave *slave, u32 addr, u8 mask, u
#endif /* CONFIG_SOUNDWIRE */
+/**
+ * sdw_slave_wait_for_init - Wait for device initialisation
+ * @slave: Pointer to the SoundWire peripheral.
+ * @timeout_ms: Timeout in milliseconds.
+ *
+ * Wait for a peripheral device to enumerate and be initialised by the
+ * SoundWire core.
+ *
+ * Return: Zero on success, and a negative error code on failure.
+ */
+static inline int sdw_slave_wait_for_init(struct sdw_slave *slave, int timeout_ms)
+{
+ unsigned long time;
+
+ if (!slave)
+ return 0;
+
+ time = wait_for_completion_timeout(&slave->initialization_complete,
+ msecs_to_jiffies(timeout_ms));
+ if (!time) {
+ dev_err(&slave->dev, "Initialization not complete\n");
+ return -ETIMEDOUT;
+ }
+
+ slave->unattach_request = 0;
+
+ return 0;
+}
+
#endif /* __SOUNDWIRE_H */
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/5] ASoC: es9356: Add back local call to sdw_show_ping_status()
2026-06-20 11:02 [PATCH 0/5] Fix SoundWire randconfig issues Charles Keepax
2026-06-20 11:02 ` [PATCH 1/5] soundwire: Move wait for initialisation helper to header Charles Keepax
@ 2026-06-20 11:02 ` Charles Keepax
2026-06-20 11:02 ` [PATCH 3/5] ASoC: max98373: " Charles Keepax
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Charles Keepax @ 2026-06-20 11:02 UTC (permalink / raw)
To: broonie, vkoul, arnd
Cc: lgirdwood, pierre-louis.bossart, yung-chuan.liao, peter.ujfalusi,
oder_chiou, jack.yu, shumingf, niranjan.hy, shenghao-ding,
kevin-lu, baojun.xu, sen, zhangyi, linux-sound, linux-kernel,
patches
As the core no longer calls this debug helper add it back to the drivers
that originally called it.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
sound/soc/codecs/es9356.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/es9356.c b/sound/soc/codecs/es9356.c
index 670e918b56a46..8db81d5746240 100644
--- a/sound/soc/codecs/es9356.c
+++ b/sound/soc/codecs/es9356.c
@@ -1111,8 +1111,10 @@ static int es9356_sdca_dev_resume(struct device *dev)
es9356->disable_irq = false;
ret = sdw_slave_wait_for_init(slave, es9356_PROBE_TIMEOUT);
- if (ret)
+ if (ret) {
+ sdw_show_ping_status(slave->bus, true);
return ret;
+ }
regcache_cache_only(es9356->regmap, false);
regcache_sync(es9356->regmap);
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 3/5] ASoC: max98373: Add back local call to sdw_show_ping_status()
2026-06-20 11:02 [PATCH 0/5] Fix SoundWire randconfig issues Charles Keepax
2026-06-20 11:02 ` [PATCH 1/5] soundwire: Move wait for initialisation helper to header Charles Keepax
2026-06-20 11:02 ` [PATCH 2/5] ASoC: es9356: Add back local call to sdw_show_ping_status() Charles Keepax
@ 2026-06-20 11:02 ` Charles Keepax
2026-06-20 11:02 ` [PATCH 4/5] ASoC: ti: " Charles Keepax
` (2 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Charles Keepax @ 2026-06-20 11:02 UTC (permalink / raw)
To: broonie, vkoul, arnd
Cc: lgirdwood, pierre-louis.bossart, yung-chuan.liao, peter.ujfalusi,
oder_chiou, jack.yu, shumingf, niranjan.hy, shenghao-ding,
kevin-lu, baojun.xu, sen, zhangyi, linux-sound, linux-kernel,
patches
As the core no longer calls this debug helper add it back to the drivers
that originally called it.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
sound/soc/codecs/max98373-sdw.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/max98373-sdw.c b/sound/soc/codecs/max98373-sdw.c
index 6829fa07c9ecb..7a42052dc0516 100644
--- a/sound/soc/codecs/max98373-sdw.c
+++ b/sound/soc/codecs/max98373-sdw.c
@@ -272,8 +272,10 @@ static int max98373_resume(struct device *dev)
return 0;
ret = sdw_slave_wait_for_init(slave, MAX98373_PROBE_TIMEOUT);
- if (ret)
+ if (ret) {
+ sdw_show_ping_status(slave->bus, true);
return ret;
+ }
regcache_cache_only(max98373->regmap, false);
regcache_sync(max98373->regmap);
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 4/5] ASoC: ti: Add back local call to sdw_show_ping_status()
2026-06-20 11:02 [PATCH 0/5] Fix SoundWire randconfig issues Charles Keepax
` (2 preceding siblings ...)
2026-06-20 11:02 ` [PATCH 3/5] ASoC: max98373: " Charles Keepax
@ 2026-06-20 11:02 ` Charles Keepax
2026-06-20 11:02 ` [PATCH 5/5] ASoC: realtek: " Charles Keepax
2026-06-20 15:47 ` [PATCH 0/5] Fix SoundWire randconfig issues Arnd Bergmann
5 siblings, 0 replies; 8+ messages in thread
From: Charles Keepax @ 2026-06-20 11:02 UTC (permalink / raw)
To: broonie, vkoul, arnd
Cc: lgirdwood, pierre-louis.bossart, yung-chuan.liao, peter.ujfalusi,
oder_chiou, jack.yu, shumingf, niranjan.hy, shenghao-ding,
kevin-lu, baojun.xu, sen, zhangyi, linux-sound, linux-kernel,
patches
As the core no longer calls this debug helper add it back to the drivers
that originally called it.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
sound/soc/codecs/tac5xx2-sdw.c | 4 +++-
sound/soc/codecs/tas2783-sdw.c | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/tac5xx2-sdw.c b/sound/soc/codecs/tac5xx2-sdw.c
index bb12cfb6da12b..ace06f5ab58c1 100644
--- a/sound/soc/codecs/tac5xx2-sdw.c
+++ b/sound/soc/codecs/tac5xx2-sdw.c
@@ -1445,8 +1445,10 @@ static s32 tac5xx2_sdca_dev_resume(struct device *dev)
}
ret = sdw_slave_wait_for_init(slave, TAC5XX2_PROBE_TIMEOUT_MS);
- if (ret)
+ if (ret) {
+ sdw_show_ping_status(slave->bus, true);
return ret;
+ }
regcache_cache_only(tac_dev->regmap, false);
regcache_mark_dirty(tac_dev->regmap);
diff --git a/sound/soc/codecs/tas2783-sdw.c b/sound/soc/codecs/tas2783-sdw.c
index 7d70e7e3f24f4..1127ea59b5e4c 100644
--- a/sound/soc/codecs/tas2783-sdw.c
+++ b/sound/soc/codecs/tas2783-sdw.c
@@ -1083,8 +1083,10 @@ static s32 tas2783_sdca_dev_resume(struct device *dev)
int ret;
ret = sdw_slave_wait_for_init(slave, TAS2783_PROBE_TIMEOUT);
- if (ret)
+ if (ret) {
+ sdw_show_ping_status(slave->bus, true);
return ret;
+ }
regcache_cache_only(tas_dev->regmap, false);
regcache_sync(tas_dev->regmap);
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 5/5] ASoC: realtek: Add back local call to sdw_show_ping_status()
2026-06-20 11:02 [PATCH 0/5] Fix SoundWire randconfig issues Charles Keepax
` (3 preceding siblings ...)
2026-06-20 11:02 ` [PATCH 4/5] ASoC: ti: " Charles Keepax
@ 2026-06-20 11:02 ` Charles Keepax
2026-06-20 15:47 ` [PATCH 0/5] Fix SoundWire randconfig issues Arnd Bergmann
5 siblings, 0 replies; 8+ messages in thread
From: Charles Keepax @ 2026-06-20 11:02 UTC (permalink / raw)
To: broonie, vkoul, arnd
Cc: lgirdwood, pierre-louis.bossart, yung-chuan.liao, peter.ujfalusi,
oder_chiou, jack.yu, shumingf, niranjan.hy, shenghao-ding,
kevin-lu, baojun.xu, sen, zhangyi, linux-sound, linux-kernel,
patches
As the core no longer calls this debug helper add it back to the drivers
that originally called it.
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
sound/soc/codecs/rt1017-sdca-sdw.c | 4 +++-
sound/soc/codecs/rt1308-sdw.c | 4 +++-
sound/soc/codecs/rt1316-sdw.c | 4 +++-
sound/soc/codecs/rt5682-sdw.c | 4 +++-
sound/soc/codecs/rt700-sdw.c | 4 +++-
sound/soc/codecs/rt711-sdca-sdw.c | 4 +++-
sound/soc/codecs/rt712-sdca-dmic.c | 4 +++-
sound/soc/codecs/rt712-sdca-sdw.c | 4 +++-
sound/soc/codecs/rt715-sdca-sdw.c | 4 +++-
sound/soc/codecs/rt715-sdw.c | 4 +++-
sound/soc/codecs/rt721-sdca-sdw.c | 4 +++-
sound/soc/codecs/rt722-sdca-sdw.c | 4 +++-
12 files changed, 36 insertions(+), 12 deletions(-)
diff --git a/sound/soc/codecs/rt1017-sdca-sdw.c b/sound/soc/codecs/rt1017-sdca-sdw.c
index d62e8a2536767..91d3d43cd9988 100644
--- a/sound/soc/codecs/rt1017-sdca-sdw.c
+++ b/sound/soc/codecs/rt1017-sdca-sdw.c
@@ -779,8 +779,10 @@ static int rt1017_sdca_dev_resume(struct device *dev)
return 0;
ret = sdw_slave_wait_for_init(slave, RT1017_PROBE_TIMEOUT);
- if (ret)
+ if (ret) {
+ sdw_show_ping_status(slave->bus, true);
return ret;
+ }
regcache_cache_only(rt1017->regmap, false);
regcache_sync(rt1017->regmap);
diff --git a/sound/soc/codecs/rt1308-sdw.c b/sound/soc/codecs/rt1308-sdw.c
index 39e06a3a75609..60e5040b6dd9d 100644
--- a/sound/soc/codecs/rt1308-sdw.c
+++ b/sound/soc/codecs/rt1308-sdw.c
@@ -774,8 +774,10 @@ static int rt1308_dev_resume(struct device *dev)
return 0;
ret = sdw_slave_wait_for_init(slave, RT1308_PROBE_TIMEOUT);
- if (ret)
+ if (ret) {
+ sdw_show_ping_status(slave->bus, true);
return ret;
+ }
regcache_cache_only(rt1308->regmap, false);
regcache_sync_region(rt1308->regmap, 0xc000, 0xcfff);
diff --git a/sound/soc/codecs/rt1316-sdw.c b/sound/soc/codecs/rt1316-sdw.c
index 1828fd9d5af6a..5e8eda6a5f7f8 100644
--- a/sound/soc/codecs/rt1316-sdw.c
+++ b/sound/soc/codecs/rt1316-sdw.c
@@ -751,8 +751,10 @@ static int rt1316_dev_resume(struct device *dev)
return 0;
ret = sdw_slave_wait_for_init(slave, RT1316_PROBE_TIMEOUT);
- if (ret)
+ if (ret) {
+ sdw_show_ping_status(slave->bus, true);
return ret;
+ }
regcache_cache_only(rt1316->regmap, false);
regcache_sync(rt1316->regmap);
diff --git a/sound/soc/codecs/rt5682-sdw.c b/sound/soc/codecs/rt5682-sdw.c
index ec2a35a0cacde..dec8c2147d684 100644
--- a/sound/soc/codecs/rt5682-sdw.c
+++ b/sound/soc/codecs/rt5682-sdw.c
@@ -769,8 +769,10 @@ static int rt5682_dev_resume(struct device *dev)
}
ret = sdw_slave_wait_for_init(slave, RT5682_PROBE_TIMEOUT);
- if (ret)
+ if (ret) {
+ sdw_show_ping_status(slave->bus, true);
return ret;
+ }
regcache_cache_only(rt5682->sdw_regmap, false);
regcache_cache_only(rt5682->regmap, false);
diff --git a/sound/soc/codecs/rt700-sdw.c b/sound/soc/codecs/rt700-sdw.c
index 30fcca210f051..6bc636c86f427 100644
--- a/sound/soc/codecs/rt700-sdw.c
+++ b/sound/soc/codecs/rt700-sdw.c
@@ -528,8 +528,10 @@ static int rt700_dev_resume(struct device *dev)
return 0;
ret = sdw_slave_wait_for_init(slave, RT700_PROBE_TIMEOUT);
- if (ret)
+ if (ret) {
+ sdw_show_ping_status(slave->bus, true);
return ret;
+ }
regcache_cache_only(rt700->regmap, false);
regcache_sync_region(rt700->regmap, 0x3000, 0x8fff);
diff --git a/sound/soc/codecs/rt711-sdca-sdw.c b/sound/soc/codecs/rt711-sdca-sdw.c
index a8164fc3979ab..461315844ba99 100644
--- a/sound/soc/codecs/rt711-sdca-sdw.c
+++ b/sound/soc/codecs/rt711-sdca-sdw.c
@@ -454,8 +454,10 @@ static int rt711_sdca_dev_resume(struct device *dev)
}
ret = sdw_slave_wait_for_init(slave, RT711_PROBE_TIMEOUT);
- if (ret)
+ if (ret) {
+ sdw_show_ping_status(slave->bus, true);
return ret;
+ }
regcache_cache_only(rt711->regmap, false);
regcache_sync(rt711->regmap);
diff --git a/sound/soc/codecs/rt712-sdca-dmic.c b/sound/soc/codecs/rt712-sdca-dmic.c
index 4c5c2f5ba5edf..8b7d50a80ff98 100644
--- a/sound/soc/codecs/rt712-sdca-dmic.c
+++ b/sound/soc/codecs/rt712-sdca-dmic.c
@@ -911,8 +911,10 @@ static int rt712_sdca_dmic_dev_resume(struct device *dev)
return 0;
ret = sdw_slave_wait_for_init(slave, RT712_PROBE_TIMEOUT);
- if (ret)
+ if (ret) {
+ sdw_show_ping_status(slave->bus, true);
return ret;
+ }
regcache_cache_only(rt712->regmap, false);
regcache_sync(rt712->regmap);
diff --git a/sound/soc/codecs/rt712-sdca-sdw.c b/sound/soc/codecs/rt712-sdca-sdw.c
index 5817321804736..2787524c796e8 100644
--- a/sound/soc/codecs/rt712-sdca-sdw.c
+++ b/sound/soc/codecs/rt712-sdca-sdw.c
@@ -467,8 +467,10 @@ static int rt712_sdca_dev_resume(struct device *dev)
}
ret = sdw_slave_wait_for_init(slave, RT712_PROBE_TIMEOUT);
- if (ret)
+ if (ret) {
+ sdw_show_ping_status(slave->bus, true);
return ret;
+ }
regcache_cache_only(rt712->regmap, false);
regcache_sync(rt712->regmap);
diff --git a/sound/soc/codecs/rt715-sdca-sdw.c b/sound/soc/codecs/rt715-sdca-sdw.c
index 4b9815b5628db..fabd21bbbe5b9 100644
--- a/sound/soc/codecs/rt715-sdca-sdw.c
+++ b/sound/soc/codecs/rt715-sdca-sdw.c
@@ -230,8 +230,10 @@ static int rt715_dev_resume(struct device *dev)
return 0;
ret = sdw_slave_wait_for_init(slave, RT715_PROBE_TIMEOUT);
- if (ret)
+ if (ret) {
+ sdw_show_ping_status(slave->bus, true);
return ret;
+ }
regcache_cache_only(rt715->regmap, false);
regcache_sync_region(rt715->regmap,
diff --git a/sound/soc/codecs/rt715-sdw.c b/sound/soc/codecs/rt715-sdw.c
index 7f83a8f1a06e9..a4a3945522e81 100644
--- a/sound/soc/codecs/rt715-sdw.c
+++ b/sound/soc/codecs/rt715-sdw.c
@@ -507,8 +507,10 @@ static int rt715_dev_resume(struct device *dev)
return 0;
ret = sdw_slave_wait_for_init(slave, RT715_PROBE_TIMEOUT);
- if (ret)
+ if (ret) {
+ sdw_show_ping_status(slave->bus, true);
return ret;
+ }
regcache_cache_only(rt715->regmap, false);
regcache_sync_region(rt715->regmap, 0x3000, 0x8fff);
diff --git a/sound/soc/codecs/rt721-sdca-sdw.c b/sound/soc/codecs/rt721-sdca-sdw.c
index 58606209316a4..02df04a0ddad4 100644
--- a/sound/soc/codecs/rt721-sdca-sdw.c
+++ b/sound/soc/codecs/rt721-sdca-sdw.c
@@ -505,8 +505,10 @@ static int rt721_sdca_dev_resume(struct device *dev)
}
ret = sdw_slave_wait_for_init(slave, RT721_PROBE_TIMEOUT);
- if (ret)
+ if (ret) {
+ sdw_show_ping_status(slave->bus, true);
return ret;
+ }
regcache_cache_only(rt721->regmap, false);
regcache_sync(rt721->regmap);
diff --git a/sound/soc/codecs/rt722-sdca-sdw.c b/sound/soc/codecs/rt722-sdca-sdw.c
index 0f76492ff915c..284900933ebf4 100644
--- a/sound/soc/codecs/rt722-sdca-sdw.c
+++ b/sound/soc/codecs/rt722-sdca-sdw.c
@@ -552,8 +552,10 @@ static int rt722_sdca_dev_resume(struct device *dev)
}
ret = sdw_slave_wait_for_init(slave, RT722_PROBE_TIMEOUT);
- if (ret)
+ if (ret) {
+ sdw_show_ping_status(slave->bus, true);
return ret;
+ }
regcache_cache_only(rt722->regmap, false);
regcache_sync(rt722->regmap);
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 0/5] Fix SoundWire randconfig issues
2026-06-20 11:02 [PATCH 0/5] Fix SoundWire randconfig issues Charles Keepax
` (4 preceding siblings ...)
2026-06-20 11:02 ` [PATCH 5/5] ASoC: realtek: " Charles Keepax
@ 2026-06-20 15:47 ` Arnd Bergmann
5 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2026-06-20 15:47 UTC (permalink / raw)
To: Charles Keepax, Mark Brown, Vinod Koul
Cc: lgirdwood, Pierre-Louis Bossart, Bard Liao, Peter Ujfalusi,
oder_chiou, jack.yu, Shuming Fan, niranjan.hy, shenghao-ding,
kevin-lu, baojun.xu, sen, zhangyi, linux-sound, linux-kernel,
patches
On Sat, Jun 20, 2026, at 13:02, Charles Keepax wrote:
> Moving all the waiting for soundwire devices to enumerate into the core
> code [1] has caused some randconfig issues. This is the second attempt
> to fix this after there were some short coming in [2].
>
> Sorry for sending during the merge window, but people are keen to see
> a solution posted.
Looks good to me,
Acked-by: Arnd Bergmann <arnd@arndb.de>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/5] soundwire: Move wait for initialisation helper to header
2026-06-20 11:02 ` [PATCH 1/5] soundwire: Move wait for initialisation helper to header Charles Keepax
@ 2026-06-22 4:45 ` Vinod Koul
0 siblings, 0 replies; 8+ messages in thread
From: Vinod Koul @ 2026-06-22 4:45 UTC (permalink / raw)
To: Charles Keepax
Cc: broonie, arnd, lgirdwood, pierre-louis.bossart, yung-chuan.liao,
peter.ujfalusi, oder_chiou, jack.yu, shumingf, niranjan.hy,
shenghao-ding, kevin-lu, baojun.xu, sen, zhangyi, linux-sound,
linux-kernel, patches
On 20-06-26, 12:02, Charles Keepax wrote:
> As SoundWire devices tend to enumerate on the bus after probe, drivers
> frequently need to wait for the device to initialise from common driver
> code. The common system is to split drivers into a core module and then
> a module for each communication bus. These two facts tend to cause
> Kconfig issues, the issue tends to be when SOUNDWIRE=m and DRIVER_I2C=y,
> this usually selects DRIVER=y. The driver code then wants to call
> sdw_slave_wait_for_init(), but this results in calling a module function
> from built in code. A depends on SOUNDWIRE | !SOUNDWIRE could be added to
> the end driver but this seems slightly off as it adds a lot of counter
> intuitive depends.
>
> A simpler solution is to make sdw_slave_wait_for_init() a static inline
> function. As part of doing this add a check for the slave device being
> NULL acknowledging that this is likely called from code that is shared
> between control buses. It does require dropping the call to
> sdw_show_ping_status() but this can be added back in end drivers that
> used it originally.
>
> Currently this is causing rand config issues on RT5682 and will soon
> also cause similar problems on cs42l43.
Acked-by: Vinod Koul <vkoul@kernel.org>
--
~Vinod
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-06-22 4:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-20 11:02 [PATCH 0/5] Fix SoundWire randconfig issues Charles Keepax
2026-06-20 11:02 ` [PATCH 1/5] soundwire: Move wait for initialisation helper to header Charles Keepax
2026-06-22 4:45 ` Vinod Koul
2026-06-20 11:02 ` [PATCH 2/5] ASoC: es9356: Add back local call to sdw_show_ping_status() Charles Keepax
2026-06-20 11:02 ` [PATCH 3/5] ASoC: max98373: " Charles Keepax
2026-06-20 11:02 ` [PATCH 4/5] ASoC: ti: " Charles Keepax
2026-06-20 11:02 ` [PATCH 5/5] ASoC: realtek: " Charles Keepax
2026-06-20 15:47 ` [PATCH 0/5] Fix SoundWire randconfig issues Arnd Bergmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox