Skip to contentSkip to conversation

soundwire: take in count the bandwidth of a prepared stream

PATCH Applied Bard Liao 2 participants 2 messages Mar 10, 2025

Subsystems (2)
lore
Share & tools
lore

Bard Liao

author maintainer
#0 lore raw

PATCH 1/1 soundwire: take in count the bandwidth of a prepared stream

When a stream's state is marked as prepared, it is ready for playback/capture. Therefore, we need to include the stream's bandwidth when we calculate the required bandwidth of a bus.

Fixes 25befdf32aa40 ("soundwire: generic_bandwidth_allocation: count the bandwidth of active streams only")
---
 drivers/soundwire/generic_bandwidth_allocation.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/soundwire/generic_bandwidth_allocation.c +3 -2
index b646c2ffe84a..1cfaccf43eac 100644
@@ -237,10 +237,11 @@ static int sdw_compute_group_params(struct sdw_bus *bus,
 				continue;
 		} else {
 			/*
-			 * Include runtimes with running (ENABLED state) and paused (DISABLED state)
-			 * streams
+			 * Include runtimes with running (ENABLED/PREPARED state) and
+			 * paused (DISABLED state) streams
 			 */
 			if (m_rt->stream->state != SDW_STREAM_ENABLED &&
+			    m_rt->stream->state != SDW_STREAM_PREPARED &&
 			    m_rt->stream->state != SDW_STREAM_DISABLED)
 				continue;
 		}
Signature · 1 line
2.43.0
maintainer Applied
#1 lore raw
Quoted 5 lines · Bard Liao

When a stream's state is marked as prepared, it is ready for playback/capture. Therefore, we need to include the stream's bandwidth when we calculate the required bandwidth of a bus.

Applied, thanks!

[1/1] soundwire: take in count the bandwidth of a prepared stream

      commit: 08ae0d61c3d79bb5d52ae30ad4fc12442e966a23

Best regards,

Signature · 1 line
~Vinod