aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ab8500-codec.h
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/codecs/ab8500-codec.h')
-rw-r--r--sound/soc/codecs/ab8500-codec.h42
1 files changed, 22 insertions, 20 deletions
diff --git a/sound/soc/codecs/ab8500-codec.h b/sound/soc/codecs/ab8500-codec.h
index 306d0bc8455f..e2e54425d25e 100644
--- a/sound/soc/codecs/ab8500-codec.h
+++ b/sound/soc/codecs/ab8500-codec.h
@@ -24,6 +24,13 @@
24#define AB8500_SUPPORTED_RATE (SNDRV_PCM_RATE_48000) 24#define AB8500_SUPPORTED_RATE (SNDRV_PCM_RATE_48000)
25#define AB8500_SUPPORTED_FMT (SNDRV_PCM_FMTBIT_S16_LE) 25#define AB8500_SUPPORTED_FMT (SNDRV_PCM_FMTBIT_S16_LE)
26 26
27/* AB8500 interface slot offset definitions */
28
29#define AB8500_AD_DATA0_OFFSET 0
30#define AB8500_DA_DATA0_OFFSET 8
31#define AB8500_AD_DATA1_OFFSET 16
32#define AB8500_DA_DATA1_OFFSET 24
33
27/* AB8500 audio bank (0x0d) register definitions */ 34/* AB8500 audio bank (0x0d) register definitions */
28 35
29#define AB8500_POWERUP 0x00 36#define AB8500_POWERUP 0x00
@@ -73,6 +80,7 @@
73#define AB8500_ADSLOTSEL14 0x2C 80#define AB8500_ADSLOTSEL14 0x2C
74#define AB8500_ADSLOTSEL15 0x2D 81#define AB8500_ADSLOTSEL15 0x2D
75#define AB8500_ADSLOTSEL16 0x2E 82#define AB8500_ADSLOTSEL16 0x2E
83#define AB8500_ADSLOTSEL(slot) (AB8500_ADSLOTSEL1 + (slot >> 1))
76#define AB8500_ADSLOTHIZCTRL1 0x2F 84#define AB8500_ADSLOTHIZCTRL1 0x2F
77#define AB8500_ADSLOTHIZCTRL2 0x30 85#define AB8500_ADSLOTHIZCTRL2 0x30
78#define AB8500_ADSLOTHIZCTRL3 0x31 86#define AB8500_ADSLOTHIZCTRL3 0x31
@@ -144,6 +152,7 @@
144#define AB8500_CACHEREGNUM (AB8500_LAST_REG + 1) 152#define AB8500_CACHEREGNUM (AB8500_LAST_REG + 1)
145 153
146#define AB8500_MASK_ALL 0xFF 154#define AB8500_MASK_ALL 0xFF
155#define AB8500_MASK_SLOT(slot) ((slot & 1) ? 0xF0 : 0x0F)
147#define AB8500_MASK_NONE 0x00 156#define AB8500_MASK_NONE 0x00
148 157
149/* AB8500_POWERUP */ 158/* AB8500_POWERUP */
@@ -347,28 +356,21 @@
347#define AB8500_DIGIFCONF4_IF1WL0 0 356#define AB8500_DIGIFCONF4_IF1WL0 0
348 357
349/* AB8500_ADSLOTSELX */ 358/* AB8500_ADSLOTSELX */
350#define AB8500_ADSLOTSELX_AD_OUT1_TO_SLOT_ODD 0x00 359#define AB8500_AD_OUT1 0x0
351#define AB8500_ADSLOTSELX_AD_OUT2_TO_SLOT_ODD 0x10 360#define AB8500_AD_OUT2 0x1
352#define AB8500_ADSLOTSELX_AD_OUT3_TO_SLOT_ODD 0x20 361#define AB8500_AD_OUT3 0x2
353#define AB8500_ADSLOTSELX_AD_OUT4_TO_SLOT_ODD 0x30 362#define AB8500_AD_OUT4 0x3
354#define AB8500_ADSLOTSELX_AD_OUT5_TO_SLOT_ODD 0x40 363#define AB8500_AD_OUT5 0x4
355#define AB8500_ADSLOTSELX_AD_OUT6_TO_SLOT_ODD 0x50 364#define AB8500_AD_OUT6 0x5
356#define AB8500_ADSLOTSELX_AD_OUT7_TO_SLOT_ODD 0x60 365#define AB8500_AD_OUT7 0x6
357#define AB8500_ADSLOTSELX_AD_OUT8_TO_SLOT_ODD 0x70 366#define AB8500_AD_OUT8 0x7
358#define AB8500_ADSLOTSELX_ZEROES_TO_SLOT_ODD 0x80 367#define AB8500_ZEROES 0x8
359#define AB8500_ADSLOTSELX_TRISTATE_TO_SLOT_ODD 0xF0 368#define AB8500_TRISTATE 0xF
360#define AB8500_ADSLOTSELX_AD_OUT1_TO_SLOT_EVEN 0x00
361#define AB8500_ADSLOTSELX_AD_OUT2_TO_SLOT_EVEN 0x01
362#define AB8500_ADSLOTSELX_AD_OUT3_TO_SLOT_EVEN 0x02
363#define AB8500_ADSLOTSELX_AD_OUT4_TO_SLOT_EVEN 0x03
364#define AB8500_ADSLOTSELX_AD_OUT5_TO_SLOT_EVEN 0x04
365#define AB8500_ADSLOTSELX_AD_OUT6_TO_SLOT_EVEN 0x05
366#define AB8500_ADSLOTSELX_AD_OUT7_TO_SLOT_EVEN 0x06
367#define AB8500_ADSLOTSELX_AD_OUT8_TO_SLOT_EVEN 0x07
368#define AB8500_ADSLOTSELX_ZEROES_TO_SLOT_EVEN 0x08
369#define AB8500_ADSLOTSELX_TRISTATE_TO_SLOT_EVEN 0x0F
370#define AB8500_ADSLOTSELX_EVEN_SHIFT 0 369#define AB8500_ADSLOTSELX_EVEN_SHIFT 0
371#define AB8500_ADSLOTSELX_ODD_SHIFT 4 370#define AB8500_ADSLOTSELX_ODD_SHIFT 4
371#define AB8500_ADSLOTSELX_AD_OUT_TO_SLOT(out, slot) \
372 ((out) << (((slot) & 1) ? \
373 AB8500_ADSLOTSELX_ODD_SHIFT : AB8500_ADSLOTSELX_EVEN_SHIFT))
372 374
373/* AB8500_ADSLOTHIZCTRL1 */ 375/* AB8500_ADSLOTHIZCTRL1 */
374/* AB8500_ADSLOTHIZCTRL2 */ 376/* AB8500_ADSLOTHIZCTRL2 */