]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00300188-1 ASoC: imx-hdmi-dma: Double the buffer and period sizes
authorNicolin Chen <Guangyu.Chen@freescale.com>
Fri, 7 Mar 2014 11:59:04 +0000 (19:59 +0800)
committerNicolin Chen <Guangyu.Chen@freescale.com>
Tue, 11 Mar 2014 02:42:17 +0000 (10:42 +0800)
We found HDMI Audio has a performance issue when playback 8 channels 192KHz
files, CPU might lag its interrupt responsing while SDMA continues updating
HDMI internal AHB DMA's address and restarting AHB DMA, which resulted the
noise when AHB DMA access overlaps with the data copy procedures in this
driver.

Thus we here double the buffer size and period size of HDMI Audio to chop
the CPU interrupt to its half in the same span of time so that we can keep
the data copy procedures safe and provent it from overlapping access with
AHB DMA.

Acked-by: Wang Shengjiu <b02247@freescale.com>
Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
(cherry picked from commit 04af1a351e016f52276ae002fd9f64b6b2962168)

sound/soc/fsl/imx-hdmi-dma.c

index 4155122f8d0e5f8cb3ba1523733af92ddbae9ad0..f3a7a9be05a27bab39a7aec15d2c125a1bed4bbf 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * imx-hdmi-dma.c  --  HDMI DMA driver for ALSA Soc Audio Layer
  *
- * Copyright (C) 2011-2013 Freescale Semiconductor, Inc.
+ * Copyright (C) 2011-2014 Freescale Semiconductor, Inc.
  *
  * based on imx-pcm-dma-mx2.c
  * Copyright 2009 Sascha Hauer <s.hauer@pengutronix.de>
@@ -121,9 +121,9 @@ EXPORT_SYMBOL(iec_header);
  *    transmitted in a period, it can be continued in the next period.  This
  *    is necessary for 6 ch.
  */
-#define HDMI_DMA_PERIOD_BYTES          (6144)
-#define HDMI_DMA_BUF_SIZE              (64 * 1024)
-#define HDMI_PCM_BUF_SIZE              (64 * 1024)
+#define HDMI_DMA_PERIOD_BYTES          (12288)
+#define HDMI_DMA_BUF_SIZE              (128 * 1024)
+#define HDMI_PCM_BUF_SIZE              (128 * 1024)
 
 #define hdmi_audio_debug(dev, reg) \
        dev_dbg(dev, #reg ": 0x%02x\n", hdmi_readb(reg))