Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] ASoC: soc-core: Add core support for ignoring suspend on selected DAPM widgets
@ 2026-05-07  1:36 Chancel Liu
  2026-05-07  1:36 ` [PATCH v4 1/3] ASoC: dapm: Fix widget lookup with prefixed names across DAPM contexts Chancel Liu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chancel Liu @ 2026-05-07  1:36 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, shengjiu.wang, Xiubo.Lee,
	festevam, nicoleotsuka, Frank.Li, s.hauer
  Cc: kernel, shumingf, pierre-louis.bossart, linux-sound, linux-kernel,
	linuxppc-dev, imx, linux-arm-kernel

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



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-05-07  1:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-07  1:36 [PATCH v4 0/3] ASoC: soc-core: Add core support for ignoring suspend on selected DAPM widgets Chancel Liu
2026-05-07  1:36 ` [PATCH v4 1/3] ASoC: dapm: Fix widget lookup with prefixed names across DAPM contexts Chancel Liu
2026-05-07  1:36 ` [PATCH v4 2/3] ASoC: soc-core: Add core support for ignoring suspend on selected DAPM widgets Chancel Liu
2026-05-07  1:36 ` [PATCH v4 3/3] ASoC: fsl: imx-rpmsg: Switch to core ignore-suspend-widgets support Chancel Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox