[alsa-devel] [PATCH] ASoC: rt5645: Power up the RC clock to make sure the speaker volume adjust properly

Mark Brown broonie at kernel.org
Fri Nov 6 11:44:33 CET 2015


On Fri, Nov 06, 2015 at 02:52:36AM +0000, Oder Chiou wrote:

> > > +	cancel_delayed_work_sync(&rt5645->rcclock_work);

> > > +	regmap_update_bits(rt5645->regmap, RT5645_MICBIAS,
> > > +		RT5645_PWR_CLK25M_MASK, RT5645_PWR_CLK25M_PU);

> > > +	ret = snd_soc_put_volsw(kcontrol, ucontrol);

> > > +	queue_delayed_work(system_power_efficient_wq, &rt5645->rcclock_work,
> > > +		msecs_to_jiffies(200));

> > A more idiomatic way of doing this is to just have the
> > queue_delayed_work() - there's no need to cancel a work item before
> > requeuing it, the workqueue code will do the right thing.  Can you
> > please submit a followup patch cleaning that up?

> Thank you for the kind advice. The "cancel_delayed_work_sync" is essential
> in case of the operation of kcontrol continuously. We want to make sure the
> RC clock can be powered up at least 200ms after the speaker volume is
> adjusted, so we add the "cancel_delayed_work_sync" on the top of the
> function and requeue it, thanks.

What makes you claim that this is "essential in case of the operation of
kcontrol continuously"?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20151106/96ff3923/attachment.sig>


More information about the Alsa-devel mailing list