rk29phonesdk:wm8994防止无限读写问题

This commit is contained in:
邱建斌
2011-04-08 12:04:05 +08:00
parent e722c41edc
commit 5ea9ba14b5
2 changed files with 9 additions and 5 deletions

6
arch/arm/configs/rk29_phonesdk_defconfig Executable file → Normal file
View File

@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.32.27
# Fri Apr 1 20:19:39 2011
# Fri Apr 8 11:38:34 2011
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -965,7 +965,7 @@ CONFIG_ADC=y
# CONFIG_ADC_RK28 is not set
CONFIG_ADC_RK29=y
# CONFIG_SPI_FPGA is not set
# CONFIG_HEADSET_DET is not set
CONFIG_HEADSET_DET=y
#
# PPS support
@@ -1053,6 +1053,7 @@ CONFIG_MFD_CORE=y
CONFIG_MFD_WM831X=y
# CONFIG_MFD_WM831X_I2C is not set
CONFIG_MFD_WM831X_SPI=y
# CONFIG_MFD_WM831X_SPI_A22 is not set
# CONFIG_MFD_WM8350_I2C is not set
# CONFIG_MFD_PCF50633 is not set
# CONFIG_MFD_MC13783 is not set
@@ -2068,6 +2069,7 @@ CONFIG_CRC32=y
# CONFIG_CRC7 is not set
# CONFIG_LIBCRC32C is not set
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_DECOMPRESS_GZIP=y
CONFIG_REED_SOLOMON=y
CONFIG_REED_SOLOMON_ENC8=y

View File

@@ -2720,7 +2720,7 @@ void wm8994_check_channel(void)
{
wm8994_codec_fnc_t **wm8994_fnc_ptr = wm8994_codec_sequence;
unsigned char wm8994_mode = wm8994_current_mode;
unsigned int error_count = 0;
DBG("%s--%d::Enter\n",__FUNCTION__,__LINE__);
isWM8994SetChannel = true;
@@ -2746,7 +2746,9 @@ void wm8994_check_channel(void)
gpio_free(WM_EN_PIN);
msleep(50);
error_count ++;
if(error_count >= 10)
return;
wm8994_current_mode = null;
isSetChannelErr = false;
@@ -3934,7 +3936,7 @@ static ssize_t wm8994_proc_write(struct file *file, const char __user *buffer,
}
break;
case 's':
AP_to_speakers();
recorder_and_AP_to_speakers();
break;
case 'h':
recorder_and_AP_to_headset();