Unverified Commit f9927000 authored by Marcus Cooper's avatar Marcus Cooper Committed by Mark Brown
Browse files

ASoC: sun4i-i2s: Add offset to RX channel select



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: default avatarMarcus Cooper <codekipper@gmail.com>
Acked-by: default avatarMaxime Ripard <maxime.ripard@bootlin.com>
Acked-by: default avatarChen-Yu Tsai <wens@csie.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7e46169a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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);