Skip to content

Commit

Permalink
bcm2711-rpi-ds: Switch to dma40 channel for hdmi audio
Browse files Browse the repository at this point in the history
Also tweak the flags:
Remove NO_WAIT_RESP (27)
Add BURST_LENGTH (30)

The AXI path from DMA controller to HDMI audio fifo
is long, and may have considerable delay.

When using DMA without waiting for responses it is
very easy to overfill the fifo as when the fifo
removes DREQ there may be large numbers of writes
in flight.

This means the DREQ fifo threshold must be set low
enough to accommodate the maximum number of in flight
writes (unknown by something like 24),
which means the 32 element fifo only requests data
when it contains fewer than 8 entries, making it
susceptable to underflow.

If we wait for write responses we can set the DREQ
fifo threshold much higher as there are a controlled
number of writes in flight.

However the overall bandwidth is reduced by setting
this, so also enable a burstsize of 4 to improve
bandwidth.

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
  • Loading branch information
popcornmix authored and pelwell committed May 16, 2023
1 parent 654368f commit 0491a0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/bcm2711-rpi-ds.dtsi
Expand Up @@ -364,7 +364,7 @@
<&firmware_clocks 14>,
<&dvp 0>,
<&clk_27MHz>;
dmas = <&dma (10|(1<<27)|(1<<24)|(10<<16)|(15<<20))>;
dmas = <&dma40 (10|(1<<30)|(1<<24)|(10<<16)|(15<<20))>;
status = "disabled";
};

Expand Down Expand Up @@ -397,7 +397,7 @@
<&firmware_clocks 14>,
<&dvp 1>,
<&clk_27MHz>;
dmas = <&dma (17|(1<<27)|(1<<24)|(10<<16)|(15<<20))>;
dmas = <&dma40 (17|(1<<30)|(1<<24)|(10<<16)|(15<<20))>;
status = "disabled";
};

Expand Down

0 comments on commit 0491a0a

Please sign in to comment.