Skip to content

Commit 975bcdd

Browse files
committed
ASoC: SOF: Intel: hda-sdw-bpt: use hda_dsp_dma_channel_pair_get/put
helpers We use the host and link DMA SoundWire BTP. But hda_cl_prepare() doesn't reserve the link DMA as code loader doesn't need. It works fine because we assume the SwoundWire BPT will not run with audio streams simultaneously. Change the helpers to hda_dsp_dma_channel_pair_get/put to allow running BTP and audio stream simultaneously. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent 61390d0 commit 975bcdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/soc/sof/intel/hda-sdw-bpt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static int hda_sdw_bpt_dma_prepare(struct device *dev, struct hdac_ext_stream **
118118

119119
dev_dbg(dev, "direction %d format_val %#x\n", direction, format);
120120

121-
bpt_stream = hda_cl_prepare(dev, format, bpt_num_bytes, dmab_bdl, false, direction, false);
121+
bpt_stream = hda_dsp_dma_channel_pair_get(dev, format, bpt_num_bytes, dmab_bdl, direction);
122122
if (IS_ERR(bpt_stream)) {
123123
dev_err(sdev->dev, "%s: SDW BPT DMA prepare failed: dir %d\n",
124124
__func__, direction);
@@ -162,7 +162,7 @@ static int hda_sdw_bpt_dma_deprepare(struct device *dev, struct hdac_ext_stream
162162
u32 mask;
163163
int ret;
164164

165-
ret = hda_cl_cleanup(sdev->dev, dmab_bdl, false, sdw_bpt_stream);
165+
ret = hda_dsp_dma_channel_pair_put(sdev->dev, dmab_bdl, sdw_bpt_stream);
166166
if (ret < 0) {
167167
dev_err(sdev->dev, "%s: SDW BPT DMA cleanup failed\n",
168168
__func__);

0 commit comments

Comments
 (0)