diff options
| author | hathach <[email protected]> | 2024-09-24 17:55:15 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-09-24 17:55:15 +0700 |
| commit | a1244381b3e68959f99bc0ba8057eea5ca35bac6 (patch) | |
| tree | 1e8960c674ddea05cf62862e667eec867b28af47 /src/portable/synopsys | |
| parent | 86b4608365e66ba250cf4fb52226b0ed02488cc1 (diff) | |
add CFG_TUD_DWC2_DMA, make it compile time option
Diffstat (limited to 'src/portable/synopsys')
| -rw-r--r-- | src/portable/synopsys/dwc2/dcd_dwc2.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/portable/synopsys/dwc2/dcd_dwc2.c b/src/portable/synopsys/dwc2/dcd_dwc2.c index 897f81a42..2c5e82778 100644 --- a/src/portable/synopsys/dwc2/dcd_dwc2.c +++ b/src/portable/synopsys/dwc2/dcd_dwc2.c @@ -95,16 +95,13 @@ static bool _sof_en; //-------------------------------------------------------------------- TU_ATTR_ALWAYS_INLINE static inline bool dma_enabled(const dwc2_regs_t* dwc2) { + #if !CFG_TUD_DWC2_DMA (void) dwc2; - // DMA doesn't support fifo transfer -#ifdef TUD_AUDIO_PREFER_RING_BUFFER -#if TUD_AUDIO_PREFER_RING_BUFFER return false; -#endif -#endif + #else // Internal DMA only return (dwc2->ghwcfg2_bm.arch == GHWCFG2_ARCH_INTERNAL_DMA); - // return false; + #endif } TU_ATTR_ALWAYS_INLINE static inline uint16_t dma_cal_epfifo_base(uint8_t rhport) { |
