2016-02-25 10:14:01 +00:00
|
|
|
From 0ab04f220a909d20f991f3392d65aceb0ec7e774 Mon Sep 17 00:00:00 2001
|
2016-01-17 10:42:23 +00:00
|
|
|
From: Matthias Reichl <hias@horus.com>
|
|
|
|
Date: Sun, 11 Oct 2015 12:28:30 +0200
|
2016-02-25 10:14:01 +00:00
|
|
|
Subject: [PATCH 024/156] bcm2835-dma: Limit cyclic transfers on lite channels
|
2016-01-17 10:42:23 +00:00
|
|
|
to 32k
|
|
|
|
|
|
|
|
Transfers larger than 32k cause repeated clicking with I2S soundcards.
|
|
|
|
The exact reason is yet unknown, so limit to 32k as bcm2708-dmaengine
|
|
|
|
did as an intermediate fix.
|
|
|
|
---
|
|
|
|
drivers/dma/bcm2835-dma.c | 8 +++++++-
|
|
|
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
--- a/drivers/dma/bcm2835-dma.c
|
|
|
|
+++ b/drivers/dma/bcm2835-dma.c
|
|
|
|
@@ -144,6 +144,12 @@ struct bcm2835_desc {
|
|
|
|
*/
|
|
|
|
#define MAX_LITE_TRANSFER (SZ_64K - 4)
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * Transfers larger than 32k cause issues with the bcm2708-i2s driver,
|
|
|
|
+ * so limit transfer size to 32k as bcm2708-dmaengine did.
|
|
|
|
+ */
|
|
|
|
+#define MAX_CYCLIC_LITE_TRANSFER SZ_32K
|
|
|
|
+
|
|
|
|
static inline struct bcm2835_dmadev *to_bcm2835_dma_dev(struct dma_device *d)
|
|
|
|
{
|
|
|
|
return container_of(d, struct bcm2835_dmadev, ddev);
|
|
|
|
@@ -412,7 +418,7 @@ static struct dma_async_tx_descriptor *b
|
|
|
|
d->c = c;
|
|
|
|
d->dir = direction;
|
|
|
|
if (c->ch >= 8) /* LITE channel */
|
|
|
|
- max_size = MAX_LITE_TRANSFER;
|
|
|
|
+ max_size = MAX_CYCLIC_LITE_TRANSFER;
|
|
|
|
else
|
|
|
|
max_size = MAX_NORMAL_TRANSFER;
|
|
|
|
period_len = min(period_len, max_size);
|