[alsa-devel] [PATCH v5] ASoC: Apply msbits constraint for sample size bigger than the msbits

Mark Brown broonie at opensource.wolfsonmicro.com
Wed Jan 18 18:46:48 CET 2012


On Wed, Jan 18, 2012 at 05:43:28PM +0100, Peter Ujfalusi wrote:
> On 01/18/2012 04:29 PM, Mark Brown wrote:
> > I'm not sure this is actually a legibility improvement, if anything it's
> > probably less clear than the original as now the setup of the loop is
> > spread even further around the function.

> Would it make it clearer if I set i to 0 right before the while?

That'd help a bit.  Though I'd just go with a for loop, the while
clearly doesn't look any better - I was just suggesting it without
actually having tried writing it out.

> > Performance isn't really a concern in this path unless we do something
> > totally insane.  Thinking time on the part of the reader needs to be
> > considered too...

> Sure it is not a concern. These small 'Performance isn't really a
> concern in this path' at the end ads up that we need faster CPUs to have
> the same perceived perfomrance.

Yeah, but if that percieved performance is already instantaneous there's
no need to worry :)  My first thought would've been to just continue on
sample rates we don't like rather than trying to break out of an
iteration of 4 steps early.


More information about the Alsa-devel mailing list