rk29_phone:1、Changes began to close the codec's strategy to control android 2、Modify...
author邱建斌 <qjb@rock-chips.com>
Mon, 4 Jul 2011 09:47:36 +0000 (17:47 +0800)
committer邱建斌 <qjb@rock-chips.com>
Mon, 4 Jul 2011 09:47:36 +0000 (17:47 +0800)
arch/arm/mach-rk29/board-rk29-a22.c
drivers/i2c/busses/i2c-rk29.c
sound/soc/codecs/wm8994.c

index 92f023d996ca6d4fbe41ab6840314d9ed2bc3ed2..e058a65e6ea40bfb447c59af320af3fe24e29c0b 100755 (executable)
@@ -1543,7 +1543,7 @@ struct wm8994_pdata wm8994_platdata = {
        
        .speaker_incall_vol = 0,
        .speaker_incall_mic_vol = -9,
-       .speaker_normal_vol = 6,
+       .speaker_normal_vol = -26,
        .earpiece_incall_vol = 0,
        .headset_incall_vol = 6,
        .headset_incall_mic_vol = -6,
index a2b5b30d3d51662041d0f0a595e1cd6ac9530cbb..e4b4b157b66491dd4059a067e3806a2138f81301 100755 (executable)
@@ -38,7 +38,7 @@
 /*max ACK delay time = RK29_I2C_ACK_TIMEOUT_COUNT * RK29_UDELAY_TIME(scl_rate)   us */
 #define RK29_I2C_ACK_TIMEOUT_COUNT                     (100 * 1000)
 /*max STOP delay time = RK29_I2C_STOP_TIMEOUT_COUNT * RK29_UDELAY_TIME(scl_rate)   us */
-#define RK29_I2C_STOP_TIMEOUT_COUNT                    1000
+#define RK29_I2C_STOP_TIMEOUT_COUNT                    70//1000
 /*max START delay time = RK29_I2C_START_TIMEOUT_COUNT * RK29_UDELAY_TIME(scl_rate)   us */
 #define RK29_I2C_START_TIMEOUT_COUNT           1000
 
index 36d12acb54260e284b202e185f29372c4b60ef66..ea2a290150847863662fe5dfbbdebdcafab1a89e 100755 (executable)
@@ -148,7 +148,6 @@ struct wm8994_priv {
        
        struct delayed_work wm8994_delayed_work;
        int work_type;
-       char First_Poweron;
 
        unsigned int playback_active:1;
        unsigned int capture_active:1;
@@ -2695,14 +2694,7 @@ int snd_soc_put_route(struct snd_kcontrol *kcontrol,
        char route = kcontrol->private_value & 0xff;
        mutex_lock(&wm8994->route_lock);
        wm8994->kcontrol = kcontrol;//save rount
-       
-       if(wm8994->First_Poweron == 1 && route == SPEAKER_NORMAL )
-       {//First start & Poweron  mast disable wm8994
-               PA_ctrl(GPIO_LOW);
-               wm8994_write(0,0);
-               msleep(50);
-               goto out;
-       }
+
        //before set the route -- disable PA
        switch(route)
        {
@@ -3044,18 +3036,6 @@ static void wm8994_work_fun(struct work_struct *work)
                mutex_unlock(&wm8994->route_lock);      
                break;
        case SNDRV_PCM_TRIGGER_START:
-               if(wm8994->First_Poweron == 1)
-               {
-                       DBG("wm8994 First_Poweron shutup\n");
-                       wm8994->First_Poweron = 0;
-                       if(wm8994->kcontrol->private_value != SPEAKER_NORMAL)
-                       {
-                       //      DBG("wm8994->kcontrol->private_value != SPEAKER_NORMAL\n");
-                               return;
-                       }
-                       wm8994_current_mode = null;
-                       snd_soc_put_route(wm8994->kcontrol,NULL);
-               }               
                break;
        case SNDRV_PCM_TRIGGER_RESUME:  
                msleep(100);
@@ -3543,7 +3523,6 @@ static int wm8994_i2c_probe(struct i2c_client *i2c,
        wm8994->RW_status = TRUE;//add
        wm8994->capture_active = 0;
        wm8994->playback_active = 0;
-       wm8994->First_Poweron = 1;
        wm8994->call_vol = call_maxvol;
        wm8994->BT_call_vol = BT_call_maxvol;
        INIT_DELAYED_WORK(&wm8994->wm8994_delayed_work, wm8994_work_fun);