[PATCH] ASoC: imx-rpmsg: Fix ignore-suspend-widgets only applied to codec DAPM
Mark Brown
broonie at kernel.org
Sat Apr 11 20:40:42 AEST 2026
On Sat, Apr 11, 2026 at 04:24:39PM +0900, Chancel Liu wrote:
> Currently the property "ignore-suspend-widgets" are applied only to the
> codec's DAPM context. However, some widgets listed in the property
> (e.g. "Headphone Jack") belong to card or CPU DAI DAPM context.
> Extend the handling so that widgets which are marked ignoring suspend
> are looked up across all widgets in the card.
> --- a/sound/soc/fsl/imx-rpmsg.c
> +++ b/sound/soc/fsl/imx-rpmsg.c
> + num_widgets = of_property_count_strings(data->card.dev->of_node,
> + "ignore-suspend-widgets");
Don't we get an error code back if the property doesn't exist at all?
> + for_each_card_widgets(card, w) {
> + for (i = 0; i < num_widgets; i++) {
> + of_property_read_string_index(data->card.dev->of_node,
> + "ignore-suspend-widgets",
> + i, &widgets);
> + if (!strcmp(w->name, widgets)) {
> + ret = snd_soc_dapm_ignore_suspend(w->dapm, widgets);
> + if (ret) {
> + dev_err(dev, "failed to find ignore suspend widgets\n");
> + return ret;
> + }
> + }
> + }
> + }
This seems like the wrong level to implement this search, it should be
in the core. I'm also not seeing any prefix handling, the widget name
might've been prefixed at runtime.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20260411/3248032b/attachment.sig>
More information about the Linuxppc-dev
mailing list