aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus Cooper <codekipper@gmail.com>2019-06-03 19:47:28 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-10 09:53:35 +0200
commit74929087384fef3bf67dad97b990b1a877c304a2 (patch)
tree70d8386ea693205ef19835ea5ecc7b2954014dfb
parent32475634e8a8e3bd6385602dfffd6de79ab5c123 (diff)
downloadlinux-stable-74929087384fef3bf67dad97b990b1a877c304a2.tar.gz
ASoC: sun4i-i2s: Add offset to RX channel select
[ Upstream commit f9927000cb35f250051f0f1878db12ee2626eea1 ] Whilst testing the capture functionality of the i2s on the newer SoCs it was noticed that the recording was somewhat distorted. This was due to the offset not being set correctly on the receiver side. Signed-off-by: Marcus Cooper <codekipper@gmail.com> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Acked-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--sound/soc/sunxi/sun4i-i2s.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c
index 5750738b6ac0b..6173dd86c62ce 100644
--- a/sound/soc/sunxi/sun4i-i2s.c
+++ b/sound/soc/sunxi/sun4i-i2s.c
@@ -460,6 +460,10 @@ static int sun4i_i2s_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
regmap_update_bits(i2s->regmap, SUN8I_I2S_TX_CHAN_SEL_REG,
SUN8I_I2S_TX_CHAN_OFFSET_MASK,
SUN8I_I2S_TX_CHAN_OFFSET(offset));
+
+ regmap_update_bits(i2s->regmap, SUN8I_I2S_RX_CHAN_SEL_REG,
+ SUN8I_I2S_TX_CHAN_OFFSET_MASK,
+ SUN8I_I2S_TX_CHAN_OFFSET(offset));
}
regmap_field_write(i2s->field_fmt_mode, val);