Skip to content

Commit 3d2b712

Browse files
committed
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 <yung-chuan.liao@linux.intel.com> Link: #5334
1 parent 7ee0925 commit 3d2b712

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/soundwire/generic_bandwidth_allocation.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,11 @@ static int sdw_compute_group_params(struct sdw_bus *bus,
239239
continue;
240240
} else {
241241
/*
242-
* Include runtimes with running (ENABLED state) and paused (DISABLED state)
243-
* streams
242+
* Include runtimes with running (ENABLED/PREPARED state) and
243+
* paused (DISABLED state) streams
244244
*/
245245
if (m_rt->stream->state != SDW_STREAM_ENABLED &&
246+
m_rt->stream->state != SDW_STREAM_PREPARED &&
246247
m_rt->stream->state != SDW_STREAM_DISABLED)
247248
continue;
248249
}

0 commit comments

Comments
 (0)