diff options
-rw-r--r-- | sound/soc/codecs/rt5640.c | 8 | ||||
-rw-r--r-- | sound/soc/codecs/rt5640.h | 10 |
2 files changed, 12 insertions, 6 deletions
diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c index 6674372be12c..79635ee42a61 100644 --- a/sound/soc/codecs/rt5640.c +++ b/sound/soc/codecs/rt5640.c | |||
@@ -1997,8 +1997,9 @@ static int rt5640_probe(struct snd_soc_codec *codec) | |||
1997 | snd_soc_update_bits(codec, RT5640_MICBIAS, 0x0030, 0x0030); | 1997 | snd_soc_update_bits(codec, RT5640_MICBIAS, 0x0030, 0x0030); |
1998 | snd_soc_update_bits(codec, RT5640_DSP_PATH2, 0xfc00, 0x0c00); | 1998 | snd_soc_update_bits(codec, RT5640_DSP_PATH2, 0xfc00, 0x0c00); |
1999 | 1999 | ||
2000 | switch (snd_soc_read(codec, RT5640_RESET)) { | 2000 | switch (snd_soc_read(codec, RT5640_RESET) & RT5640_ID_MASK) { |
2001 | case RT5640_RESET_ID: | 2001 | case RT5640_ID_5640: |
2002 | case RT5640_ID_5642: | ||
2002 | snd_soc_add_codec_controls(codec, | 2003 | snd_soc_add_codec_controls(codec, |
2003 | rt5640_specific_snd_controls, | 2004 | rt5640_specific_snd_controls, |
2004 | ARRAY_SIZE(rt5640_specific_snd_controls)); | 2005 | ARRAY_SIZE(rt5640_specific_snd_controls)); |
@@ -2009,7 +2010,7 @@ static int rt5640_probe(struct snd_soc_codec *codec) | |||
2009 | rt5640_specific_dapm_routes, | 2010 | rt5640_specific_dapm_routes, |
2010 | ARRAY_SIZE(rt5640_specific_dapm_routes)); | 2011 | ARRAY_SIZE(rt5640_specific_dapm_routes)); |
2011 | break; | 2012 | break; |
2012 | case RT5639_RESET_ID: | 2013 | case RT5640_ID_5639: |
2013 | snd_soc_dapm_new_controls(&codec->dapm, | 2014 | snd_soc_dapm_new_controls(&codec->dapm, |
2014 | rt5639_specific_dapm_widgets, | 2015 | rt5639_specific_dapm_widgets, |
2015 | ARRAY_SIZE(rt5639_specific_dapm_widgets)); | 2016 | ARRAY_SIZE(rt5639_specific_dapm_widgets)); |
@@ -2149,6 +2150,7 @@ static const struct regmap_config rt5640_regmap = { | |||
2149 | static const struct i2c_device_id rt5640_i2c_id[] = { | 2150 | static const struct i2c_device_id rt5640_i2c_id[] = { |
2150 | { "rt5640", 0 }, | 2151 | { "rt5640", 0 }, |
2151 | { "rt5639", 0 }, | 2152 | { "rt5639", 0 }, |
2153 | { "rt5642", 0 }, | ||
2152 | { } | 2154 | { } |
2153 | }; | 2155 | }; |
2154 | MODULE_DEVICE_TABLE(i2c, rt5640_i2c_id); | 2156 | MODULE_DEVICE_TABLE(i2c, rt5640_i2c_id); |
diff --git a/sound/soc/codecs/rt5640.h b/sound/soc/codecs/rt5640.h index 3b50459a83b4..ded20595e9ae 100644 --- a/sound/soc/codecs/rt5640.h +++ b/sound/soc/codecs/rt5640.h | |||
@@ -14,9 +14,6 @@ | |||
14 | 14 | ||
15 | #include <sound/rt5640.h> | 15 | #include <sound/rt5640.h> |
16 | 16 | ||
17 | #define RT5639_RESET_ID 0x0008 | ||
18 | #define RT5640_RESET_ID 0x000c | ||
19 | |||
20 | /* Info */ | 17 | /* Info */ |
21 | #define RT5640_RESET 0x00 | 18 | #define RT5640_RESET 0x00 |
22 | #define RT5640_VENDOR_ID 0xfd | 19 | #define RT5640_VENDOR_ID 0xfd |
@@ -195,6 +192,13 @@ | |||
195 | #define RT5640_R_VOL_MASK (0x3f) | 192 | #define RT5640_R_VOL_MASK (0x3f) |
196 | #define RT5640_R_VOL_SFT 0 | 193 | #define RT5640_R_VOL_SFT 0 |
197 | 194 | ||
195 | /* SW Reset & Device ID (0x00) */ | ||
196 | #define RT5640_ID_MASK (0x3 << 1) | ||
197 | #define RT5640_ID_5639 (0x0 << 1) | ||
198 | #define RT5640_ID_5640 (0x1 << 1) | ||
199 | #define RT5640_ID_5642 (0x3 << 1) | ||
200 | |||
201 | |||
198 | /* IN1 and IN2 Control (0x0d) */ | 202 | /* IN1 and IN2 Control (0x0d) */ |
199 | /* IN3 and IN4 Control (0x0e) */ | 203 | /* IN3 and IN4 Control (0x0e) */ |
200 | #define RT5640_BST_SFT1 12 | 204 | #define RT5640_BST_SFT1 12 |