phonepad: solve some issue when codec select rt3224, and change version to V1.2.0.

This commit is contained in:
宋秀杰
2012-09-18 22:24:48 +08:00
parent 4e84efeb44
commit 025a3457e8
3 changed files with 10 additions and 7 deletions

View File

@@ -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

8
drivers/headset_observe/rk_headset_irq_hook_adc.c Executable file → Normal file
View File

@@ -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
}

View 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)