Browse Source

sync raspberry pi patch set

Enable CMA and CMA_DMA for RPI.
Make ENDIAN Symbols visible.
Set CMA to 64 MB.
Add MMAP I2S enable patch.
Waldemar Brodkorb 10 years ago
parent
commit
01cd87aa87

File diff suppressed because it is too large
+ 712 - 67
target/arm/bcm28xx/patches/3.18.8/0000-raspberry-pi.patch


+ 0 - 26
target/arm/bcm28xx/patches/3.18.8/0002-allow-to-control-volume-for-each-channel.patch

@@ -1,26 +0,0 @@
-From 05ca0b1b73f368564aef8cc4763e96a218cfefeb Mon Sep 17 00:00:00 2001
-From: Waldemar Brodkorb <wbrodkorb@conet.de>
-Date: Mon, 2 Feb 2015 09:51:56 +0100
-Subject: [PATCH 2/2] allow to control volume for each channel
-
-Signed-off-by: Waldemar Brodkorb <wbrodkorb@conet.de>
----
- sound/arm/bcm2835-ctl.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/sound/arm/bcm2835-ctl.c b/sound/arm/bcm2835-ctl.c
-index aad905f..12e77f5 100755
---- a/sound/arm/bcm2835-ctl.c
-+++ b/sound/arm/bcm2835-ctl.c
-@@ -45,7 +45,7 @@ static int snd_bcm2835_ctl_info(struct snd_kcontrol *kcontrol,
- 	audio_info(" ... IN\n");
- 	if (kcontrol->private_value == PCM_PLAYBACK_VOLUME) {
- 		uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
--		uinfo->count = 1;
-+		uinfo->count = 2;
- 		uinfo->value.integer.min = CTRL_VOL_MIN;
- 		uinfo->value.integer.max = CTRL_VOL_MAX;      /* 2303 */
- 	} else if (kcontrol->private_value == PCM_PLAYBACK_MUTE) {
--- 
-1.9.1
-

+ 37 - 0
target/arm/bcm28xx/patches/3.18.8/0002-enable-MMAP-by-default-allow-overide-via-use_mmap.patch

@@ -0,0 +1,37 @@
+diff -Nur linux-3.18.6.orig/sound/soc/bcm/bcm2708-i2s.c linux-3.18.6/sound/soc/bcm/bcm2708-i2s.c
+--- linux-3.18.6.orig/sound/soc/bcm/bcm2708-i2s.c	2015-02-12 12:00:42.809186343 +0100
++++ linux-3.18.6/sound/soc/bcm/bcm2708-i2s.c	2015-02-12 13:35:35.929213859 +0100
+@@ -171,6 +171,11 @@
+ /* I2S pin configuration */
+ static int bcm2708_i2s_gpio=BCM2708_I2S_GPIO_AUTO;
+ 
++static bool use_mmap = 1;
++module_param(use_mmap, bool, S_IRUGO);
++MODULE_PARM_DESC(use_mmap, "Use MMAP");
++
++
+ /* General device struct */
+ struct bcm2708_i2s_dev {
+ 	struct device				*dev;
+@@ -874,7 +879,7 @@
+ 	.name		= "bcm2708-i2s-comp",
+ };
+ 
+-static const struct snd_pcm_hardware bcm2708_pcm_hardware = {
++static struct snd_pcm_hardware bcm2708_pcm_hardware = {
+ 	.info			= SNDRV_PCM_INFO_INTERLEAVED |
+ 				  SNDRV_PCM_INFO_JOINT_DUPLEX,
+ 	.formats		= SNDRV_PCM_FMTBIT_S16_LE |
+@@ -966,6 +971,12 @@
+ 		return ret;
+ 	}
+ 
++	if (use_mmap) {
++		printk("Enable ALSA MMAP support for I2S\n");
++		bcm2708_pcm_hardware.info |= SNDRV_PCM_INFO_MMAP;
++		bcm2708_pcm_hardware.info |= SNDRV_PCM_INFO_MMAP_VALID;
++	}
++
+ 	ret = snd_dmaengine_pcm_register(&pdev->dev,
+ 				&bcm2708_dmaengine_pcm_config,
+ 				SND_DMAENGINE_PCM_FLAG_COMPAT);

+ 9 - 9
target/config/Config.in.endian.choice

@@ -5,19 +5,19 @@ choice ADK_TARGET_ENDIAN_MODE
 prompt "Endianess"
 depends on ADK_TARGET_ARCH_SH || ADK_TARGET_ARCH_MIPS || ADK_TARGET_ARCH_MICROBLAZE \
 	|| ADK_TARGET_ARCH_MIPS64 || ADK_TARGET_ARCH_ARC || ADK_TARGET_ARCH_ARM || ADK_TARGET_ARCH_C6X
-depends on !ADK_TARGET_SYSTEM_MIKROTIK_RB532
-depends on !ADK_TARGET_SYSTEM_DRAGINO_MS14S
-depends on !ADK_TARGET_SYSTEM_LEMOTE_YEELONG
-depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI
-depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI2
-depends on !ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
-depends on !ADK_TARGET_SYSTEM_QEMU_ARM
-depends on !ADK_TARGET_SYSTEM_LINKSYS_NSLU2
 
 config ADK_TARGET_LITTLE_ENDIAN
 	bool "Little endian"
+	depends on !ADK_TARGET_SYSTEM_DRAGINO_MS14S
+	depends on !ADK_TARGET_SYSTEM_LINKSYS_NSLU2
 
 config ADK_TARGET_BIG_ENDIAN
 	bool "Big endian"
-
+	depends on !ADK_TARGET_SYSTEM_MIKROTIK_RB532
+	depends on !ADK_TARGET_SYSTEM_LEMOTE_YEELONG
+	depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI
+	depends on !ADK_TARGET_SYSTEM_RASPBERRY_PI2
+	depends on !ADK_TARGET_SYSTEM_SOLIDRUN_IMX6
+	depends on !ADK_TARGET_SYSTEM_QEMU_ARM
+	
 endchoice

+ 6 - 1
target/linux/config/Config.in.dma

@@ -4,6 +4,7 @@ config ADK_KERNEL_DMADEVICES
 config ADK_KERNEL_DMA_BCM2708
         bool
         select ADK_KERNEL_DMADEVICES
+	select ADK_KERNEL_BCM_VC_CMA
 	depends on ADK_TARGET_BOARD_BCM28XX
 	default y if ADK_TARGET_BOARD_BCM28XX
 	default n
@@ -23,8 +24,12 @@ config ADK_KERNEL_CMA
 
 config ADK_KERNEL_CMA_SIZE_MBYTES
 	int
-	default 256
+	default 64
 
 config ADK_KERNEL_DMA_CMA
+	bool
 	select ADK_KERNEL_CMA
+
+config ADK_KERNEL_BCM_VC_CMA
 	bool
+	select ADK_KERNEL_DMA_CMA

Some files were not shown because too many files changed in this diff