]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ASoC: spacemit: adjust FIFO trigger threshold to half FIFO size
authorTroy Mitchell <troy.mitchell@linux.spacemit.com>
Wed, 29 Apr 2026 01:38:48 +0000 (09:38 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 29 Apr 2026 02:41:32 +0000 (11:41 +0900)
Set both TX and RX FIFO trigger thresholds (TFT/RFT) to 0xF (half of
the 32-entry FIFO) instead of 5. This provides better DMA efficiency
by allowing more data to accumulate before triggering a DMA request,
reducing the number of DMA transactions needed.

Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Link: https://patch.msgid.link/20260429-k3-i2s-v1-3-2fe99db11ecb@linux.spacemit.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/spacemit/k1_i2s.c

index bb73d32a1b0971d51f2a28c77c9ffc2c316ed811..43481f387c446cbc51b0a45b132e22ed9cb64aad 100644 (file)
@@ -93,8 +93,8 @@ static void spacemit_i2s_init(struct spacemit_i2s_dev *i2s)
        u32 sscr_val, sspsp_val, ssfcr_val, ssrwt_val;
 
        sscr_val = SSCR_TRAIL | SSCR_FRF_PSP;
-       ssfcr_val = FIELD_PREP(SSFCR_FIELD_TFT, 5) |
-                   FIELD_PREP(SSFCR_FIELD_RFT, 5) |
+       ssfcr_val = FIELD_PREP(SSFCR_FIELD_TFT, 0xF) |
+                   FIELD_PREP(SSFCR_FIELD_RFT, 0xF) |
                    SSFCR_RSRE | SSFCR_TSRE;
        ssrwt_val = SSRWT_RWOT;
        sspsp_val = SSPSP_SFRMP;