mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 10:01:39 -05:00
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
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user