summaryrefslogtreecommitdiff
path: root/target/arm/bcm28xx/patches/3.18.8/0002-enable-MMAP-by-default-allow-overide-via-use_mmap.patch
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbrodkorb@conet.de>2015-03-05 18:22:23 +0100
committerWaldemar Brodkorb <wbrodkorb@conet.de>2015-03-05 18:22:23 +0100
commit01cd87aa87d783c1a1ea00a6b1e56d3a07d45f96 (patch)
tree485efeb06fe8c728104df60187c1fd101640cfe2 /target/arm/bcm28xx/patches/3.18.8/0002-enable-MMAP-by-default-allow-overide-via-use_mmap.patch
parenta2c7fc5c3bf86996e9c30ce2a692dbf7a65d60de (diff)
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.
Diffstat (limited to 'target/arm/bcm28xx/patches/3.18.8/0002-enable-MMAP-by-default-allow-overide-via-use_mmap.patch')
-rw-r--r--target/arm/bcm28xx/patches/3.18.8/0002-enable-MMAP-by-default-allow-overide-via-use_mmap.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/target/arm/bcm28xx/patches/3.18.8/0002-enable-MMAP-by-default-allow-overide-via-use_mmap.patch b/target/arm/bcm28xx/patches/3.18.8/0002-enable-MMAP-by-default-allow-overide-via-use_mmap.patch
new file mode 100644
index 000000000..a476a7825
--- /dev/null
+++ b/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);