diff options
author | Bard Liao <yung-chuan.liao@linux.intel.com> | 2020-09-08 16:15:20 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-09-18 15:18:51 +0300 |
commit | 9026118f20e28f202dab34f219bbb831ffb8c4dc (patch) | |
tree | 1ee57a6ac5368a66aad6feed6ac8074a15fdf05b /include/linux/soundwire | |
parent | 32d2a8935bf8faf201ff1a859eeb43ef6e5e438d (diff) | |
download | linux-9026118f20e28f202dab34f219bbb831ffb8c4dc.tar.xz |
soundwire: Add generic bandwidth allocation algorithm
This algorithm computes bus parameters like clock frequency, frame
shape and port transport parameters based on active stream(s) running
on the bus.
Developers can also implement their own .compute_params() callback for
specific resource management algorithm, and set if before calling
sdw_add_bus_master()
Credits: this patch is based on an earlier internal contribution by
Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah. All hard-coded
values were removed from the initial contribution to use BIOS
information instead.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Acked-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20200908131520.5712-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'include/linux/soundwire')
-rw-r--r-- | include/linux/soundwire/sdw.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index 790823d2d33b..de9ea2ce2d35 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -964,6 +964,9 @@ struct sdw_stream_runtime { struct sdw_stream_runtime *sdw_alloc_stream(const char *stream_name); void sdw_release_stream(struct sdw_stream_runtime *stream); + +int sdw_compute_params(struct sdw_bus *bus); + int sdw_stream_add_master(struct sdw_bus *bus, struct sdw_stream_config *stream_config, struct sdw_port_config *port_config, |