From c4915c3f0f1f4b5a84fa761b16cc7a9c9055f0a1 Mon Sep 17 00:00:00 2001 From: Zheng Yang Date: Fri, 17 Aug 2012 14:33:23 +0800 Subject: [PATCH] rk2929 acodec: for internal audio codec, mclk = 64*bclk = 256*lrclk. --- sound/soc/rk29/rk2928-card.c | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/sound/soc/rk29/rk2928-card.c b/sound/soc/rk29/rk2928-card.c index 8d08942bd86d..412460cb4cdf 100755 --- a/sound/soc/rk29/rk2928-card.c +++ b/sound/soc/rk29/rk2928-card.c @@ -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 -- 2.34.1