[PATCH] dmaengine: apple-admac: Fix position one period ahead at period boundary
Sasha Finkelstein
k at chaosmail.tech
Thu Oct 29 08:15:36 PDT 2026
On Oct 29, 2026, at 11:59, Jacob Procee <sn125164 at gmail.com> 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.
More information about the linux-arm-kernel
mailing list