ASoC: adau17x1: Workaround for noise bug in ADC
authorRicard Wanderlof <ricard.wanderlof@axis.com>
Thu, 7 Sep 2017 13:31:38 +0000 (15:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Nov 2017 09:03:48 +0000 (10:03 +0100)
commit211b1914f59a95bcecefec72b952748b8166cadd
tree8bcfbbbd0cc1af7a1579d476c3c7a064114c60b9
parentef2518bac6306b00cae25b6f9232d73ebe3804e9
ASoC: adau17x1: Workaround for noise bug in ADC

commit 1e6f4fc06f6411adf98bbbe7fcd79442cd2b2a75 upstream.

The ADC in the ADAU1361 (and possibly other Analog Devices codecs)
exhibits a cyclic variation in the noise floor (in our test setup between
-87 and -93 dB), a new value being attained within this range whenever a
new capture stream is started. The cycle repeats after about 10 or 11
restarts.

The workaround recommended by the manufacturer is to toggle the ADOSR bit
in the Converter Control 0 register each time a new capture stream is
started.

I have verified that the patch fixes this problem on the ADAU1361, and
according to the manufacturer toggling the bit in question in this manner
will at least have no detrimental effect on other chips served by this
driver.

Signed-off-by: Ricard Wanderlof <ricardw@axis.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/adau17x1.c
sound/soc/codecs/adau17x1.h