From 23524eb16ace864c18a57ca035c76793a3c3eb65 Mon Sep 17 00:00:00 2001 From: Wolfram Sang Date: Thu, 6 Oct 2011 20:53:36 +0200 Subject: [PATCH] ASoC: tlv320aic32x4 fix initialization of micpga routing Checking the pdata-flags used 'or', so the check is always true. Use 'and' to correctly mask the flags. Signed-off-by: Wolfram Sang Cc: Javier Martin Cc: Liam Girdwood Cc: Mark Brown Signed-off-by: Mark Brown --- sound/soc/codecs/tlv320aic32x4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c index e93b9d1ae1dd..a68982e0a1ae 100644 --- a/sound/soc/codecs/tlv320aic32x4.c +++ b/sound/soc/codecs/tlv320aic32x4.c @@ -685,10 +685,10 @@ static int aic32x4_probe(struct snd_soc_codec *codec) } /* Mic PGA routing */ - if (aic32x4->micpga_routing | AIC32X4_MICPGA_ROUTE_LMIC_IN2R_10K) { + if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_LMIC_IN2R_10K) { snd_soc_write(codec, AIC32X4_LMICPGANIN, AIC32X4_LMICPGANIN_IN2R_10K); } - if (aic32x4->micpga_routing | AIC32X4_MICPGA_ROUTE_RMIC_IN1L_10K) { + if (aic32x4->micpga_routing & AIC32X4_MICPGA_ROUTE_RMIC_IN1L_10K) { snd_soc_write(codec, AIC32X4_RMICPGANIN, AIC32X4_RMICPGANIN_IN1L_10K); } -- 2.45.2