phonepad: solve some issue when codec select rt3224, and change version to V1.2.0.
author宋秀杰 <sxj@rock-chips.com>
Tue, 18 Sep 2012 14:24:48 +0000 (22:24 +0800)
committer宋秀杰 <sxj@rock-chips.com>
Tue, 18 Sep 2012 14:24:48 +0000 (22:24 +0800)
arch/arm/mach-rk30/board-rk30-phonepad.c
drivers/headset_observe/rk_headset_irq_hook_adc.c [changed mode: 0755->0644]
sound/soc/codecs/rt3261.c

index 8eb0b714a96c092c3cde8725ad45c901cc8a383b..f3258290afc90bbe0ec536cab258873bc34ff258 100755 (executable)
@@ -678,6 +678,7 @@ static int rk_headset_io_init(int gpio, char *iomux_name, int iomux_mode)
                rk30_mux_api_set(iomux_name, iomux_mode);
                gpio_pull_updown(gpio, PullDisable);
                gpio_direction_input(gpio);
+               mdelay(50);
                return 0;
 };
 
@@ -1001,7 +1002,7 @@ static struct platform_device rk29_device_backlight = {
 
 #endif
 
-#ifdef CONFIG_SND_SOC_RT3261
+#if defined (CONFIG_SND_SOC_RT3224) || defined (CONFIG_SND_SOC_RT3261)
 
 static int rt3261_io_init(int gpio, char *iomux_name, int iomux_mode)
 {
@@ -1014,7 +1015,7 @@ static int rt3261_io_init(int gpio, char *iomux_name, int iomux_mode)
 static struct rt3261_platform_data rt3261_info = {
        .codec_en_gpio                  = RK30_PIN4_PD7,
        .codec_en_gpio_info             = {GPIO4D7_SMCDATA15_TRACEDATA15_NAME,GPIO4D_GPIO4D7},
-       .io_init                                = rt3261_io_init,
+       .io_init                        = rt3261_io_init,
 };
 
 #endif
old mode 100755 (executable)
new mode 100644 (file)
index e954e26..e254b80
@@ -78,7 +78,7 @@
 extern int wm8994_headset_mic_detect(bool headset_status);
 #endif
 
-#ifdef CONFIG_SND_SOC_RT3261
+#if defined (CONFIG_SND_SOC_RT3261) || defined (CONFIG_SND_SOC_RT3224)
 extern int rt3261_headset_mic_detect(int jack_insert);
 #endif
 
@@ -200,7 +200,7 @@ static irqreturn_t headset_interrupt(int irq, void *dev_id)
                        #ifdef CONFIG_SND_SOC_WM8994
                        wm8994_headset_mic_detect(true);
                        #endif
-                       #ifdef CONFIG_SND_SOC_RT3261
+                       #if defined (CONFIG_SND_SOC_RT3261) || defined (CONFIG_SND_SOC_RT3224)
                        rt3261_headset_mic_detect(true);
                        #endif
                        //mdelay(400);
@@ -211,7 +211,7 @@ static irqreturn_t headset_interrupt(int irq, void *dev_id)
                                #ifdef CONFIG_SND_SOC_WM8994
                                wm8994_headset_mic_detect(false);
                                #endif
-                               #ifdef CONFIG_SND_SOC_RT3261
+                               #if defined (CONFIG_SND_SOC_RT3261) || defined (CONFIG_SND_SOC_RT3224)
                                rt3261_headset_mic_detect(false);
                                #endif
                                printk("headset->isMic = %d\n",headset_info->isMic);            
@@ -264,7 +264,7 @@ static irqreturn_t headset_interrupt(int irq, void *dev_id)
                        //rt5625_headset_mic_detect(false);
                        wm8994_headset_mic_detect(false);
                        #endif
-                       #ifdef CONFIG_SND_SOC_RT3261
+                       #if defined (CONFIG_SND_SOC_RT3261) || defined (CONFIG_SND_SOC_RT3224)
                        rt3261_headset_mic_detect(false);
                        #endif
                }       
index 8fcb4a1d6e69261b631370f859f99f2465156190..daf28f70dc298418e5b68cdfabfd18011eec4bb4 100644 (file)
@@ -59,7 +59,7 @@ static struct snd_soc_codec *rt3261_codec;
 #define RT3261_REG_RW 1 /* for debug */
 #define RT3261_DET_EXT_MIC 0
 
-#define VERSION "RT3261_V1.1.0"
+#define VERSION "RT3261_V1.2.0"
 
 #if defined (CONFIG_SND_SOC_RT5623)
 extern void rt5623_on(void);
@@ -3244,7 +3244,9 @@ static ssize_t rt3261_proc_write(struct file *file, const char __user *buffer,
        int reg;
        int i;
        int value;
+       #if defined (CONFIG_SND_SOC_RT3261)
        struct rt3261_dsp_param param;
+       #endif
 
        cookie_pot = (char *)vmalloc( len );
        if (!cookie_pot)