* [PATCH RESEND] soundwire: don't program SDW_SCP_BUSCLOCK_SCALE on a unattached Peripheral
@ 2026-04-28 8:46 Bard Liao
2026-05-07 7:41 ` Vinod Koul
0 siblings, 1 reply; 2+ messages in thread
From: Bard Liao @ 2026-04-28 8:46 UTC (permalink / raw)
To: linux-sound, vkoul
Cc: vinod.koul, linux-kernel, pierre-louis.bossart, peter.ujfalusi,
bard.liao
The SDW_SCP_BUSCLOCK_SCALE register will be programmed when the
Peripheral is attached. We can and should skip programming the
SDW_SCP_BUSCLOCK_SCALE register when the Peripheral is unattached.
Fixes: 645291cfe5e5 ("Soundwire: stream: program BUSCLOCK_SCALE")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Simon Trimmer <simont@opensource.cirrus.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
---
drivers/soundwire/stream.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
index 4ed8fb7663ad..0b9626838028 100644
--- a/drivers/soundwire/stream.c
+++ b/drivers/soundwire/stream.c
@@ -697,6 +697,13 @@ static int sdw_program_params(struct sdw_bus *bus, bool prepare)
if (scale_index < 0)
return scale_index;
+ /* Skip the unattached Peripherals */
+ if (!completion_done(&slave->enumeration_complete)) {
+ dev_warn(&slave->dev,
+ "Not enumerated, skip programming BUSCLOCK_SCALE\n");
+ continue;
+ }
+
ret = sdw_write_no_pm(slave, addr1, scale_index);
if (ret < 0) {
dev_err(&slave->dev, "SDW_SCP_BUSCLOCK_SCALE register write failed\n");
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH RESEND] soundwire: don't program SDW_SCP_BUSCLOCK_SCALE on a unattached Peripheral
2026-04-28 8:46 [PATCH RESEND] soundwire: don't program SDW_SCP_BUSCLOCK_SCALE on a unattached Peripheral Bard Liao
@ 2026-05-07 7:41 ` Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2026-05-07 7:41 UTC (permalink / raw)
To: linux-sound, Bard Liao
Cc: vinod.koul, linux-kernel, pierre-louis.bossart, peter.ujfalusi,
bard.liao
On Tue, 28 Apr 2026 16:46:12 +0800, Bard Liao wrote:
> The SDW_SCP_BUSCLOCK_SCALE register will be programmed when the
> Peripheral is attached. We can and should skip programming the
> SDW_SCP_BUSCLOCK_SCALE register when the Peripheral is unattached.
>
>
Applied, thanks!
[1/1] soundwire: don't program SDW_SCP_BUSCLOCK_SCALE on a unattached Peripheral
commit: c368dd5cbd61ffab2b6f8a89b0d5775e2e16cde6
Best regards,
--
~Vinod
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-07 7:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-28 8:46 [PATCH RESEND] soundwire: don't program SDW_SCP_BUSCLOCK_SCALE on a unattached Peripheral Bard Liao
2026-05-07 7:41 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox