From 552d9559cae2b6344228da1b8f7205d6e537ba38 Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Mon, 13 Jul 2026 16:46:49 +0800 Subject: [PATCH] ASoC: SOF: Intel: reset spib_addr before disabling SPIB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Péter Ujfalusi Link: https://patch.msgid.link/20260713084650.4138172-2-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown --- sound/soc/sof/intel/hda-stream.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; }