summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cs42l56.h
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-05-23 13:05:31 +0800
committerMark Brown <broonie@linaro.org>2014-06-01 11:49:25 +0100
commit4641c771b67e0d1df9395ed789c618dcfbc62709 (patch)
treead14c401cd02a2ac7138d051a3f7a499f9b2ff25 /sound/soc/codecs/cs42l56.h
parent3bb40619aca84905f87dd6bc7f6dce9efb525f28 (diff)
downloadlinux-4641c771b67e0d1df9395ed789c618dcfbc62709.tar.bz2
ASoC: cs42l56: Fix new value argument in snd_soc_update_bits calls
The new value argument needs proper shift to match the mask bit fields. Signed-off-by: Axel Lin <axel.lin@ingics.com> Tested-by: Brian Austin <brian.austin@cirrus.com> Acked-by: Brian Austin <brian.austin@cirrus.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/cs42l56.h')
-rw-r--r--sound/soc/codecs/cs42l56.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/soc/codecs/cs42l56.h b/sound/soc/codecs/cs42l56.h
index ad2b50a90b16..5025ec9be9b2 100644
--- a/sound/soc/codecs/cs42l56.h
+++ b/sound/soc/codecs/cs42l56.h
@@ -80,19 +80,21 @@
#define CS42L56_PDN_HPB_MASK 0xc0
/* serial port and clk masks */
-#define CS42L56_MASTER_MODE 1
+#define CS42L56_MASTER_MODE 0x40
#define CS42L56_SLAVE_MODE 0
#define CS42L56_MS_MODE_MASK 0x40
-#define CS42L56_SCLK_INV 1
+#define CS42L56_SCLK_INV 0x20
#define CS42L56_SCLK_INV_MASK 0x20
#define CS42L56_SCLK_MCLK_MASK 0x18
+#define CS42L56_MCLK_PREDIV 0x04
#define CS42L56_MCLK_PREDIV_MASK 0x04
+#define CS42L56_MCLK_DIV2 0x02
#define CS42L56_MCLK_DIV2_MASK 0x02
#define CS42L56_MCLK_DIS_MASK 0x01
#define CS42L56_CLK_AUTO_MASK 0x20
#define CS42L56_CLK_RATIO_MASK 0x1f
#define CS42L56_DIG_FMT_I2S 0
-#define CS42L56_DIG_FMT_LEFT_J 1
+#define CS42L56_DIG_FMT_LEFT_J 0x08
#define CS42L56_DIG_FMT_MASK 0x08
/* Class H and misc ctl masks */
@@ -116,7 +118,7 @@
#define CS42L56_DEEMPH_MASK 0x40
#define CS42L56_PLYBCK_GANG_MASK 0x10
#define CS42L56_PCM_INV_MASK 0x0c
-#define CS42L56_MUTE 1
+#define CS42L56_MUTE_ALL 0xff
#define CS42L56_UNMUTE 0
#define CS42L56_ADCAMIX_MUTE_MASK 0x40
#define CS42L56_ADCBMIX_MUTE_MASK 0x80