[alsa-devel] [PATCH 2/5] ASoC: Call snd_soc_new_widgets() after registering cards DAPM widgets
lars at metafoo.de
Wed Apr 13 14:32:35 CEST 2011
On 04/13/2011 02:38 AM, Mark Brown wrote:
> On Tue, Apr 12, 2011 at 07:31:02PM +0200, Lars-Peter Clausen wrote:
>> After registering new DAPM widgets nd_soc_new_widgets() must be called,
>> otherwise DAPM for those new widgets will not work.
>> snd_soc_new_widgets() is placed after the card late_probe call, so cards
>> can register new DAPM widgets in there.
>> Signed-off-by: Lars-Peter Clausen <lars at metafoo.de>
> There's already a call for this in post_component_init(), it just needs
> to be moved later in the sequence now.
post_component_init() is called for each registered codec (and auxdev).
Since all the DAPM widgets are kept in one list now it probably makes sense to
traverse that list only once, when all components have been registered.
But snd_soc_dapm_new_widgets also calls dapm_power_widgets which operates on
the passed dapm_context, will it be without any effect on the DAPM context,
when it is called on a newly allocated context?
Otherwise I would say call snd_soc_dapm_new_widgets once for the cards
dapm_context and snd_soc_dapm_sync for each codec context.
More information about the Alsa-devel