Re: [PATCH] dmaengine: apple-admac: Fix position one period ahead at period boundary
From: Sasha Finkelstein
Date: Thu Oct 29 2026 - 11:17:12 EST
On Oct 29, 2026, at 11:59, Jacob Procee <sn125164@xxxxxxxxx> wrote:
>
> - residue2 = readl_relaxed(ad->base + REG_RESIDUE(channo));
> + /*
> + * The residue drops to zero when a descriptor finishes, before the
> + * next one is loaded. If the finished descriptor's report is already
> + * in the ring at that point, the position below comes out one period
> + * ahead: with residue2 == 0 directly, with residue1 == 0 through the
> + * residue2 > residue1 branch. The next read is then behind it, which
> + * ALSA takes for a wrap of the whole buffer. Re-read until the next
> + * descriptor is loaded; the limit covers a stopped or starved channel,
> + * whose residue stays zero.
> + */
This wall of text belongs in the commit message, not in a comment.