[PATCH 3/3] dma: zx: fix residue calculation

Jun Nie jun.nie at linaro.org
Wed Dec 21 22:22:06 PST 2016


2016-12-15 22:03 GMT+08:00 Shawn Guo <shawnguo at kernel.org>:
> From: Shawn Guo <shawn.guo at linaro.org>
>
> The dma residue is defined as the free space to end of transfer buffer,
> which could be multiple segments chained together.  So the residue
> calculation in zx_dma_tx_status() works for both slave_sg and cyclic
> case.  But unfortunately, the 'index' is wrong.  It should plus one,
> because the current segment is already occupied and shouldn't be counted
> into free space.
>
> This fixes the HDMI audio noise issue we see on ZX296718 with SPDIF
> interface.
>
> Signed-off-by: Shawn Guo <shawn.guo at linaro.org>
> ---
>  drivers/dma/zx_dma.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>

Reviewed-by:  Jun Nie <jun.nie at linaro.org>



More information about the linux-arm-kernel mailing list