Skip to content

Commit fdd1fae

Browse files
plbossartvinodkoul
authored andcommitted
soundwire: generic_bandwidth_allocation: skip DEPREPARED streams
We should not blindly walk through all the m_rt list, since it will have the side effect of accounting for deprepared streams. This behavior is the result of the split implementation where the dailink hw_free() handles the stream state change and the bit allocation, and the dai hw_free() modifies the m_rt list. The bit allocation ends-up using m_rt entries in zombie state, no longer relevant but still used. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20241218080155.102405-6-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent f1b3dba commit fdd1fae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/soundwire/generic_bandwidth_allocation.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,9 @@ static int sdw_get_group_count(struct sdw_bus *bus,
238238
return -ENOMEM;
239239

240240
list_for_each_entry(m_rt, &bus->m_rt_list, bus_node) {
241+
if (m_rt->stream->state == SDW_STREAM_DEPREPARED)
242+
continue;
243+
241244
rate = m_rt->stream->params.rate;
242245
if (m_rt == list_first_entry(&bus->m_rt_list,
243246
struct sdw_master_runtime,

0 commit comments

Comments
 (0)