[alsa-devel] [PATCH 2/4 v2] ASoC: wm_adsp: Move DVFS control into codec driver

Charles Keepax ckeepax at opensource.wolfsonmicro.com
Mon Jun 23 17:41:59 CEST 2014


On Sat, Jun 21, 2014 at 09:50:37PM +0100, Mark Brown wrote:
> On Fri, Jun 20, 2014 at 03:41:11PM +0100, Charles Keepax wrote:
> 
> > +	case SND_SOC_DAPM_PRE_PMD:
> > +		ret = arizona_dvfs_down(arizona, ARIZONA_DVFS_ADSP1_RQ);
> > +		if (ret != 0)
> > +			dev_warn(codec->dev,
> > +				 "Failed to lower DVFS: %d\n", ret);
> > +		break;
> 
> I would expect this to be _POST_PMD since it happens...

It might be a little more logical that way.

> 
> > +	default:
> > +		break;
> > +	}
> > +
> > +	return wm_adsp2_early_event(w, kcontrol, event);
> 
> ...before we even give the ADSP event a chance to run meaning the
> voltage will be ramped down prior to halting the DSP.  If there are any
> connected outputs still live this might result in audible issues as the
> device goes out of spec briefly prior to being halted and there is some
> remote chance that it could cause problems on next power up I guess (it
> did go out of spec after all).

Although this isn't actually an issue as this is the preloader
widget we added for the firmware, which is a dai_link widget so
the DSP will have been shutdown by the main widget before this is
ever called. That said _POST_PMD makes the intention much more
clear so worth changing too.

Thanks,
Charles


More information about the Alsa-devel mailing list