From acf04e639bba2270fd07e161fa984234591ef43b Mon Sep 17 00:00:00 2001 From: Oder Chiou Date: Fri, 28 Mar 2014 20:28:27 +0800 Subject: ASoC: rt5640: Remove the unused or incorrect setting of clock source The patch removes the unused or incorrect setting of clock source. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown --- sound/soc/codecs/rt5640.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'sound/soc/codecs/rt5640.h') diff --git a/sound/soc/codecs/rt5640.h b/sound/soc/codecs/rt5640.h index 5e8df25a13f3..cbd07b5f8060 100644 --- a/sound/soc/codecs/rt5640.h +++ b/sound/soc/codecs/rt5640.h @@ -976,8 +976,6 @@ #define RT5640_SCLK_SRC_SFT 14 #define RT5640_SCLK_SRC_MCLK (0x0 << 14) #define RT5640_SCLK_SRC_PLL1 (0x1 << 14) -#define RT5640_SCLK_SRC_PLL1T (0x2 << 14) -#define RT5640_SCLK_SRC_RCCLK (0x3 << 14) /* 15MHz */ #define RT5640_PLL1_SRC_MASK (0x3 << 12) #define RT5640_PLL1_SRC_SFT 12 #define RT5640_PLL1_SRC_MCLK (0x0 << 12) -- cgit v1.2.3 From bc49e462cd6ded128cc6dbb6775de4a4c3d6bbc8 Mon Sep 17 00:00:00 2001 From: Oder Chiou Date: Fri, 28 Mar 2014 20:28:28 +0800 Subject: ASoC: rt5640: Remove the unused field in private data The patch removes the unused field in private data. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown --- sound/soc/codecs/rt5640.h | 1 - 1 file changed, 1 deletion(-) (limited to 'sound/soc/codecs/rt5640.h') diff --git a/sound/soc/codecs/rt5640.h b/sound/soc/codecs/rt5640.h index cbd07b5f8060..d7bd525caf85 100644 --- a/sound/soc/codecs/rt5640.h +++ b/sound/soc/codecs/rt5640.h @@ -2095,7 +2095,6 @@ struct rt5640_priv { int pll_in; int pll_out; - int dmic_en; bool hp_mute; }; -- cgit v1.2.3 From 022d21f004c14db2151d08143a544b292324d099 Mon Sep 17 00:00:00 2001 From: Oder Chiou Date: Tue, 8 Apr 2014 19:40:00 +0800 Subject: ASoC: rt5640: add rt5639 support This patch adds the rt5639 support Signed-off-by: Oder Chiou Signed-off-by: Mark Brown --- sound/soc/codecs/rt5640.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sound/soc/codecs/rt5640.h') diff --git a/sound/soc/codecs/rt5640.h b/sound/soc/codecs/rt5640.h index d7bd525caf85..3b50459a83b4 100644 --- a/sound/soc/codecs/rt5640.h +++ b/sound/soc/codecs/rt5640.h @@ -14,6 +14,9 @@ #include +#define RT5639_RESET_ID 0x0008 +#define RT5640_RESET_ID 0x000c + /* Info */ #define RT5640_RESET 0x00 #define RT5640_VENDOR_ID 0xfd -- cgit v1.2.3 From 8bfc6d2d1b6266e8da2a7cf89e8d05e2ea8b09e5 Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Thu, 17 Apr 2014 10:24:06 +0800 Subject: 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 Signed-off-by: Bard Liao Signed-off-by: Mark Brown --- sound/soc/codecs/rt5640.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sound/soc/codecs/rt5640.h') 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 -#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 -- cgit v1.2.3 From 4eefa0d850a834cf641892e10583f8081d3f8c60 Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Wed, 30 Apr 2014 14:08:45 +0800 Subject: ASoC: rt5640: correct 5640's device ID This patch correct rt5640's device ID Signed-off-by: Bard Liao Tested-by: Stephen Warren Signed-off-by: Mark Brown --- sound/soc/codecs/rt5640.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sound/soc/codecs/rt5640.h') diff --git a/sound/soc/codecs/rt5640.h b/sound/soc/codecs/rt5640.h index ded20595e9ae..895ca149db2e 100644 --- a/sound/soc/codecs/rt5640.h +++ b/sound/soc/codecs/rt5640.h @@ -195,7 +195,7 @@ /* 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_5640 (0x2 << 1) #define RT5640_ID_5642 (0x3 << 1) -- cgit v1.2.3 From 71c7a2d675c8fe9b6ab284dcf586f30a7109c96c Mon Sep 17 00:00:00 2001 From: Oder Chiou Date: Tue, 20 May 2014 15:01:54 +0800 Subject: ASoC: rt5640: Add the function of the PLL clock calculation to RL6231 shared support The patch adds the function of the PLL clock calculation to RL6231 shared support. Signed-off-by: Oder Chiou Signed-off-by: Mark Brown --- sound/soc/codecs/rt5640.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'sound/soc/codecs/rt5640.h') diff --git a/sound/soc/codecs/rt5640.h b/sound/soc/codecs/rt5640.h index 895ca149db2e..58ebe96b86da 100644 --- a/sound/soc/codecs/rt5640.h +++ b/sound/soc/codecs/rt5640.h @@ -2079,13 +2079,6 @@ enum { RT5640_DMIC2, }; -struct rt5640_pll_code { - bool m_bp; /* Indicates bypass m code or not. */ - int m_code; - int n_code; - int k_code; -}; - struct rt5640_priv { struct snd_soc_codec *codec; struct rt5640_platform_data pdata; @@ -2097,7 +2090,6 @@ struct rt5640_priv { int bclk[RT5640_AIFS]; int master[RT5640_AIFS]; - struct rt5640_pll_code pll_code; int pll_src; int pll_in; int pll_out; -- cgit v1.2.3