ASoC: nau8825: disable sinc filter for high THD of ADC
authorJohn Hsu <KCHSU0@nuvoton.com>
Fri, 2 Dec 2016 01:48:58 +0000 (09:48 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 6 Dec 2016 14:35:13 +0000 (14:35 +0000)
This bit will enable 4th order SINC filter.
=1, filter will enable;  but it consumes higher power.
=0, the sinc filter is disable, and it should always keep 0 value to
get high THD.

Therefor, disable the filter when codec initiation for better
performance when recording.

Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/nau8825.c
sound/soc/codecs/nau8825.h

index 2b89569333a177d178464acbb596c01d1f5c1494..efe3a44658d5a5e6d3a82d5f23ed8f8afd190d5a 100644 (file)
@@ -1846,7 +1846,8 @@ static void nau8825_init_regs(struct nau8825 *nau8825)
         * (audible hiss). Set it to something better.
         */
        regmap_update_bits(regmap, NAU8825_REG_ADC_RATE,
-               NAU8825_ADC_SYNC_DOWN_MASK, NAU8825_ADC_SYNC_DOWN_64);
+               NAU8825_ADC_SYNC_DOWN_MASK | NAU8825_ADC_SINC4_EN,
+               NAU8825_ADC_SYNC_DOWN_64);
        regmap_update_bits(regmap, NAU8825_REG_DAC_CTRL1,
                NAU8825_DAC_OVERSAMPLE_MASK, NAU8825_DAC_OVERSAMPLE_64);
        /* Disable DACR/L power */
index 0672a25617b9a96380e042d5bffe2b0cd091fd9b..5d1704e732415dd04134f44ddab9971156c97de1 100644 (file)
 #define NAU8825_BIQ_PATH_DAC   (1 << NAU8825_BIQ_PATH_SFT)
 
 /* ADC_RATE (0x2b) */
+#define NAU8825_ADC_SINC4_SFT          4
+#define NAU8825_ADC_SINC4_EN           (1 << NAU8825_ADC_SINC4_SFT)
 #define NAU8825_ADC_SYNC_DOWN_SFT      0
 #define NAU8825_ADC_SYNC_DOWN_MASK     0x3
 #define NAU8825_ADC_SYNC_DOWN_32       0