Skip to content

ASoC: SOF: Intel: Disable SPIB in non ICCMAX stream #5836

Open
bardliao wants to merge 2 commits into
thesofproject:topic/sof-devfrom
bardliao:disable-spib
Open

ASoC: SOF: Intel: Disable SPIB in non ICCMAX stream #5836
bardliao wants to merge 2 commits into
thesofproject:topic/sof-devfrom
bardliao:disable-spib

Conversation

@bardliao

@bardliao bardliao commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

To address the upstream review command as below.

On Tue, Jul 07, 2026 at 09:19:45PM +0800, Bard Liao wrote:
> SPIB was enabled in hda_data_stream_prepare() if is_iccmax = false.
> We should disable it in hda_data_stream_cleanup().

> -	if (hstream->direction == SNDRV_PCM_STREAM_PLAYBACK)
> -		ret = hda_dsp_stream_spib_config(sdev, hext_stream, HDA_DSP_SPIB_DISABLE, 0);
> -	else
> +	ret = hda_dsp_stream_spib_config(sdev, hext_stream, HDA_DSP_SPIB_DISABLE, 0);
> +
> +	if (hstream->direction == SNDRV_PCM_STREAM_CAPTURE)

This doesn't check if is_icccmax is true but upgrades any error from the
teardown to be propagated to the caller - should we either pay less
attention to the error or have a check to see if the cleanup is needed?

bardliao added 2 commits July 8, 2026 22:08
This reverts commit fcdd87e.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
The existing code disable SPIB in the playback direction only because
previously the hda data stream is only used for SOF firmware download
and we prepare capture stream for ICCMAX and prepare playback stream
for non ICCMAX case. But now the hda data stream is also used for
SoundWire BPT which will use both directions. The SPIB is enabled in
non ICCMAX cases and we should disable in clean up.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the SOF Intel HDA stream teardown path to only disable SPIB for non-ICCMAX streams, aligning cleanup behavior with how SPIB is configured during stream prepare and addressing upstream review feedback about unnecessary/incorrect cleanup.

Changes:

  • Extend hda_data_stream_cleanup() and hda_cl_cleanup() APIs to accept an is_iccmax flag.
  • Gate SPIB disable in hda_data_stream_cleanup() behind !is_iccmax to avoid touching SPIB for ICCMAX streams.
  • Update all in-tree callers of the modified cleanup APIs to pass the correct is_iccmax value.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
sound/soc/sof/intel/hda.h Updates function prototypes to add is_iccmax to cleanup APIs.
sound/soc/sof/intel/hda-stream.c Disables SPIB only for non-ICCMAX streams during cleanup.
sound/soc/sof/intel/hda-sdw-bpt.c Updates the cleanup call to pass the new is_iccmax argument.
sound/soc/sof/intel/hda-loader.c Threads is_iccmax through hda_cl_cleanup() into hda_data_stream_cleanup() and updates call sites.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants