[alsa-devel] [PATCH 1/4] ASoC:rt5670:Add runtime PM support

Lin, Mengdong mengdong.lin at intel.com
Fri Nov 7 15:33:24 CET 2014


> -----Original Message-----
> From: Mark Brown [mailto:broonie at kernel.org]
> Sent: Friday, November 07, 2014 5:44 PM

> > > > +static int rt5670_runtime_resume(struct device *dev) {
> > > > +	return 0;
> > > > +}
> 
> > > This should be undoing the change done on suspend otherwise we'll be
> > > stuck on the internal clock after resuming.  Alternatively if
> > > something will undo that elsewhere then presumably we don't need to
> > > use runtime PM to select the internal clock anyway?
> 
> > Is it okay to restore default sysclock setting is runtime_resume ops?
> 
> Yes, that's fine of course - I'm just assuming that this works already so
> presumably there is some restore code somewhere already that should be
> removed?

Bard verified the patch on a Tegra platform and I did on a Braswell platform.
On Braswell, the codec keeps using the internal clock after runtime resumed
until machine driver select its sysclk source to PLL in hw_param ops. 
No other restore clk restore code.

Since other machine driver can have different behavior, so it seems better to 
restore default clk settings when runtime resumed, as after boot. And I can
test this next Monday.

Thanks
Mengdong


More information about the Alsa-devel mailing list