Skip to content

Commit 89fa927

Browse files
committed
soundwire: use maximum sdw bus rate when BPT stream is running
We should get as much as bandwidth for the BPT stream. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent 37f3d75 commit 89fa927

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

drivers/soundwire/generic_bandwidth_allocation.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,18 @@ static int sdw_compute_bus_params(struct sdw_bus *bus)
566566
clk_buf = NULL;
567567
}
568568

569+
/*
570+
* Use the maximum freq to get maximum bandwidth and no need to try another freq
571+
* if any BPT stream is running
572+
*/
573+
list_for_each_entry(m_rt, &bus->m_rt_list, bus_node) {
574+
if (m_rt->stream->type == SDW_STREAM_BPT &&
575+
m_rt->stream->state < SDW_STREAM_DEPREPARED) {
576+
clk_values = 1;
577+
clk_buf = NULL;
578+
}
579+
}
580+
569581
/* If dynamic scaling is not supported, don't try higher freq */
570582
if (!is_clock_scaling_supported(bus))
571583
clk_values = 1;

0 commit comments

Comments
 (0)