Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sound/soc/sof/intel/hda-stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,12 @@ int hda_data_stream_cleanup(struct device *dev, struct snd_dma_buffer *dmab,
int sd_offset = SOF_STREAM_SD_OFFSET(hstream);
int ret = 0;

/*
* Reset SPIB. The SPIB value will only take effect when SPIB is enabled,
* That's why we need to set the value with HDA_DSP_SPIB_ENABLE
Comment on lines +1330 to +1331
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: comment grammar/casing — the sentence after the comma starts with "That's"; consider splitting into two sentences and avoiding the contraction (e.g., "That is why...") to match typical kernel comment style and improve readability.

Suggested change
* Reset SPIB. The SPIB value will only take effect when SPIB is enabled,
* That's why we need to set the value with HDA_DSP_SPIB_ENABLE
* Reset SPIB. The SPIB value will only take effect when SPIB is enabled.
* That is why we need to set the value with HDA_DSP_SPIB_ENABLE.

Copilot uses AI. Check for mistakes.
*/
hda_dsp_stream_spib_config(sdev, hext_stream, HDA_DSP_SPIB_ENABLE, 0);

if (hstream->direction == SNDRV_PCM_STREAM_PLAYBACK)
ret = hda_dsp_stream_spib_config(sdev, hext_stream, HDA_DSP_SPIB_DISABLE, 0);
Comment on lines +1329 to 1336
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new SPIB reset call enables SPIB unconditionally, but SPIB is only disabled again for playback streams. For capture streams (notably the ICCMAX capture stream path, which doesn’t enable SPIB in hda_data_stream_prepare()), this will leave SPIB enabled after cleanup and changes the stream’s register state unexpectedly. Consider limiting the reset to the playback case (where SPIB is disabled right after), or preserving/restoring the previous SPIB enable state (or explicitly disabling again for capture) so cleanup doesn’t introduce a persistent SPIB enable side effect.

Copilot uses AI. Check for mistakes.
else
Expand Down
Loading