diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-12-13 16:26:55 +1200 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-12-13 16:26:55 +1200 |
| commit | db9c4387391e09209d44d41c2791512ac45b9e3c (patch) | |
| tree | 189d3a295a292c10d9e83cf3dcf6121b8d42b014 /sound | |
| parent | 7f3c8f9191254654e6a88cd757ff079dafbd2f0b (diff) | |
| parent | 188d194be2bfe03afcc02c90d9d905b46a17f3ef (diff) | |
Merge tag 'soundwire-6.19-rc1_updated' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire
Pull soundwire updates from Vinod Koul:
- Support for multiple sections in a BPT stream
- Align DMA frame with BPT frames
- Qualcomm support for v3.1.0 controllers
* tag 'soundwire-6.19-rc1_updated' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
soundwire: intel_ace2x: handle multi BPT sections
soundwire: pass sdw_bpt_section to cdns BPT helpers
soundwire: introduce BPT section
soundwire: intel_ace2x: add fake frame to BRA read command
soundwire: cadence_master: add fake_size parameter to sdw_cdns_prepare_read_dma_buffer
ASoC: SOF: Intel: export hda_sdw_bpt_get_buf_size_aligment
soundwire: cadence: export sdw_cdns_bpt_find_bandwidth
soundwire: cadence_master: set data_per_frame as frame capability
soundwire: only compute BPT stream in sdw_compute_dp0_port_params
soundwire: cadence_master: make frame index trace more readable
soundwire: qcom: adding support for v3.1.0
dt-bindings: soundwire: qcom: Document v3.1.0 version of IP block
soundwire: qcom: prepare for v3.x
soundwire: qcom: deprecate qcom,din/out-ports
dt-bindings: soundwire: qcom: deprecate qcom,din/out-ports
soundwire: qcom: remove unused rd_fifo_depth
of: base: Add of_property_read_u8_index
Diffstat (limited to 'sound')
| -rw-r--r-- | sound/soc/sof/intel/hda-sdw-bpt.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sound/soc/sof/intel/hda-sdw-bpt.c b/sound/soc/sof/intel/hda-sdw-bpt.c index ff5abccf0d88..e45dd051ab8c 100644 --- a/sound/soc/sof/intel/hda-sdw-bpt.c +++ b/sound/soc/sof/intel/hda-sdw-bpt.c @@ -10,6 +10,7 @@ * Hardware interface for SoundWire BPT support with HDA DMA */ +#include <linux/lcm.h> #include <sound/hdaudio_ext.h> #include <sound/hda-mlink.h> #include <sound/hda-sdw-bpt.h> @@ -236,6 +237,18 @@ static int hda_sdw_bpt_dma_disable(struct device *dev, struct hdac_ext_stream *s return ret; } +#define FIFO_ALIGNMENT 64 + +unsigned int hda_sdw_bpt_get_buf_size_alignment(unsigned int dma_bandwidth) +{ + unsigned int num_channels = DIV_ROUND_UP(dma_bandwidth, BPT_FREQUENCY * 32); + unsigned int data_block = num_channels * 4; + unsigned int alignment = lcm(data_block, FIFO_ALIGNMENT); + + return alignment; +} +EXPORT_SYMBOL_NS(hda_sdw_bpt_get_buf_size_alignment, "SND_SOC_SOF_INTEL_HDA_SDW_BPT"); + int hda_sdw_bpt_open(struct device *dev, int link_id, struct hdac_ext_stream **bpt_tx_stream, struct snd_dma_buffer *dmab_tx_bdl, u32 bpt_tx_num_bytes, u32 tx_dma_bandwidth, struct hdac_ext_stream **bpt_rx_stream, |
