Skip to content

Commit 964c624

Browse files
committed
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 <[email protected]>
1 parent 9113737 commit 964c624

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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_data_stream_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_data_stream_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)