summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBard Liao <yung-chuan.liao@linux.intel.com>2026-07-13 16:46:49 +0800
committerMark Brown <broonie@kernel.org>2026-07-13 20:03:46 +0100
commit552d9559cae2b6344228da1b8f7205d6e537ba38 (patch)
treed71ad464bfc3da6b589ceea01232bfb9c3b90b4d
parenta13c140cc289c0b7b3770bce5b3ad42ab35074aa (diff)
downloadlinux-next-552d9559cae2b6344228da1b8f7205d6e537ba38.tar.gz
linux-next-552d9559cae2b6344228da1b8f7205d6e537ba38.zip
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>
-rw-r--r--sound/soc/sof/intel/hda-stream.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/sof/intel/hda-stream.c b/sound/soc/sof/intel/hda-stream.c
index 5c1f3b427cdb..4a46e35c3eac 100644
--- a/sound/soc/sof/intel/hda-stream.c
+++ b/sound/soc/sof/intel/hda-stream.c
@@ -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;
}