ASoC/soundwire: Intel: reset the PCMSyCM registers in hda_sdw_bpt_close#5715
Open
bardliao wants to merge 1 commit intothesofproject:topic/sof-devfrom
Open
ASoC/soundwire: Intel: reset the PCMSyCM registers in hda_sdw_bpt_close#5715bardliao wants to merge 1 commit intothesofproject:topic/sof-devfrom
bardliao wants to merge 1 commit intothesofproject:topic/sof-devfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR ensures Intel SoundWire BPT cleanup resets the PCMSyCM registers on stream close, matching the reset behavior already present for “normal” SoundWire streams.
Changes:
- Extend
hda_sdw_bpt_close()API to accept alink_id. - Reset PCMSyCM registers for TX/RX PDIs in
hda_sdw_bpt_close(). - Update in-tree callers to pass the SoundWire instance/link identifier.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| sound/soc/sof/intel/hda-sdw-bpt.c | Adds PCMSyCM reset in close path and threads link_id into the close call. |
| include/sound/hda-sdw-bpt.h | Updates the exported/stub prototype for hda_sdw_bpt_close() with link_id. |
| drivers/soundwire/intel_ace2x.c | Updates callers to pass sdw->instance as the link_id argument. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
sound/soc/sof/intel/hda-sdw-bpt.c
Outdated
Comment on lines
+463
to
+470
| if (ret) | ||
| dev_err(dev, "%s: PCMSyCM PCMSyCM failed for TX: %d\n", | ||
| __func__, ret); | ||
|
|
||
| ret = hdac_bus_eml_sdw_map_stream_ch(sof_to_bus(sdev), link_id, | ||
| 1, /* cpu_dai->id -> PDI1 */ | ||
| 0, 0, SNDRV_PCM_STREAM_CAPTURE); | ||
| if (ret) |
There was a problem hiding this comment.
The return value from hdac_bus_eml_sdw_map_stream_ch() is checked with if (ret) here, but the rest of this file (and e.g. sound/soc/sof/intel/hda-dai.c) consistently treats errors as ret < 0. Please switch to ret < 0 to avoid flagging any non-negative return as an error and to keep error handling consistent.
Suggested change
| if (ret) | |
| dev_err(dev, "%s: PCMSyCM PCMSyCM failed for TX: %d\n", | |
| __func__, ret); | |
| ret = hdac_bus_eml_sdw_map_stream_ch(sof_to_bus(sdev), link_id, | |
| 1, /* cpu_dai->id -> PDI1 */ | |
| 0, 0, SNDRV_PCM_STREAM_CAPTURE); | |
| if (ret) | |
| if (ret < 0) | |
| dev_err(dev, "%s: PCMSyCM PCMSyCM failed for TX: %d\n", | |
| __func__, ret); | |
| ret = hdac_bus_eml_sdw_map_stream_ch(sof_to_bus(sdev), link_id, | |
| 1, /* cpu_dai->id -> PDI1 */ | |
| 0, 0, SNDRV_PCM_STREAM_CAPTURE); | |
| if (ret < 0) |
Resetting the PCMSyCM registers is required for Intel SoundWire stream. The same procedure is done in sdw_hda_dai_hw_params() for the normal SoundWire stream, too. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resetting the PCMSyCM registers is required for Intel SoundWire stream. The same procedure is done in sdw_hda_dai_hw_params() for the normal SoundWire stream, too.