[alsa-devel] [PATCH 1/6] ASoC/mpc5200: Track DMA position by period number instead of bytes
Grant Likely
grant.likely at secretlab.ca
Sun Nov 8 03:50:41 EST 2009
On Sat, Nov 7, 2009 at 3:35 AM, Liam Girdwood <lrg at slimlogic.co.uk> wrote:
> On Sat, 2009-11-07 at 01:33 -0700, Grant Likely wrote:
>> All DMA blocks are lined up to period boundaries, but the DMA
>> handling code tracks bytes instead. This patch reworks the code
>> to track the period index into the DMA buffer instead of the
>> physical address pointer. Doing so makes the code simpler and
>> easier to understand.
>>
>> Signed-off-by: Grant Likely <grant.likely at secretlab.ca>
>
> Very minor coding style thing below otherwise all get my Ack.
>
> Acked-by: Liam Girdwood <lrg at slimlogic.co.uk>
Thanks Liam.
>> - s->period_current_pt += s->period_bytes;
>> - if (s->period_current_pt >= s->period_end)
>> - s->period_current_pt = s->period_start;
>> + s->period_current = (s->period_current+1) % s->runtime->periods;
>
> I prefer a space around operators.
>
> s->period_current = (s->period_current + 1) % s->runtime->periods;
So do I, but this kept the line length down below 80 chars. Avoiding
the line spillage this way looks nicer than the alternatives.
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
More information about the Linuxppc-dev
mailing list