ASoC: sgtl5000: Fix definition of VAG Ramp Control
authorOleksandr Suvorov <oleksandr.suvorov@toradex.com>
Fri, 19 Jul 2019 10:05:33 +0000 (10:05 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 22 Jul 2019 12:26:25 +0000 (13:26 +0100)
SGTL5000_SMALL_POP is a bit mask, not a value. Usage of
correct definition makes device probing code more clear.

Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Reviewed-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Igor Opaniuk <igor.opaniuk@toradex.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20190719100524.23300-4-oleksandr.suvorov@toradex.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/sgtl5000.c
sound/soc/codecs/sgtl5000.h

index 34cc85e490033a042a93f9c2be2b8e544d48d5d7..3f28e7862b5b01628dfc712d9386be8a73a6a5a9 100644 (file)
@@ -1460,7 +1460,7 @@ static int sgtl5000_probe(struct snd_soc_component *component)
 
        /* enable small pop, introduce 400ms delay in turning off */
        snd_soc_component_update_bits(component, SGTL5000_CHIP_REF_CTRL,
-                               SGTL5000_SMALL_POP, 1);
+                               SGTL5000_SMALL_POP, SGTL5000_SMALL_POP);
 
        /* disable short cut detector */
        snd_soc_component_write(component, SGTL5000_CHIP_SHORT_CTRL, 0);
index 18cae08bbd3a6f455d7ed763fbc7d44411498675..a4bf4bca95bf7681bfb9f8b38dada3aa368d3c4e 100644 (file)
 #define SGTL5000_BIAS_CTRL_MASK                        0x000e
 #define SGTL5000_BIAS_CTRL_SHIFT               1
 #define SGTL5000_BIAS_CTRL_WIDTH               3
-#define SGTL5000_SMALL_POP                     1
+#define SGTL5000_SMALL_POP                     0x0001
 
 /*
  * SGTL5000_CHIP_MIC_CTRL