diff options
author | Bard Liao <yung-chuan.liao@linux.intel.com> | 2024-12-18 11:01:47 +0300 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2024-12-23 09:30:33 +0300 |
commit | 8f4e3343eda8cdedaf711bf3d8ef2d6ed571f420 (patch) | |
tree | 7ce25719a34de389e2a35ebb365b2821d228c4ba /include/linux/soundwire | |
parent | fdd1faeeec14291f9e542afa5ccec2c5a0930f5b (diff) | |
download | linux-8f4e3343eda8cdedaf711bf3d8ef2d6ed571f420.tar.xz |
Soundwire: add sdw_slave_get_scale_index helper
Currently, we only set peripheral frequency when the peripheral is
initialized. However, curr_dr_freq may change to get required bandwidth.
For example, curr_dr_freq may increase from 4.8MHz to 9.6MHz when the
4th stream is opened. Add a helper to get the scale index so that we can
get the scale index and program it.
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-7-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 | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index ae38ac848d38..05a85e2bd96d 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux/soundwire/sdw.h @@ -1052,6 +1052,8 @@ int sdw_stream_add_slave(struct sdw_slave *slave, int sdw_stream_remove_slave(struct sdw_slave *slave, struct sdw_stream_runtime *stream); +int sdw_slave_get_scale_index(struct sdw_slave *slave, u8 *base); + /* messaging and data APIs */ int sdw_read(struct sdw_slave *slave, u32 addr); int sdw_write(struct sdw_slave *slave, u32 addr, u8 value); |