[PATCH v4 0/3] ASoC: soc-core: Add core support for ignoring suspend on selected DAPM widgets

Chancel Liu posted 3 patches 1 month, 1 week ago
include/sound/soc-dapm.h  |  2 +
include/sound/soc.h       |  5 +++
sound/soc/fsl/imx-rpmsg.c | 26 +++++--------
sound/soc/soc-core.c      | 43 +++++++++++++++++++++
sound/soc/soc-dapm.c      | 79 +++++++++++++++++++++++++++++++++------
5 files changed, 126 insertions(+), 29 deletions(-)
[PATCH v4 0/3] ASoC: soc-core: Add core support for ignoring suspend on selected DAPM widgets
Posted by Chancel Liu 1 month, 1 week ago
Some audio systems require specific DAPM widgets to remain powered
during system suspend. Introduce a generic and reusable mechanism in
the ASoC core to mark selected DAPM widgets as ignore_suspend.

The unified mechanism consists of two parts:
1. Parse and store the name list of widgets to ignore suspend in
struct snd_soc_card

The list of widgets can be provided either by the machine driver or
parsed from Device Tree. Different machines have different routing and
power requirements. Each machine can specify its own widgets to ignore
suspend through DT property. It enables flexible policy without hard
code. A new helper, snd_soc_of_parse_ignore_suspend_widgets() is added
for this purpose.

2. Apply ignore_suspend flags during snd_soc_bind_card()

After all components have been probed and all DAPM widgets have been
registered, snd_soc_bind_card() performs a unified lookup of the
configured widget names across all DAPM contexts of the card and marks
the matching widgets with ignore_suspend = 1.

Switch to use core ignore-suspend-widgets support for imx-rpmsg driver.

Changes in v4:
- Rework first patch to improve widget lookup strategy:
  Add snd_soc_dapm_pin_has_prefix() helper function to detect if pin
  name contains a component prefix
  Preserve exact matching for names with prefix to support
  disambiguation
  Only apply prefix-stripped matching when pin has no known prefix

Changes in v3:
- Reword first patch subject to use snd_soc_dapm_widget_name_cmp()
- Use goto fail for error handling in imx_rpmsg_probe() to ensure proper
cleanup of of_node references

The v2 series is a rework of the previous "[PATCH] ASoC: imx-rpmsg:
Fix ignore-suspend-widgets only applied to codec DAPM".
Changes in v2:
- Rework to use a unified core mechanism instead of machine driver
specific code

Chancel Liu (3):
  ASoC: dapm: Fix widget lookup with prefixed names across DAPM contexts
  ASoC: soc-core: Add core support for ignoring suspend on selected DAPM
    widgets
  ASoC: fsl: imx-rpmsg: Switch to core ignore-suspend-widgets support

 include/sound/soc-dapm.h  |  2 +
 include/sound/soc.h       |  5 +++
 sound/soc/fsl/imx-rpmsg.c | 26 +++++--------
 sound/soc/soc-core.c      | 43 +++++++++++++++++++++
 sound/soc/soc-dapm.c      | 79 +++++++++++++++++++++++++++++++++------
 5 files changed, 126 insertions(+), 29 deletions(-)

--
2.50.1
Re: [PATCH v4 0/3] ASoC: soc-core: Add core support for ignoring suspend on selected DAPM widgets
Posted by Mark Brown 2 weeks, 5 days ago
On Thu, 07 May 2026 10:36:51 +0900, Chancel Liu wrote:
> ASoC: soc-core: Add core support for ignoring suspend on selected DAPM widgets
> 
> Some audio systems require specific DAPM widgets to remain powered
> during system suspend. Introduce a generic and reusable mechanism in
> the ASoC core to mark selected DAPM widgets as ignore_suspend.
> 
> The unified mechanism consists of two parts:
> 1. Parse and store the name list of widgets to ignore suspend in
> struct snd_soc_card
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.2

Thanks!

[1/3] ASoC: dapm: Fix widget lookup with prefixed names across DAPM contexts
      https://git.kernel.org/broonie/sound/c/8468c8aafe8b
[2/3] ASoC: soc-core: Add core support for ignoring suspend on selected DAPM widgets
      https://git.kernel.org/broonie/sound/c/51271184a06d
[3/3] ASoC: fsl: imx-rpmsg: Switch to core ignore-suspend-widgets support
      https://git.kernel.org/broonie/sound/c/68bb9a7f557a

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark