From 16478d8a3902879f5f3bd2521f453abe681c4f24 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=82=B1=E5=BB=BA=E6=96=8C?= Date: Mon, 18 Feb 2013 20:00:54 +0800 Subject: [PATCH] rk610 codec : The headphone playback the probability of loss of a channel --- sound/soc/codecs/rk610_codec.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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; -- 2.34.1