7 Oct
2011
7 Oct
'11
12:17 p.m.
On Fri, Oct 07, 2011 at 10:06:46AM +0300, Peter Ujfalusi wrote:
Calling soc_dapm_sync() after adding DAPM widgets/routes will lead to kernel crash caused by unitialized widget->power_check callback (NULL pointer dereference).
Call snd_soc_dapm_new_widgets(dapm); instead of soc_dapm_sync which will initialize the widgets, and will call the dapm_power_widgets (soc_dapm_sync is a wrapper for dapm_power_widgets).
No, there should be no need for either callback in individual drivers unless they're doing something very specialist. This will have been the case for a while now.