From: Zheng Yang Date: Fri, 17 Aug 2012 06:33:23 +0000 (+0800) Subject: rk2929 acodec: for internal audio codec, mclk = 64*bclk = 256*lrclk. X-Git-Tag: firefly_0821_release~8912^2~1^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c4915c3f0f1f4b5a84fa761b16cc7a9c9055f0a1;p=firefly-linux-kernel-4.4.55.git rk2929 acodec: for internal audio codec, mclk = 64*bclk = 256*lrclk. --- 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