Re: [PATCH v2] ASoC: loongson: Fix invalid position error in ls_pcm_pointer
From: Mark Brown
Date: Tue Jun 02 2026 - 09:15:35 EST
On Tue, Jun 02, 2026 at 08:49:29AM +0800, lijun wrote:
Please don't top post, reply in line with needed context. This allows
readers to readily follow the flow of conversation and understand what
you are talking about and also helps ensure that everything in the
discussion is being addressed.
> for example,the DMA controller is abnormal in hardware
> the addr = 0,
> addr = ((u64)desc->saddr_hi << 32) | desc->saddr;
> x = bytes_to_frames(runtime, addr - runtime->dma_addr);
> addr = 0 dma_addr=4195352576 x=-1048838144 i think the value of pos should
> not be a negative,return 0, maybe better.
Right, the question is if this happens in normal operation somehow or if
this is an error condition. If this is an error should we be reporting
it as such, for example with snd_pcm_stop_xrun().
Attachment:
signature.asc
Description: PGP signature