rk2929 acodec: for internal audio codec, mclk = 64*bclk = 256*lrclk.
authorZheng Yang <zhengyang@rock-chips.com>
Fri, 17 Aug 2012 06:33:23 +0000 (14:33 +0800)
committerZheng Yang <zhengyang@rock-chips.com>
Fri, 17 Aug 2012 06:33:23 +0000 (14:33 +0800)
sound/soc/rk29/rk2928-card.c

index 8d08942bd86d5cc68c87916bfe3e670152e294db..412460cb4cdf3f91f2bc2696dae7e1175ec48852 100755 (executable)
@@ -55,35 +55,10 @@ static int rk2928_dai_hw_params(struct snd_pcm_substream *substream,
     #endif             
     if (ret < 0)
         return ret;
-       
-    switch(params_rate(params)) {
-        case 8000:
-        case 16000:
-        case 24000:
-        case 32000:
-        case 48000:
-        case 96000:
-            pll_out = 12288000;
-            break;
-        case 11025:
-        case 22050:
-        case 44100:
-        case 88200:
-            pll_out = 11289600;
-            break;
-        case 176400:
-                       pll_out = 11289600*2;
-               break;
-        case 192000:
-               pll_out = 12288000*2;
-               break;
-        default:
-            DBG("Enter:%s, %d, Error rate=%d\n",__FUNCTION__,__LINE__,params_rate(params));
-            return -EINVAL;
-            break;
-       }
+        
        DBG("Enter:%s, %d, rate=%d\n",__FUNCTION__,__LINE__,params_rate(params));
-
+       pll_out = 256 * params_rate(params);
+       
        #if defined (CONFIG_SND_RK29_CODEC_SOC_MASTER)  
                snd_soc_dai_set_sysclk(cpu_dai, 0, pll_out, 0);
        #endif