[alsa-devel] [PATCH] ASoC: Use codec mutex in dapm_set_pga()

Mark Brown broonie at opensource.wolfsonmicro.com
Thu Oct 1 12:37:14 CEST 2009


On Thu, Oct 01, 2009 at 09:17:36AM +0300, ext-eero.nurkkala at nokia.com wrote:
> From: Eero Nurkkala <ext-eero.nurkkala at nokia.com>

> codec->mutex seems required if widget->* values
> are altered. Moreover, snd_soc_dapm_put_volsw()
> may alter widget->saved_value. dapm_set_pga()
> uses widget->saved_value in a for loop which now
> has a distant chance of getting out of control.

Hrm.  This doesn't look right.  dapm_set_pga() is only called from
within the DAPM power updates so we should've taken the codec mutex much
further up the stack otherwise all the DAPM list walking and updating
will have issues.  Was this just from code inspection or are you running
into actual issues?


More information about the Alsa-devel mailing list