Skip to content

Commit 39c812b

Browse files
committed
ASoC: SOF: Intel: reset spib_addr before disabling SPIB
The spib_addr register will indicate to the host DMA where the position is in the buffer currently processed by host SW. The register is ignored by the host DMA if SPIB is disabled. Reset it to 0 before disabling SPIB. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent b309a4a commit 39c812b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

sound/soc/sof/intel/hda-stream.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,18 @@ int hda_dsp_stream_spib_config(struct snd_sof_dev *sdev,
198198

199199
mask = (1 << hstream->index);
200200

201+
/* Reset the spib_addr before disabling SPIB */
202+
if (!enable)
203+
sof_io_write(sdev, hstream->spib_addr, 0);
204+
201205
/* enable/disable SPIB for the stream */
202206
snd_sof_dsp_update_bits(sdev, HDA_DSP_SPIB_BAR,
203207
SOF_HDA_ADSP_REG_CL_SPBFIFO_SPBFCCTL, mask,
204208
enable << hstream->index);
205209

206210
/* set the SPIB value */
207-
sof_io_write(sdev, hstream->spib_addr, size);
211+
if (enable)
212+
sof_io_write(sdev, hstream->spib_addr, size);
208213

209214
return 0;
210215
}

0 commit comments

Comments
 (0)