rk29phonesdk:wm8994防止无限读写问题
author邱建斌 <qjb@rock-chips.com>
Fri, 8 Apr 2011 04:04:05 +0000 (12:04 +0800)
committer邱建斌 <qjb@rock-chips.com>
Fri, 8 Apr 2011 04:04:05 +0000 (12:04 +0800)
arch/arm/configs/rk29_phonesdk_defconfig [changed mode: 0755->0644]
sound/soc/codecs/wm8994.c

old mode 100755 (executable)
new mode 100644 (file)
index eed4c46..9cb90c9
@@ -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
index 65e5e2090cf7eebe0a9389fec2c29c6e4b50e7c5..bf3d6729a968c69e6bd1d941a04f82263ce7e411 100755 (executable)
@@ -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();