[alsa-devel] [PATCH v2 1/6] ASoC: Intel: Add helper to poll register for DSP status
Vinod Koul
vinod.koul at intel.com
Thu Jul 9 12:53:27 CEST 2015
On Thu, Jul 09, 2015 at 11:48:55AM +0100, Mark Brown wrote:
> On Thu, Jul 09, 2015 at 09:57:41AM +0530, Vinod Koul wrote:
> > On Wed, Jul 08, 2015 at 07:36:21PM +0100, Mark Brown wrote:
>
> > > > + for (time = 0; time < timeout; time++) {
> > > > + if ((sst_dsp_shim_read_unlocked(ctx, offset) & mask) == expected_value)
> > > > + break;
> > > > +
> > > > + mdelay(1);
> > > > + }
>
> > > mdelay() not msleep()? If we're waiting for multiple miliseconds that
> > > could be lots of busy waiting.
>
> > Usually this should get reflected in 1st iteration as the register update
> > would get updated farrily quickly. msleep will add up lots of latency to
> > this.
>
> A common approach for that is to do a busy wait for say the first
> milisecond (perhaps polling more often too) and then fall back to
> something sleepy if things are slow.
Yes that sounds sensible to me, will add
Thanks
--
~Vinod
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150709/0401d3ce/attachment.sig>
More information about the Alsa-devel
mailing list