diff options
author | Barry Song <21cnbao@gmail.com> | 2010-03-19 02:48:33 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-03-19 08:12:16 -0400 |
commit | a1533d94c6b930ef4263941adfd1e1132ca95627 (patch) | |
tree | 7d2d2635342d413a2411d7d19986d22125d6e41f /sound/soc/codecs/ad193x.h | |
parent | 8ecbabd977dc64d2d8c9980420a3d72db06fe551 (diff) |
ASoC: rename ad1938 to ad193x and add support for ad1936/7/8/9
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Yi Li <yi.li@analog.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/ad193x.h')
-rw-r--r-- | sound/soc/codecs/ad193x.h | 83 |
1 files changed, 83 insertions, 0 deletions
diff --git a/sound/soc/codecs/ad193x.h b/sound/soc/codecs/ad193x.h new file mode 100644 index 000000000000..b240d1d67c22 --- /dev/null +++ b/sound/soc/codecs/ad193x.h | |||
@@ -0,0 +1,83 @@ | |||
1 | /* | ||
2 | * AD193X Audio Codec driver | ||
3 | * | ||
4 | * Copyright 2010 Analog Devices Inc. | ||
5 | * | ||
6 | * Licensed under the GPL-2 or later. | ||
7 | */ | ||
8 | |||
9 | #ifndef __AD193X_H__ | ||
10 | #define __AD193X_H__ | ||
11 | |||
12 | #define AD193X_PLL_CLK_CTRL0 0x800 | ||
13 | #define AD193X_PLL_POWERDOWN 0x01 | ||
14 | #define AD193X_PLL_CLK_CTRL1 0x801 | ||
15 | #define AD193X_DAC_CTRL0 0x802 | ||
16 | #define AD193X_DAC_POWERDOWN 0x01 | ||
17 | #define AD193X_DAC_SERFMT_MASK 0xC0 | ||
18 | #define AD193X_DAC_SERFMT_STEREO (0 << 6) | ||
19 | #define AD193X_DAC_SERFMT_TDM (1 << 6) | ||
20 | #define AD193X_DAC_CTRL1 0x803 | ||
21 | #define AD193X_DAC_2_CHANNELS 0 | ||
22 | #define AD193X_DAC_4_CHANNELS 1 | ||
23 | #define AD193X_DAC_8_CHANNELS 2 | ||
24 | #define AD193X_DAC_16_CHANNELS 3 | ||
25 | #define AD193X_DAC_CHAN_SHFT 1 | ||
26 | #define AD193X_DAC_CHAN_MASK (3 << AD193X_DAC_CHAN_SHFT) | ||
27 | #define AD193X_DAC_LCR_MASTER (1 << 4) | ||
28 | #define AD193X_DAC_BCLK_MASTER (1 << 5) | ||
29 | #define AD193X_DAC_LEFT_HIGH (1 << 3) | ||
30 | #define AD193X_DAC_BCLK_INV (1 << 7) | ||
31 | #define AD193X_DAC_CTRL2 0x804 | ||
32 | #define AD193X_DAC_WORD_LEN_MASK 0xC | ||
33 | #define AD193X_DAC_MASTER_MUTE 1 | ||
34 | #define AD193X_DAC_CHNL_MUTE 0x805 | ||
35 | #define AD193X_DACL1_MUTE 0 | ||
36 | #define AD193X_DACR1_MUTE 1 | ||
37 | #define AD193X_DACL2_MUTE 2 | ||
38 | #define AD193X_DACR2_MUTE 3 | ||
39 | #define AD193X_DACL3_MUTE 4 | ||
40 | #define AD193X_DACR3_MUTE 5 | ||
41 | #define AD193X_DACL4_MUTE 6 | ||
42 | #define AD193X_DACR4_MUTE 7 | ||
43 | #define AD193X_DAC_L1_VOL 0x806 | ||
44 | #define AD193X_DAC_R1_VOL 0x807 | ||
45 | #define AD193X_DAC_L2_VOL 0x808 | ||
46 | #define AD193X_DAC_R2_VOL 0x809 | ||
47 | #define AD193X_DAC_L3_VOL 0x80a | ||
48 | #define AD193X_DAC_R3_VOL 0x80b | ||
49 | #define AD193X_DAC_L4_VOL 0x80c | ||
50 | #define AD193X_DAC_R4_VOL 0x80d | ||
51 | #define AD193X_ADC_CTRL0 0x80e | ||
52 | #define AD193X_ADC_POWERDOWN 0x01 | ||
53 | #define AD193X_ADC_HIGHPASS_FILTER 1 | ||
54 | #define AD193X_ADCL1_MUTE 2 | ||
55 | #define AD193X_ADCR1_MUTE 3 | ||
56 | #define AD193X_ADCL2_MUTE 4 | ||
57 | #define AD193X_ADCR2_MUTE 5 | ||
58 | #define AD193X_ADC_CTRL1 0x80f | ||
59 | #define AD193X_ADC_SERFMT_MASK 0x60 | ||
60 | #define AD193X_ADC_SERFMT_STEREO (0 << 5) | ||
61 | #define AD193X_ADC_SERFMT_TDM (1 << 2) | ||
62 | #define AD193X_ADC_SERFMT_AUX (2 << 5) | ||
63 | #define AD193X_ADC_WORD_LEN_MASK 0x3 | ||
64 | #define AD193X_ADC_CTRL2 0x810 | ||
65 | #define AD193X_ADC_2_CHANNELS 0 | ||
66 | #define AD193X_ADC_4_CHANNELS 1 | ||
67 | #define AD193X_ADC_8_CHANNELS 2 | ||
68 | #define AD193X_ADC_16_CHANNELS 3 | ||
69 | #define AD193X_ADC_CHAN_SHFT 4 | ||
70 | #define AD193X_ADC_CHAN_MASK (3 << AD193X_ADC_CHAN_SHFT) | ||
71 | #define AD193X_ADC_LCR_MASTER (1 << 3) | ||
72 | #define AD193X_ADC_BCLK_MASTER (1 << 6) | ||
73 | #define AD193X_ADC_LEFT_HIGH (1 << 2) | ||
74 | #define AD193X_ADC_BCLK_INV (1 << 1) | ||
75 | |||
76 | #define AD193X_NUM_REGS 17 | ||
77 | |||
78 | extern struct snd_soc_dai ad193x_dai; | ||
79 | extern struct snd_soc_codec_device soc_codec_dev_ad193x; | ||
80 | extern int ad193x_bus_probe(struct device *dev, void *ctrl_data, int bus_type); | ||
81 | extern int ad193x_bus_remove(struct device *dev); | ||
82 | |||
83 | #endif | ||