summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/nau8540.c
diff options
context:
space:
mode:
authorJohn Hsu <KCHSU0@nuvoton.com>2017-11-07 08:23:18 +0100
committerMark Brown <broonie@kernel.org>2017-11-07 11:28:48 +0100
commit14323ff8c21825e20810e893312f9321f9e4e72c (patch)
treee4376fb4a771e4f07717879d1dac5249797699d2 /sound/soc/codecs/nau8540.c
parentASoC: nau8540: reset state machine for channel phase sync (diff)
downloadlinux-14323ff8c21825e20810e893312f9321f9e4e72c.tar.xz
linux-14323ff8c21825e20810e893312f9321f9e4e72c.zip
ASoC: nau8540: PGA short to ground
Change channel PGA input mode selection for better recording quality. The patch shorts the inputs to ground with 12kOhm differentially terminated. Signed-off-by: John Hsu <KCHSU0@nuvoton.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/nau8540.c')
-rw-r--r--sound/soc/codecs/nau8540.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/codecs/nau8540.c b/sound/soc/codecs/nau8540.c
index c10cbffa6314..8246486a588d 100644
--- a/sound/soc/codecs/nau8540.c
+++ b/sound/soc/codecs/nau8540.c
@@ -730,6 +730,13 @@ static void nau8540_init_regs(struct nau8540 *nau8540)
regmap_update_bits(regmap, NAU8540_REG_ADC_SAMPLE_RATE,
NAU8540_CH_SYNC | NAU8540_ADC_OSR_MASK,
NAU8540_CH_SYNC | NAU8540_ADC_OSR_64);
+ /* PGA input mode selection */
+ regmap_update_bits(regmap, NAU8540_REG_FEPGA1,
+ NAU8540_FEPGA1_MODCH2_SHT | NAU8540_FEPGA1_MODCH1_SHT,
+ NAU8540_FEPGA1_MODCH2_SHT | NAU8540_FEPGA1_MODCH1_SHT);
+ regmap_update_bits(regmap, NAU8540_REG_FEPGA2,
+ NAU8540_FEPGA2_MODCH4_SHT | NAU8540_FEPGA2_MODCH3_SHT,
+ NAU8540_FEPGA2_MODCH4_SHT | NAU8540_FEPGA2_MODCH3_SHT);
}
static int __maybe_unused nau8540_suspend(struct snd_soc_codec *codec)