View Single Post
  #649 (permalink)  
Old 31st Mar 2011, 12:12 pm
knob's Avatar
knob knob is offline
Senior Member
Valued Member
 
Join Date: May 2007
Posts: 1,285
Smile Fixed the SDK Audio bug!

Had a play around with the SDK for Rk27xx
With a bit of help from the RK2705 datasheet and a very small change to
the Rockcodec the audio is now fine.
In HW_rockcodec.h
Quote:
//CGR
#define GAIN_INDEPENDENT (0x00<<6)//updated knob
#define GAIN_BYLEFT (0x02<<6)
#define GAIN_BYRIGHT (0x01<<6)
in HW_Rockcodec.c
Quote:
CodecCommandSet(CGR8, vol_out | GAIN_INDEPENDENT); // updated knob
CodecCommandSet(CGR1, (vol_in << 4) | vol_in); // set DAC input volume GODL and GODR
CodecCommandSet(CGR2, (vol_in + 4) | GAIN_BYLEFT); // set line1 input volume GOBL1 and GOBR1, CGR3 = CGR2
CodecCommandSet(CGR4, (vol_in + 4) | GAIN_BYLEFT); // set line2 input volume GOBL2 and GOBR2 CGR5 = CGR4
I was able to configure all my buttons if I choose the RK2700 chip configuration.

Hope this might help anyone still playing around with RK27xx players and the SDK.:mrgreen:
__________________
-----------------------------------------------------------------------------------------------------------
Reply With Quote