Skip to content

Commit 62ab0b3

Browse files
committed
soundwire: take in count the bandwidth of a prepared stream
JIRA: https://issues.redhat.com/browse/RHEL-80682 commit 08ae0d6 Author: Bard Liao <yung-chuan.liao@linux.intel.com> Date: Mon Mar 10 15:36:53 2025 +0800 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: thesofproject/linux#5334 Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20250310073653.56476-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
1 parent 7826c69 commit 62ab0b3

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
@@ -194,10 +194,11 @@ static int sdw_compute_group_params(struct sdw_bus *bus,
194194
continue;
195195
} else {
196196
/*
197-
* Include runtimes with running (ENABLED state) and paused (DISABLED state)
198-
* streams
197+
* Include runtimes with running (ENABLED/PREPARED state) and
198+
* paused (DISABLED state) streams
199199
*/
200200
if (m_rt->stream->state != SDW_STREAM_ENABLED &&
201+
m_rt->stream->state != SDW_STREAM_PREPARED &&
201202
m_rt->stream->state != SDW_STREAM_DISABLED)
202203
continue;
203204
}

0 commit comments

Comments
 (0)