[alsa-devel] [PATCH] ASoC: Use codec mutex in dapm_set_pga()
ext-eero.nurkkala at nokia.com
Thu Oct 1 14:34:46 CEST 2009
On Thu, 2009-10-01 at 14:09 +0200, ext Mark Brown wrote:
> On Thu, Oct 01, 2009 at 02:56:24PM +0300, Eero Nurkkala wrote:
> > Actually, in this case: (kernel 2.6.28)
> That's rather old...
Yes, but I've been mirroring things with 2.6.31..
> > But if it didn't come from snd_soc_dapm_put_volsw(),
> > but instead:
> > close_delayed_work() ->
> > snd_soc_dapm_stream_event() ->
> > dapm_power_widgets() ->
> > dapm_set_pga()
> > then the codec->mutex is not taken,
> > and the bug presented in the patch is out there, no?
> Right, so close_delayed_work() needs to lock the card while it runs.
Can't really do that, because snd_soc_dapm_stream_event()
will try to take codec mutex again. Tried the following:
@@ -2071,9 +2071,9 @@ int snd_soc_dapm_stream_event(struct snd_soc_codec
Does that make any sense?
More information about the Alsa-devel