summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/rt5640.h
diff options
context:
space:
mode:
authorBard Liao <bardliao@realtek.com>2014-04-17 10:24:06 +0800
committerMark Brown <broonie@linaro.org>2014-04-22 12:52:08 +0100
commit8bfc6d2d1b6266e8da2a7cf89e8d05e2ea8b09e5 (patch)
tree5b75b1a2fe6bfa37a32b7d3d0405b34c0a32e2f8 /sound/soc/codecs/rt5640.h
parent908b7032a8b5cb7110beac213f7d3058097fa5aa (diff)
ASoC: rt5640: Add minimal support for RT5642
We have been using rt5640.c codec driver with RT5642 codec chip before commit 022d21f004c1 ("ASoC: rt5640: add rt5639 support"). That commits starts using device ID reading in reset register for adding device specific controls and routes runtime. Now since device ID appears to be different between RT5640 and RT5642 the driver doesn't add those controls and routes that are valid also on RT5642. Fix this by adding a device ID found by debugging and minimal code for supporting RT5642. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/rt5640.h')
-rw-r--r--sound/soc/codecs/rt5640.h10
1 files changed, 7 insertions, 3 deletions
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 @@
#include <sound/rt5640.h>
-#define RT5639_RESET_ID 0x0008
-#define RT5640_RESET_ID 0x000c
-
/* Info */
#define RT5640_RESET 0x00
#define RT5640_VENDOR_ID 0xfd
@@ -195,6 +192,13 @@
#define RT5640_R_VOL_MASK (0x3f)
#define RT5640_R_VOL_SFT 0
+/* SW Reset & Device ID (0x00) */
+#define RT5640_ID_MASK (0x3 << 1)
+#define RT5640_ID_5639 (0x0 << 1)
+#define RT5640_ID_5640 (0x1 << 1)
+#define RT5640_ID_5642 (0x3 << 1)
+
+
/* IN1 and IN2 Control (0x0d) */
/* IN3 and IN4 Control (0x0e) */
#define RT5640_BST_SFT1 12