notaz said:
simon(gph) said:
notaz said:
Can you publish the kernel source? Linux kernel is licensed under GPLv2, which requires making the source available when binaries are released.
Sorry, It's mean open the source code such like as WIZ.
I'll upload u-boot and kernel source to file archive when each release new firmware.
That's good news!
simon(gph) said:
So, It'll be no problem when which PLL0 divider value is selected including overclocking.
Refer to following kernel sound dirver source code.
With this code you will sometimes get a large drift. For example, if PLL0 is 570MHz and you want to play 44100Hz sound, your code will result in 44531Hz rate, which is ~1% faster than needed. When you change the overclock, the drift also changes, which may cause glitches on some apps. Are you sure it's better than using PLL1?
A comment about your code:
Code:
static long audio_set_dsp_speed(long val, audio_stream_t * s)
{
<snip>
/* rate = pll1 / mclk_div / bitclk_div / 64 */
MES_AUDIO_SetClockDivisor(0 ,mclk_div);
MES_AUDIO_SetClockDivisor(1 ,bitclk_div);
s->rate = val;
s->cpu_pll = pll;
return val;
}
You should better
Code:
return pll / mclk_div / bitclk_div / 64;
here. This way the app/game will know sound is playing not at (for example) requested 44100 rate, but something like 44531 or similar. This way the game has a chance to adjust itself to compensate for faster running sound.
That's good idea. I'll test "return pll / mclk_div / bitclk_div / 64" in various apps & games.
And, I recommend to use following overclocking table.
=============================================================
PLL0=530550000(p=20,m=393,s=0), 22050 : mclk=47, bitclk= 8 [ -3]
PLL0=530550000(p=20,m=393,s=0), 44100 : mclk=47, bitclk= 4 [ -6]
PLL0=533250000(p=20,m=395,s=0), 22050 : mclk=63, bitclk= 6 [ -8]
PLL0=533250000(p=20,m=395,s=0), 44100 : mclk=63, bitclk= 3 [ -16]
PLL0=558900000(p=20,m=414,s=0), 22050 : mclk=44, bitclk= 9 [ 2]
PLL0=558900000(p=20,m=414,s=0), 44100 : mclk=33, bitclk= 6 [ 5]
PLL0=564300000(p=20,m=418,s=0), 22050 : mclk=50, bitclk= 8 [ -8]
PLL0=564300000(p=20,m=418,s=0), 44100 : mclk=50, bitclk= 4 [ -15]
PLL0=587250000(p=20,m=435,s=0), 22050 : mclk=52, bitclk= 8 [ 7]
PLL0=587250000(p=20,m=435,s=0), 44100 : mclk=52, bitclk= 4 [ 14]
PLL0=592650000(p=20,m=439,s=0), 22050 : mclk=60, bitclk= 7 [ -3]
PLL0=592650000(p=20,m=439,s=0), 44100 : mclk=42, bitclk= 5 [ -5]
PLL0=621000000(p=20,m=460,s=0), 22050 : mclk=55, bitclk= 8 [ 2]
PLL0=621000000(p=20,m=460,s=0), 44100 : mclk=55, bitclk= 4 [ 5]
PLL0=626400000(p=20,m=464,s=0), 22050 : mclk=37, bitclk=12 [ -7]
PLL0=626400000(p=20,m=464,s=0), 44100 : mclk=37, bitclk= 6 [ -13]
PLL0=649350000(p=20,m=481,s=0), 22050 : mclk=46, bitclk=10 [ 6]
PLL0=649350000(p=20,m=481,s=0), 44100 : mclk=46, bitclk= 5 [ 13]
PLL0=652050000(p=20,m=483,s=0), 22050 : mclk=42, bitclk=11 [ 2]
PLL0=652050000(p=20,m=483,s=0), 44100 : mclk=33, bitclk= 7 [ 5]
PLL0=654750000(p=20,m=485,s=0), 22050 : mclk=58, bitclk= 8 [ -2]
PLL0=654750000(p=20,m=485,s=0), 44100 : mclk=58, bitclk= 4 [ -4]
PLL0=660150000(p=20,m=489,s=0), 22050 : mclk=52, bitclk= 9 [ -10]
PLL0=660150000(p=20,m=489,s=0), 44100 : mclk=39, bitclk= 6 [ -20]
PLL0=677700000(p=20,m=502,s=0), 22050 : mclk=60, bitclk= 8 [ 10]
PLL0=677700000(p=20,m=502,s=0), 44100 : mclk=60, bitclk= 4 [ 21]
PLL0=688500000(p=20,m=510,s=0), 22050 : mclk=61, bitclk= 8 [ -6]
PLL0=688500000(p=20,m=510,s=0), 44100 : mclk=61, bitclk= 4 [ -11]
PLL0=691200000(p=20,m=512,s=0), 22050 : mclk=49, bitclk=10 [ -10]
PLL0=691200000(p=20,m=512,s=0), 44100 : mclk=49, bitclk= 5 [ -19]
PLL0=711450000(p=20,m=527,s=0), 22050 : mclk=63, bitclk= 8 [ 6]
PLL0=711450000(p=20,m=527,s=0), 44100 : mclk=63, bitclk= 4 [ 12]
PLL0=719550000(p=20,m=533,s=0), 22050 : mclk=51, bitclk=10 [ -5]
PLL0=719550000(p=20,m=533,s=0), 44100 : mclk=51, bitclk= 5 [ -10]
PLL0=722250000(p=20,m=535,s=0), 22050 : mclk=64, bitclk= 8 [ -9]
PLL0=722250000(p=20,m=535,s=0), 44100 : mclk=64, bitclk= 4 [ -18]
PLL0=745200000(p=20,m=552,s=0), 22050 : mclk=48, bitclk=11 [ 2]
PLL0=745200000(p=20,m=552,s=0), 44100 : mclk=44, bitclk= 6 [ 5]
PLL0=747900000(p=20,m=554,s=0), 22050 : mclk=53, bitclk=10 [ -2]
PLL0=747900000(p=20,m=554,s=0), 44100 : mclk=53, bitclk= 5 [ -3]
PLL0=750600000(p=20,m=556,s=0), 22050 : mclk=38, bitclk=14 [ -5]
PLL0=750600000(p=20,m=556,s=0), 44100 : mclk=38, bitclk= 7 [ -10]
PLL0=770850000(p=20,m=571,s=0), 22050 : mclk=42, bitclk=13 [ 9]
PLL0=770850000(p=20,m=571,s=0), 44100 : mclk=39, bitclk= 7 [ 19]
PLL0=776250000(p=20,m=575,s=0), 22050 : mclk=55, bitclk=10 [ 2]
PLL0=776250000(p=20,m=575,s=0), 44100 : mclk=55, bitclk= 5 [ 5]
PLL0=778950000(p=20,m=577,s=0), 22050 : mclk=46, bitclk=12 [ -1]
PLL0=778950000(p=20,m=577,s=0), 44100 : mclk=46, bitclk= 6 [ -2]
PLL0=804600000(p=20,m=596,s=0), 22050 : mclk=57, bitclk=10 [ 5]
PLL0=804600000(p=20,m=596,s=0), 44100 : mclk=57, bitclk= 5 [ 11]
PLL0=810000000(p=20,m=600,s=0), 22050 : mclk=41, bitclk=14 [ -1]
PLL0=810000000(p=20,m=600,s=0), 44100 : mclk=41, bitclk= 7 [ -2]
PLL0=812700000(p=20,m=602,s=0), 22050 : mclk=64, bitclk= 9 [ -5]
PLL0=812700000(p=20,m=602,s=0), 44100 : mclk=48, bitclk= 6 [ -9]
PLL0=832950000(p=20,m=617,s=0), 22050 : mclk=59, bitclk=10 [ 9]
PLL0=832950000(p=20,m=617,s=0), 44100 : mclk=59, bitclk= 5 [ 18]
PLL0=835650000(p=20,m=619,s=0), 22050 : mclk=37, bitclk=16 [ 5]
PLL0=835650000(p=20,m=619,s=0), 44100 : mclk=37, bitclk= 8 [ 11]
PLL0=838350000(p=20,m=621,s=0), 22050 : mclk=54, bitclk=11 [ 2]
PLL0=838350000(p=20,m=621,s=0), 44100 : mclk=33, bitclk= 9 [ 5]
PLL0=846450000(p=20,m=627,s=0), 22050 : mclk=60, bitclk=10 [ -8]
PLL0=846450000(p=20,m=627,s=0), 44100 : mclk=60, bitclk= 5 [ -15]
PLL0=864000000(p=20,m=640,s=0), 22050 : mclk=51, bitclk=12 [ 8]
PLL0=864000000(p=20,m=640,s=0), 44100 : mclk=51, bitclk= 6 [ 17]
PLL0=869400000(p=20,m=644,s=0), 22050 : mclk=56, bitclk=11 [ 2]
PLL0=869400000(p=20,m=644,s=0), 44100 : mclk=44, bitclk= 7 [ 5]
PLL0=874800000(p=20,m=648,s=0), 22050 : mclk=62, bitclk=10 [ -4]
PLL0=874800000(p=20,m=648,s=0), 44100 : mclk=62, bitclk= 5 [ -8]
PLL0=880200000(p=20,m=652,s=0), 22050 : mclk=52, bitclk=12 [ -10]
PLL0=880200000(p=20,m=652,s=0), 44100 : mclk=52, bitclk= 6 [ -20]
PLL0=897750000(p=20,m=665,s=0), 22050 : mclk=53, bitclk=12 [ 5]
PLL0=897750000(p=20,m=665,s=0), 44100 : mclk=53, bitclk= 6 [ 11]