[alsa-devel] [PATCH 2/2] ASoC: rename dapm_generic_apply_power()

Lu Guanqun guanqun.lu at intel.com
Sat Apr 2 09:44:33 CEST 2011

Hi Mark,

On Sat, Apr 02, 2011 at 03:35:29PM +0800, Mark Brown wrote:
> On Sat, Apr 02, 2011 at 03:23:36PM +0800, Lu Guanqun wrote:
> > dapm_generic_apply_power() is only called in dapm_seq_run() when w->id is
> > snd_soc_dapm_{input|output|hp|line|mic}. So, it's not a generic function at
> > all, we better rename it to reflect what it's doing.
> I don't think you've really understood what the code is doing here.
> While it's true that we don't ever call this function for most widget
> types due to the write compression code it is actually the generic

I don't get into write compression code yet, do you mean by "coalesce
register writes", that part of code?

> method for applying power changes to a widget in isolation - it does a
> register update surrounded by the event callbacks in the appropriate
> sequence which really is something that is generic to all widgets.  A
> better question if you want to refector the code here would be why these
> widgets are treated differently to other widgets.


More information about the Alsa-devel mailing list