From 025a3457e83759bc7b092c41be9c78d167bd5f2b Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=AE=8B=E7=A7=80=E6=9D=B0?= Date: Tue, 18 Sep 2012 22:24:48 +0800 Subject: [PATCH] phonepad: solve some issue when codec select rt3224, and change version to V1.2.0. --- arch/arm/mach-rk30/board-rk30-phonepad.c | 5 +++-- drivers/headset_observe/rk_headset_irq_hook_adc.c | 8 ++++---- sound/soc/codecs/rt3261.c | 4 +++- 3 files changed, 10 insertions(+), 7 deletions(-) mode change 100755 => 100644 drivers/headset_observe/rk_headset_irq_hook_adc.c diff --git a/arch/arm/mach-rk30/board-rk30-phonepad.c b/arch/arm/mach-rk30/board-rk30-phonepad.c index 8eb0b714a96c..f3258290afc9 100755 --- a/arch/arm/mach-rk30/board-rk30-phonepad.c +++ b/arch/arm/mach-rk30/board-rk30-phonepad.c @@ -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 diff --git a/drivers/headset_observe/rk_headset_irq_hook_adc.c b/drivers/headset_observe/rk_headset_irq_hook_adc.c old mode 100755 new mode 100644 index e954e264d56c..e254b8041706 --- a/drivers/headset_observe/rk_headset_irq_hook_adc.c +++ b/drivers/headset_observe/rk_headset_irq_hook_adc.c @@ -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 } diff --git a/sound/soc/codecs/rt3261.c b/sound/soc/codecs/rt3261.c index 8fcb4a1d6e69..daf28f70dc29 100644 --- a/sound/soc/codecs/rt3261.c +++ b/sound/soc/codecs/rt3261.c @@ -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) -- 2.34.1