Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 04c57163 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown
Browse files

ASoC: wm8711: Fix wrong mask for setting input audio data bit length select



The Input Audio Data Bit Length Select is controlled by BIT[3:2] of
WM8711_IFACE(07h) register.
Current code incorrectly masks BIT[1:0] which is for Audio Data Format Select.

Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Cc: stable@kernel.org
parent 68e47981
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -151,7 +151,7 @@ static int wm8711_hw_params(struct snd_pcm_substream *substream,
{
{
	struct snd_soc_codec *codec = dai->codec;
	struct snd_soc_codec *codec = dai->codec;
	struct wm8711_priv *wm8711 =  snd_soc_codec_get_drvdata(codec);
	struct wm8711_priv *wm8711 =  snd_soc_codec_get_drvdata(codec);
	u16 iface = snd_soc_read(codec, WM8711_IFACE) & 0xfffc;
	u16 iface = snd_soc_read(codec, WM8711_IFACE) & 0xfff3;
	int i = get_coeff(wm8711->sysclk, params_rate(params));
	int i = get_coeff(wm8711->sysclk, params_rate(params));
	u16 srate = (coeff_div[i].sr << 2) |
	u16 srate = (coeff_div[i].sr << 2) |
		(coeff_div[i].bosr << 1) | coeff_div[i].usb;
		(coeff_div[i].bosr << 1) | coeff_div[i].usb;