On Mon, 19 May 2008 11:20:39 +0100 "ext Mark Brown" <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote: > Currently the ASoC core configures the bias levels in the system using > a callback on codecs and machines called "dapm_event", passing it PCI > style power levels as SNDRV_CTL_POWER_ constants. This is more obscure > than it needs to be and has caused confusion to driver authors, > especially given that DAPM is also performing power management. > > Address this by renaming the callback function to "set_bias_level" and > using constants explicitly representing the off, standby, pre-on and > on states which DAPM transitions through. > First impression: Is that somewhat confusing to refer power state event as a bias level? First what comes to my is this related to mic bias... If there's a need to change name of dapm_event callback, probably some dapm_device_event etc. would be better if need to separate from other dapm events? > --- a/include/sound/soc.h > +++ b/include/sound/soc.h > +enum snd_soc_bias_level { > + SND_SOC_BIAS_ON, > + SND_SOC_BIAS_PREPARE, > + SND_SOC_BIAS_STANDBY, > + SND_SOC_BIAS_OFF, Yeah, those SNDRV_CTL_POWER_ constants are not so clear and I think some more meaningful naming like here would be better. Jarkko _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel