]> git.ipfire.org Git - thirdparty/linux.git/commit
ASoC: SOF: Intel: hda-sdw-bpt: add CHAIN_DMA support
authorBard Liao <yung-chuan.liao@linux.intel.com>
Thu, 27 Feb 2025 14:06:13 +0000 (22:06 +0800)
committerVinod Koul <vkoul@kernel.org>
Mon, 10 Mar 2025 07:01:19 +0000 (12:31 +0530)
commit3394e2b125043aeede344d28fc73b3c0d2a5c21f
tree7ada884d16282f86e6ad1e7d9d1e692f4d4d3923
parent4c1ce9f37d8a809dcdfba082cc9003880efa0a63
ASoC: SOF: Intel: hda-sdw-bpt: add CHAIN_DMA support

When the firmware is involved, the data can be transferred with a
CHAIN_DMA on LNL+.

The CHAIN_DMA needs to be programmed before the DMAs per the
documentation. The states are not exactly symmetrical, on stop we must
do a PAUSE and RESET.

The FIFO size of 10ms was determined experimentally. With the minimum
of 2ms, errors were reported by the codec, likely because of xruns.

The code flow deals with the two TX and RX CHAIN_DMAs in symmetrical
ways, i.e.
alloc TX
alloc RX
enable TX
enable RX
disable RX
disable TX
free RX
free TX

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
Tested-by: shumingf@realtek.com
Link: https://lore.kernel.org/r/20250227140615.8147-15-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
sound/soc/sof/intel/hda-sdw-bpt.c