Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: SOF: Intel: hda-sdw-bpt: support simultaneous audio and BPT streams

Currently the SoundWire BPT stream uses the paired link DMA but not
reserve it. It works without any issue because we assume the SoundWire
BPT will not run with audio streams simultaneously.
To support simultaneous audio and BPT streams, we need to use the
hda_dma_prepare/cleanup helpers to reserve the pair link host DMA.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20260203114027.3742558-4-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Bard Liao and committed by
Mark Brown
330d1deb 8834ae89

+3 -2
+3 -2
sound/soc/sof/intel/hda-sdw-bpt.c
··· 118 118 119 119 dev_dbg(dev, "direction %d format_val %#x\n", direction, format); 120 120 121 - bpt_stream = hda_cl_prepare(dev, format, bpt_num_bytes, dmab_bdl, false, direction, false); 121 + bpt_stream = hda_data_stream_prepare(dev, format, bpt_num_bytes, dmab_bdl, 122 + false, direction, false, true); 122 123 if (IS_ERR(bpt_stream)) { 123 124 dev_err(sdev->dev, "%s: SDW BPT DMA prepare failed: dir %d\n", 124 125 __func__, direction); ··· 163 162 u32 mask; 164 163 int ret; 165 164 166 - ret = hda_cl_cleanup(sdev->dev, dmab_bdl, false, sdw_bpt_stream); 165 + ret = hda_data_stream_cleanup(sdev->dev, dmab_bdl, false, sdw_bpt_stream, true); 167 166 if (ret < 0) { 168 167 dev_err(sdev->dev, "%s: SDW BPT DMA cleanup failed\n", 169 168 __func__);