mirror of
https://github.com/torvalds/linux.git
synced 2026-10-12 05:17:15 +02:00
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> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://patch.msgid.link/20260713084650.4138172-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
a13c140cc2
commit
552d9559ca
|
|
@ -198,13 +198,18 @@ int hda_dsp_stream_spib_config(struct snd_sof_dev *sdev,
|
|||
|
||||
mask = (1 << hstream->index);
|
||||
|
||||
/* Reset the spib_addr before disabling SPIB */
|
||||
if (!enable)
|
||||
sof_io_write(sdev, hstream->spib_addr, 0);
|
||||
|
||||
/* enable/disable SPIB for the stream */
|
||||
snd_sof_dsp_update_bits(sdev, HDA_DSP_SPIB_BAR,
|
||||
SOF_HDA_ADSP_REG_CL_SPBFIFO_SPBFCCTL, mask,
|
||||
enable << hstream->index);
|
||||
|
||||
/* set the SPIB value */
|
||||
sof_io_write(sdev, hstream->spib_addr, size);
|
||||
if (enable)
|
||||
sof_io_write(sdev, hstream->spib_addr, size);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user