> > 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. > > > > Signed-off-by: Chancel Liu <[email protected]> > > --- > ... > > @@ -3294,6 +3298,45 @@ int snd_soc_of_parse_aux_devs(struct > > snd_soc_card *card, const char *propname) } > > EXPORT_SYMBOL_GPL(snd_soc_of_parse_aux_devs); > > > > +int snd_soc_of_parse_ignore_suspend_widgets(struct snd_soc_card *card, > > + const char *propname) > > propname is fixed value "ignore-suspend-widgets",needn't this agument. > you funciton include "ignore_suspend_widgets", suppose only parse property. > ignore_suspend_widgets > > Frank
The motivation for keeping the propname argument is to align with existing snd_soc_of_parse_*() helper prototypes, which always take (struct snd_soc_card *card, const char *propname). I agree that in this case the property name is fixed to "ignore-suspend-widgets". We can simplify the helper by removing it if preferred. Regards, Chancel Liu
