[alsa-devel] [PATCH 4/5] ASoC: Process card->widgets after all probe routines

Stephen Warren swarren at nvidia.com
Tue Apr 19 21:19:37 CEST 2011

Mark Brown wrote at Tuesday, April 19, 2011 12:53 PM:
> On Tue, Apr 19, 2011 at 12:46:16PM -0600, Stephen Warren wrote:
> > Without this, if tegra_wm8903 is modified to provide controls,
> > widgets, and routes through data rather than calling registration
> > functions, tegra_wm8903_event_* will crash, because w->codec==NULL.
> This will break other things as it means that we can't route to the DAPM
> widgets that are added from machine init functions (eg, those that set
> up jacks) which is a more common case - see the changelog for the code
> you're modifying.
> There's also the fact that these widgets should be being created in the
> card DAPM context so I'm a bit concerned that they're getting a CODEC at
> all.  The dereferencing you're trying to do isn't good, you're looking
> for a CODEC to find the card for widgets in the card DAPM context which
> shouldn't be associated with any particular CODEC in the first place.
> You should just find the card based on the DAPM context you're in.

OK. I dropped that patch and fixed up the event functions so they work

However, I do notice one other regression moving the tegra_wm8903 driver
to data instead of code for widgets/controls/routes:

Before that change, the "Int Spk" control both works fine, and when I
modify the value in alsamixer, exit, and restart alsamixer, the value I
set is maintained.

However, after that change, the control works fine (i.e. mutes/umutes
speakers while speaker-test is running in the background), but when I
quit and restart alsamixer, the most recent set value is not shown.

Do you have any clue what I should look at for that?



More information about the Alsa-devel mailing list