aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/rt5645.h
diff options
context:
space:
mode:
authorBard Liao <bardliao@realtek.com>2015-01-21 07:50:15 -0500
committerMark Brown <broonie@kernel.org>2015-01-27 13:37:27 -0500
commit5c4ca99df718f6569849ab5fabdf18c14755b144 (patch)
tree2cd078f05947b22f0bc2d846274145813c7859a7 /sound/soc/codecs/rt5645.h
parent97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff)
ASoC: rt5645: Add rt5650 codec support
This patch adds support for rt5650 codec. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/rt5645.h')
-rw-r--r--sound/soc/codecs/rt5645.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/soc/codecs/rt5645.h b/sound/soc/codecs/rt5645.h
index a815e36a2bdb..74542310d3f0 100644
--- a/sound/soc/codecs/rt5645.h
+++ b/sound/soc/codecs/rt5645.h
@@ -47,6 +47,7 @@
47#define RT5645_STO_DAC_MIXER 0x2a 47#define RT5645_STO_DAC_MIXER 0x2a
48#define RT5645_MONO_DAC_MIXER 0x2b 48#define RT5645_MONO_DAC_MIXER 0x2b
49#define RT5645_DIG_MIXER 0x2c 49#define RT5645_DIG_MIXER 0x2c
50#define RT5650_A_DAC_SOUR 0x2d
50#define RT5645_DIG_INF1_DATA 0x2f 51#define RT5645_DIG_INF1_DATA 0x2f
51/* Mixer - PDM */ 52/* Mixer - PDM */
52#define RT5645_PDM_OUT_CTRL 0x31 53#define RT5645_PDM_OUT_CTRL 0x31
@@ -150,6 +151,8 @@
150#define RT5645_IL_CMD 0xdb 151#define RT5645_IL_CMD 0xdb
151#define RT5645_IL_CMD2 0xdc 152#define RT5645_IL_CMD2 0xdc
152#define RT5645_IL_CMD3 0xdd 153#define RT5645_IL_CMD3 0xdd
154#define RT5650_4BTN_IL_CMD1 0xdf
155#define RT5650_4BTN_IL_CMD2 0xe0
153#define RT5645_DRC1_HL_CTRL1 0xe7 156#define RT5645_DRC1_HL_CTRL1 0xe7
154#define RT5645_DRC2_HL_CTRL1 0xe9 157#define RT5645_DRC2_HL_CTRL1 0xe9
155#define RT5645_MUTI_DRC_CTRL1 0xea 158#define RT5645_MUTI_DRC_CTRL1 0xea
@@ -472,6 +475,12 @@
472#define RT5645_DAC_L2_DAC_R_VOL_MASK (0x1 << 4) 475#define RT5645_DAC_L2_DAC_R_VOL_MASK (0x1 << 4)
473#define RT5645_DAC_L2_DAC_R_VOL_SFT 4 476#define RT5645_DAC_L2_DAC_R_VOL_SFT 4
474 477
478/* Analog DAC1/2 Input Source Control (0x2d) */
479#define RT5650_A_DAC1_L_IN_SFT 3
480#define RT5650_A_DAC1_R_IN_SFT 2
481#define RT5650_A_DAC2_L_IN_SFT 1
482#define RT5650_A_DAC2_R_IN_SFT 0
483
475/* Digital Interface Data Control (0x2f) */ 484/* Digital Interface Data Control (0x2f) */
476#define RT5645_IF1_ADC2_IN_SEL (0x1 << 15) 485#define RT5645_IF1_ADC2_IN_SEL (0x1 << 15)
477#define RT5645_IF1_ADC2_IN_SFT 15 486#define RT5645_IF1_ADC2_IN_SFT 15
@@ -2175,6 +2184,11 @@ enum {
2175 RT5645_DMIC_DATA_GPIO11, 2184 RT5645_DMIC_DATA_GPIO11,
2176}; 2185};
2177 2186
2187enum {
2188 CODEC_TYPE_RT5645,
2189 CODEC_TYPE_RT5650,
2190};
2191
2178struct rt5645_priv { 2192struct rt5645_priv {
2179 struct snd_soc_codec *codec; 2193 struct snd_soc_codec *codec;
2180 struct rt5645_platform_data pdata; 2194 struct rt5645_platform_data pdata;
@@ -2184,6 +2198,7 @@ struct rt5645_priv {
2184 struct snd_soc_jack *mic_jack; 2198 struct snd_soc_jack *mic_jack;
2185 struct delayed_work jack_detect_work; 2199 struct delayed_work jack_detect_work;
2186 2200
2201 int codec_type;
2187 int sysclk; 2202 int sysclk;
2188 int sysclk_src; 2203 int sysclk_src;
2189 int lrck[RT5645_AIFS]; 2204 int lrck[RT5645_AIFS];