Re: [PATCH v2] ASoC: loongson: Fix invalid position error in ls_pcm_pointer

From: Mark Brown

Date: Wed Jun 03 2026 - 04:22:25 EST


On Wed, Jun 03, 2026 at 09:07:30AM +0800, lijun wrote:
> Is it handled like this?
> desc = dma_desc_save(prtd);
> addr = ((u64)desc->saddr_hi << 32) | desc->saddr;
> if (addr < runtime->dma_addr || addr > runtime->dma_addr +
> runtime->dma_bytes) {
>         dev_warn(dev, "WARNING! dma_addr:0x%x\n", addr);
>         snd_pcm_stop_xrun(substream);

I think that should do the trick (assuming this isn't something that
occurs all the time but only in error conditions).

Attachment: signature.asc
Description: PGP signature