aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.4/0566-bcm2835-i2s-Changes-for-allowing-asymmetric-sample-f.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2017-02-07 22:30:59 +0100
committerÁlvaro Fernández Rojas <noltari@gmail.com>2017-02-07 23:00:21 +0100
commitd9d090e52082635a24aeaefdc6bfe61ab97f38bb (patch)
tree6e725a11b5c44ee1a7ce95a0b2bcba4cae1e6f5c /target/linux/brcm2708/patches-4.4/0566-bcm2835-i2s-Changes-for-allowing-asymmetric-sample-f.patch
parentada91d8a245690b3bc8d2a62b391d2725aea5c8e (diff)
downloadupstream-d9d090e52082635a24aeaefdc6bfe61ab97f38bb.tar.gz
upstream-d9d090e52082635a24aeaefdc6bfe61ab97f38bb.tar.bz2
upstream-d9d090e52082635a24aeaefdc6bfe61ab97f38bb.zip
brcm2708: remove linux 4.4 support
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.4/0566-bcm2835-i2s-Changes-for-allowing-asymmetric-sample-f.patch')
-rw-r--r--target/linux/brcm2708/patches-4.4/0566-bcm2835-i2s-Changes-for-allowing-asymmetric-sample-f.patch96
1 files changed, 0 insertions, 96 deletions
diff --git a/target/linux/brcm2708/patches-4.4/0566-bcm2835-i2s-Changes-for-allowing-asymmetric-sample-f.patch b/target/linux/brcm2708/patches-4.4/0566-bcm2835-i2s-Changes-for-allowing-asymmetric-sample-f.patch
deleted file mode 100644
index 88c001cf81..0000000000
--- a/target/linux/brcm2708/patches-4.4/0566-bcm2835-i2s-Changes-for-allowing-asymmetric-sample-f.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From b7c0618121a4cf0efdcecb4e36ad0be0430be0b3 Mon Sep 17 00:00:00 2001
-From: gtrainavicius <gtrainavicius@users.noreply.github.com>
-Date: Tue, 10 Jan 2017 21:59:39 +0200
-Subject: [PATCH] bcm2835-i2s: Changes for allowing asymmetric sample formats.
- (#1783)
-
-This is achieved by making changes only to the requested
-stream direction format, keeping the other stream direction
-configuration intact.
-
-Signed-off-by: Giedrius Trainavicius <giedrius@blokas.io>
----
- sound/soc/bcm/bcm2835-i2s.c | 54 +++++++++++++++++++++++++++++++--------------
- 1 file changed, 38 insertions(+), 16 deletions(-)
-
---- a/sound/soc/bcm/bcm2835-i2s.c
-+++ b/sound/soc/bcm/bcm2835-i2s.c
-@@ -310,6 +310,7 @@ static int bcm2835_i2s_hw_params(struct
- unsigned int sampling_rate = params_rate(params);
- unsigned int data_length, data_delay, bclk_ratio;
- unsigned int ch1pos, ch2pos, mode, format;
-+ unsigned int previous_ftxp, previous_frxp;
- unsigned int mash = BCM2835_CLK_MASH_1;
- unsigned int divi, divf, target_frequency;
- int clk_src = -1;
-@@ -320,6 +321,7 @@ static int bcm2835_i2s_hw_params(struct
- bool frame_master = (master == SND_SOC_DAIFMT_CBS_CFS
- || master == SND_SOC_DAIFMT_CBM_CFS);
- uint32_t csreg;
-+ bool packed;
-
- /*
- * If a stream is already enabled,
-@@ -465,26 +467,46 @@ static int bcm2835_i2s_hw_params(struct
- return -EINVAL;
- }
-
-- /*
-- * Set format for both streams.
-- * We cannot set another frame length
-- * (and therefore word length) anyway,
-- * so the format will be the same.
-- */
-- regmap_write(dev->i2s_regmap, BCM2835_I2S_RXC_A_REG, format);
-- regmap_write(dev->i2s_regmap, BCM2835_I2S_TXC_A_REG, format);
-+ /* Set the format for the matching stream direction. */
-+ switch (substream->stream) {
-+ case SNDRV_PCM_STREAM_PLAYBACK:
-+ regmap_write(dev->i2s_regmap, BCM2835_I2S_TXC_A_REG, format);
-+ break;
-+ case SNDRV_PCM_STREAM_CAPTURE:
-+ regmap_write(dev->i2s_regmap, BCM2835_I2S_RXC_A_REG, format);
-+ break;
-+ default:
-+ return -EINVAL;
-+ }
-
- /* Setup the I2S mode */
-+ /* Keep existing FTXP and FRXP values. */
-+ regmap_read(dev->i2s_regmap, BCM2835_I2S_MODE_A_REG, &mode);
-+
-+ previous_ftxp = mode & BCM2835_I2S_FTXP;
-+ previous_frxp = mode & BCM2835_I2S_FRXP;
-+
- mode = 0;
-
-- if (data_length <= 16) {
-- /*
-- * Use frame packed mode (2 channels per 32 bit word)
-- * We cannot set another frame length in the second stream
-- * (and therefore word length) anyway,
-- * so the format will be the same.
-- */
-- mode |= BCM2835_I2S_FTXP | BCM2835_I2S_FRXP;
-+ /*
-+ * Retain the frame packed mode (2 channels per 32 bit word)
-+ * of the other direction stream intact. The formats of each
-+ * direction can be different as long as the frame length is
-+ * shared for both.
-+ */
-+ packed = data_length <= 16;
-+
-+ switch (substream->stream) {
-+ case SNDRV_PCM_STREAM_PLAYBACK:
-+ mode |= previous_frxp;
-+ mode |= packed ? BCM2835_I2S_FTXP : 0;
-+ break;
-+ case SNDRV_PCM_STREAM_CAPTURE:
-+ mode |= previous_ftxp;
-+ mode |= packed ? BCM2835_I2S_FRXP : 0;
-+ break;
-+ default:
-+ return -EINVAL;
- }
-
- mode |= BCM2835_I2S_FLEN(bclk_ratio - 1);