From: 邱建斌 Date: Mon, 18 Feb 2013 12:00:54 +0000 (+0800) Subject: rk610 codec : The headphone playback the probability of loss of a channel X-Git-Tag: firefly_0821_release~7607 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=16478d8a3902879f5f3bd2521f453abe681c4f24;p=firefly-linux-kernel-4.4.55.git rk610 codec : The headphone playback the probability of loss of a channel --- diff --git a/sound/soc/codecs/rk610_codec.c b/sound/soc/codecs/rk610_codec.c index a6b89a04fa58..b2139ced16ef 100755 --- a/sound/soc/codecs/rk610_codec.c +++ b/sound/soc/codecs/rk610_codec.c @@ -712,11 +712,15 @@ void rk610_codec_reg_set(void) rk610_codec_write(codec,ACCELCODEC_R00, ASC_HPF_ENABLE|ASC_DSM_MODE_ENABLE|ASC_SCRAMBLE_ENABLE|ASC_DITHER_ENABLE|ASC_BCLKDIV_4); //2volume,input,output digital_gain = Volume_Output; - rk610_codec_write(codec,ACCELCODEC_R05, (digital_gain >> 8) & 0xFF); - rk610_codec_write(codec,ACCELCODEC_R06, digital_gain & 0xFF); - rk610_codec_write(codec,ACCELCODEC_R07, (digital_gain >> 8) & 0xFF); - rk610_codec_write(codec,ACCELCODEC_R08, digital_gain & 0xFF); - + + if(rk610_codec_read(codec,ACCELCODEC_R05)!=0x0f) { + rk610_codec_write(codec,ACCELCODEC_R05, (digital_gain >> 8) & 0xFF); + rk610_codec_write(codec,ACCELCODEC_R06, digital_gain & 0xFF); + } + if(rk610_codec_read(codec,ACCELCODEC_R07)!=0x0f){ + rk610_codec_write(codec,ACCELCODEC_R07, (digital_gain >> 8) & 0xFF); + rk610_codec_write(codec,ACCELCODEC_R08, digital_gain & 0xFF); + } rk610_codec_write(codec,ACCELCODEC_R0B, ASC_DEC_ENABLE|ASC_INT_ENABLE); gR0BReg = ASC_DEC_ENABLE|ASC_INT_ENABLE; //ASC_DEC_DISABLE|ASC_INT_ENABLE;