ASoC: codecs: msm8916-wcd-analog: fix micbias level
authorJean-François Têtu <jean-francois.tetu@savoirfairelinux.com>
Fri, 29 Sep 2017 20:19:44 +0000 (16:19 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Dec 2017 13:26:28 +0000 (14:26 +0100)
commitf9e51fb046db69a2e83d7d7422e33f3402d1800b
tree735442209a99583e36a8634bab4d149d67f539bf
parent16e1626e54f835cb009de675d1f6b5a0ff9183d9
ASoC: codecs: msm8916-wcd-analog: fix micbias level

[ Upstream commit 664611e7e02f76fbc5470ef545b2657ed25c292b ]

The macro used to set the microphone bias level causes the
snd_soc_write() call to overwrite other fields in the CDC_A_MICB_1_VAL
register. The macro also does not return the proper level value
to use. This fixes this by preserving all bits from the register
that are not the level while setting the level.

Signed-off-by: Jean-François Têtu <jean-francois.tetu@savoirfairelinux.com>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/msm8916-wcd-analog.c