Skip to content

Commit f07453d

Browse files
committed
ASoC: SOF: Intel: reset SPIB in hda_data_stream_cleanup
The register will indicate to the host DMA where the position is in the buffer currently processed by host SW. Reset it to 0 in hda_data_stream_cleanup. The register is ignored by the host DMA if SPIB is disabled. That's why the "enable" parameter needs to be HDA_DSP_SPIB_ENABLE. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
1 parent b309a4a commit f07453d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,6 +1326,12 @@ int hda_data_stream_cleanup(struct device *dev, struct snd_dma_buffer *dmab,
13261326
int sd_offset = SOF_STREAM_SD_OFFSET(hstream);
13271327
int ret = 0;
13281328

1329+
/*
1330+
* Reset SPIB. The SPIB value will only take effect when SPIB is enabled,
1331+
* That's why we need to set the value with HDA_DSP_SPIB_ENABLE
1332+
*/
1333+
hda_dsp_stream_spib_config(sdev, hext_stream, HDA_DSP_SPIB_ENABLE, 0);
1334+
13291335
if (hstream->direction == SNDRV_PCM_STREAM_PLAYBACK)
13301336
ret = hda_dsp_stream_spib_config(sdev, hext_stream, HDA_DSP_SPIB_DISABLE, 0);
13311337
else

0 commit comments

Comments
 (0)