Skip to content

Commit 08ae0d6

Browse files
bardliaovinodkoul
authored andcommitted
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: 25befdf ("soundwire: generic_bandwidth_allocation: count the bandwidth of active streams only") Signed-off-by: Bard Liao <[email protected]> Link: thesofproject#5334 Reviewed-by: Richard Fitzgerald <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 9452422 commit 08ae0d6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/soundwire/generic_bandwidth_allocation.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -237,10 +237,11 @@ static int sdw_compute_group_params(struct sdw_bus *bus,
237237
continue;
238238
} else {
239239
/*
240-
* Include runtimes with running (ENABLED state) and paused (DISABLED state)
241-
* streams
240+
* Include runtimes with running (ENABLED/PREPARED state) and
241+
* paused (DISABLED state) streams
242242
*/
243243
if (m_rt->stream->state != SDW_STREAM_ENABLED &&
244+
m_rt->stream->state != SDW_STREAM_PREPARED &&
244245
m_rt->stream->state != SDW_STREAM_DISABLED)
245246
continue;
246247
}

0 commit comments

Comments
 (0)