[alsa-devel] [PATCH] ASoC: OMAP machines: Fix kernel crash due to changes in core

Péter Ujfalusi peter.ujfalusi at ti.com
Fri Oct 7 13:12:43 CEST 2011

On Friday 07 October 2011 11:48:01 Mark Brown wrote:
> > This might be true for machines, which adds jack functionality. We are
> > now calling snd_soc_dapm_new_widgets before adding jack pins.
> > Also machines passing their DAPM widgets/routes via snd_soc_card are
> > safe from this issue.
> No, it should never be needed by anything.

Could be, but day before yesterday the sdp4430 was fine.
I've pulled yesterday morning, and welcomed me with a kernel crash at boot 
> > For machines, which does not add jacks the snd_soc_dapm_new_widgets will
> > be not called at all, which will eventually leads to a crash.
> > 
> > in soc-core.c: soc_post_component_init() the dai->init called, but
> > there's no additional snd_soc_dapm_new_widgets call to make sure that
> > the new widgets added by the machine driver are instantiated.
> We could either go round every single machine driver in the kernel
> modifying them or we could make sure it's handled in the core - I know
> which of those seems better to me!

For sure fixing this in core is the best place.
Try to boot smartq_wm8987, s3c24xx_simtec_tlv320aic23, s3c24xx_simtec_hermes,
jive_wm8750, h1940_uda1380, etc.
Lots of the machine drivers are calling soc_dapm_sync after adding widgets.
They will crash.
If we want to fix this in core we need to remove the soc_dapm_sync from _init
calls, and add the snd_soc_dapm_new_widgets post dai_link->init call in
soc_post_component_init of soc-core.c.

Having the soc_dapm_sync without calling snd_soc_dapm_new_widgets after adding
new widgets will trigger this.

As I said: sdp4430 strated to crash yesterday morning - without any change in
the sdp4430 driver.


More information about the Alsa-devel mailing list