Skip to content

Commit f177999

Browse files
committed
ASoC: SOF: Intel: hda-sdw-bpt: use hda_dma_prepare/cleanup helpers
Use hda_dma_prepare/cleanup helpers to reserve the pair link host DMA as it is needed for SoundWire BPT stream. It works fine because we assume the SwoundWire BPT will not run with audio streams simultaneously. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent d420caa commit f177999

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ 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_dma_prepare(dev, format, bpt_num_bytes, dmab_bdl,
122+
false, direction, false, true);
122123
if (IS_ERR(bpt_stream)) {
123124
dev_err(sdev->dev, "%s: SDW BPT DMA prepare failed: dir %d\n",
124125
__func__, direction);
@@ -162,7 +163,7 @@ static int hda_sdw_bpt_dma_deprepare(struct device *dev, struct hdac_ext_stream
162163
u32 mask;
163164
int ret;
164165

165-
ret = hda_cl_cleanup(sdev->dev, dmab_bdl, false, sdw_bpt_stream);
166+
ret = hda_dma_cleanup(sdev->dev, dmab_bdl, false, sdw_bpt_stream, true);
166167
if (ret < 0) {
167168
dev_err(sdev->dev, "%s: SDW BPT DMA cleanup failed\n",
168169
__func__);

0 commit comments

Comments
 (0)