diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-01-17 10:42:23 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-01-17 10:42:23 +0000 |
commit | 011aaeec01e870c9b1248194cd4522d51174d1de (patch) | |
tree | 34fef86a102449ec859be9420a62cd06e1c2e5ca /target/linux/brcm2708/patches-4.4/0015-bcm2835-i2s-add-24bit-support-update-bclk_ratio-to-m.patch | |
parent | 6821fa9bf6e8aaddfa53b8b0a7e62e53515ea7a5 (diff) | |
download | master-187ad058-011aaeec01e870c9b1248194cd4522d51174d1de.tar.gz master-187ad058-011aaeec01e870c9b1248194cd4522d51174d1de.tar.bz2 master-187ad058-011aaeec01e870c9b1248194cd4522d51174d1de.zip |
brcm2708: add linux 4.4 support
- random-bcm2708 and spi-bcm2708 have been removed.
- sound-soc-bcm2708-i2s has been upstreamed as sound-soc-bcm2835-i2s.
Let's keep linux 4.1 for a while, since linux 4.4 appears to have some issues
with multicast traffic on RPi ethernet:
https://gist.github.com/Noltari/5b1cfdecce5ed4bc08fd
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48266 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0015-bcm2835-i2s-add-24bit-support-update-bclk_ratio-to-m.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.4/0015-bcm2835-i2s-add-24bit-support-update-bclk_ratio-to-m.patch | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0015-bcm2835-i2s-add-24bit-support-update-bclk_ratio-to-m.patch b/target/linux/brcm2708/patches-4.4/0015-bcm2835-i2s-add-24bit-support-update-bclk_ratio-to-m.patch new file mode 100644 index 0000000000..b6273271e1 --- /dev/null +++ b/target/linux/brcm2708/patches-4.4/0015-bcm2835-i2s-add-24bit-support-update-bclk_ratio-to-m.patch @@ -0,0 +1,79 @@ +From 328b2e8b8a38fe62431c2ad5ae22cee31740b10d Mon Sep 17 00:00:00 2001 +From: Matthias Reichl <hias@horus.com> +Date: Sun, 11 Oct 2015 15:21:16 +0200 +Subject: [PATCH 015/127] bcm2835-i2s: add 24bit support, update bclk_ratio to + more correct values + +Code ported from bcm2708-i2s driver in Raspberry Pi tree. + +RPi commit 62c05a0b5328d9376d39c9e74da10b8a2465c234 ("ASoC: BCM2708: +Add 24 bit support") + +This adds 24 bit support to the I2S driver of the BCM2708. +Besides enabling the 24 bit flags, it includes two bug fixes: + +MMAP is not supported. Claiming this leads to strange issues +when the format of driver and file do not match. + +The datasheet states that the width extension bit should be set +for widths greater than 24, but greater or equal would be correct. +This follows from the definition of the width field. + +Signed-off-by: Florian Meier <florian.meier@koalo.de> + +RPi commit 3e8c672bc4e92d457aa4654bbb4cfd79a18a2327 ("bcm2708-i2s: +Update bclk_ratio to more correct values") + +Discussion about blck_ratio affecting sound quality: +https://github.com/raspberrypi/linux/issues/681 + +Signed-off-by: Matthias Reichl <hias@horus.com> +--- + sound/soc/bcm/bcm2835-i2s.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +--- a/sound/soc/bcm/bcm2835-i2s.c ++++ b/sound/soc/bcm/bcm2835-i2s.c +@@ -340,11 +340,15 @@ static int bcm2835_i2s_hw_params(struct + switch (params_format(params)) { + case SNDRV_PCM_FORMAT_S16_LE: + data_length = 16; +- bclk_ratio = 40; ++ bclk_ratio = 50; ++ break; ++ case SNDRV_PCM_FORMAT_S24_LE: ++ data_length = 24; ++ bclk_ratio = 50; + break; + case SNDRV_PCM_FORMAT_S32_LE: + data_length = 32; +- bclk_ratio = 80; ++ bclk_ratio = 100; + break; + default: + return -EINVAL; +@@ -420,7 +424,7 @@ static int bcm2835_i2s_hw_params(struct + /* Setup the frame format */ + format = BCM2835_I2S_CHEN; + +- if (data_length > 24) ++ if (data_length >= 24) + format |= BCM2835_I2S_CHWEX; + + format |= BCM2835_I2S_CHWID((data_length-8)&0xf); +@@ -711,6 +715,7 @@ static struct snd_soc_dai_driver bcm2835 + .channels_max = 2, + .rates = SNDRV_PCM_RATE_8000_192000, + .formats = SNDRV_PCM_FMTBIT_S16_LE ++ | SNDRV_PCM_FMTBIT_S24_LE + | SNDRV_PCM_FMTBIT_S32_LE + }, + .capture = { +@@ -718,6 +723,7 @@ static struct snd_soc_dai_driver bcm2835 + .channels_max = 2, + .rates = SNDRV_PCM_RATE_8000_192000, + .formats = SNDRV_PCM_FMTBIT_S16_LE ++ | SNDRV_PCM_FMTBIT_S24_LE + | SNDRV_PCM_FMTBIT_S32_LE + }, + .ops = &bcm2835_i2s_dai_ops, |