myMPX
Advertisement


Go Back MyMPx.org > MyMPx.org Forum > General Discussion

Hooray!!! Rockchip SDK!
Like Tree1Likes
Reply
Post New Thread
 
LinkBack Thread Tools
  #451 (permalink)  
Old 25th Oct 2009, 3:53 am
knob's Avatar
Senior Member
Valued Member
 
Join Date: May 2007
Posts: 1,285
Default


You can set the partition size with the upgrade tool, try and increase the size of the firmware partition a little, that will force the main partition to be recreated.
You will need to use the RK27DM tool first to get into rockusb mode then use the upgrade tool to set the partition size and reload your firmware.

If you are successful I would do a photo as they suggest and ask for the $10 dollars or so
refund price difference.

http://mympxplayer.org/rk27dm-repair...706-df947.html
http://mympxplayer.org/rockchip-rk27...v25-df881.html

Quote:
did you tried to run Ramos 970 Firmware on our player?
I think there are no audio options for the RAmos player just the button options, but I tried to get it to work and just came up with errors.
__________________
-----------------------------------------------------------------------------------------------------------

Last edited by knob; 25th Oct 2009 at 4:01 am.
Reply With Quote
  #452 (permalink)  
Old 25th Oct 2009, 4:27 am
Member
I love my MPx player
 
Join Date: Jun 2009
Posts: 174
Default

Thanks for help with this memory hack, I will try to experiment with this.

Quote:
Originally Posted by knob View Post
I think there are no audio options for the RAmos player just the button options, but I tried to get it to work and just came up with errors.
I meant, if somebody tried original FW from Ramos on our player, not the one in SDK.
Reply With Quote
  #453 (permalink)  
Old 25th Oct 2009, 8:41 am
knob's Avatar
Senior Member
Valued Member
 
Join Date: May 2007
Posts: 1,285
Default

I tried the early RAmos firmware on another nokia type RK27xx player I have, but the RM970 screen size is 2.8" (320x240) and the screen was messed up.
__________________
-----------------------------------------------------------------------------------------------------------

Last edited by knob; 25th Oct 2009 at 8:43 am.
Reply With Quote
  #454 (permalink)  
Old 25th Oct 2009, 9:36 am
Member
I love my MPx player
 
Join Date: Jun 2009
Posts: 174
Default

I ask because I havent stopped searching the code to find out what's wrong with the audio.

I found one major issue in I2S_PowerOnInit, I think connected with Scu_ClockEnable function.

Here is the code from the compiled SDK:
Code:
ROM:60009AD0 I2S_PowerOnInit                         ; CODE XREF: Audio_Init+8p
ROM:60009AD0                                         ; UHInitialiseFirst+18p
ROM:60009AD0                 STMFD   SP!, {R4,LR}
ROM:60009AD4                 MOV     R4, R0
ROM:60009AD8                 LDR     R0, =0x1801C018
ROM:60009ADC                 LDR     R1, [R0]
ROM:60009AE0                 MOV     R2, #0x10000
ROM:60009AE4                 BIC     R1, R1, R2
ROM:60009AE8                 STR     R1, [R0]
ROM:60009AEC                 LDR     R1, [R0]
ROM:60009AF0                 MOV     R2, #0x20000
ROM:60009AF4                 BIC     R1, R1, R2
ROM:60009AF8                 STR     R1, [R0]
ROM:60009AFC                 MOV     R0, #0x64
ROM:60009B00
ROM:60009B00 loc_60009B00                            ; CODE XREF: I2S_PowerOnInit+34j
ROM:60009B00                 SUBS    R0, R0, #1
ROM:60009B04                 BNE     loc_60009B00
ROM:60009B08                 MOV     R0, #0xF
ROM:60009B0C                 BL      Intr_Disable
The function Scu_ClockEnable is an inline type, so no redirection in the code is performed.
But in the FW with well working audio it look like this:
Code:
ROM:60009858 I2S_PowerOnInit                         ; CODE XREF: Audio_Init+8p
ROM:60009858                                         ; UHInitialiseFirst+2Cp
ROM:60009858                 STMFD   SP!, {R4,LR}
ROM:6000985C                 MOV     R4, R0
ROM:60009860                 MOV     R0, #0x10
ROM:60009864                 BL      _I2S_EnableClock
ROM:60009868                 MOV     R0, #0x11
ROM:6000986C                 BL      _I2S_EnableClock
ROM:60009870                 MOV     R0, #0x64
ROM:60009874
ROM:60009874 loc_60009874                            ; CODE XREF: I2S_PowerOnInit+20j
ROM:60009874                 SUBS    R0, R0, #1
ROM:60009878                 BNE     loc_60009874
ROM:6000987C                 MOV     R0, #0xF
ROM:60009880                 BL      Intr_Disable
there is this function introduced _I2S_EnableClock (my name). The function doesn't exist in SDK at all. This is its code:
Code:
ROM:600E28BC _I2S_EnableClock                        ; CODE XREF: sub_600022B8+2Cp
ROM:600E28BC                                         ; sub_600029F0+3Cp ...
ROM:600E28BC                 LDR     R3, =0x1801C000
ROM:600E28C0                 LDR     R1, [R3,#0x18]
ROM:600E28C4                 MOV     R2, #1
ROM:600E28C8                 BIC     R0, R1, R2,LSL R0
ROM:600E28CC                 STR     R0, [R3,#0x18]
ROM:600E28D0                 BX      LR
ROM:600E28D0 ; End of function _I2S_EnableClock
if someone know how to translate it to C or how to put this code in *.s file to add it to ADS I would be glad. Perhaps this is the reason.
Reply With Quote
  #455 (permalink)  
Old 25th Oct 2009, 11:04 am
Member
Keen on MPx players
 
Join Date: Sep 2007
Posts: 68
Default

Hi, glad you guys returned from that kinda off-topic discussion :-).
I would translate the above to:
Code:
#define APB0_SCU_BASE	0x1801C000 // declared in hw_memmap.h
#define SCU_CLKCFG		(SCU_BASE + 0x0018)

void _I2S_EnableClock(uint32_t param)
{
	uint32_t clkcfg;
	
	clkcfg = read_reg32(SCU_CLKCFG);
	clkcfg &= ~(1 << param);			// clears the param-th bit
	write_reg32(SCU_CLKCFG, clkcfg);
}

void I2S_PowerOnInit()
{
	int i;

	_I2S_EnableClock(16);
	_I2S_EnableClock(17);
	for (i=0; i<100; i++);		// kinda: wait / count to 100
	Intr_Disable(16);
	
	// ...
}
Although it currently looks to me as if the 1st I2S_PowerOnInit does the same except that the _I2S_EnableClock is indeed 'inline' and the shift is therefore done by the compiler (1<<16 = 0x10000).

Last edited by AleMaxx; 25th Oct 2009 at 11:08 am.
Reply With Quote
  #456 (permalink)  
Old 25th Oct 2009, 11:09 am
New Member
 
Join Date: Oct 2009
Posts: 8
Default

Flasher, isn't that function that you're looking for Scu_ClockEnable, in system\driver\clock\hwapi_scu.h? Note the ".h" extension, as it's an inline function. Your disassembly is identical in my original (good) firmware, and the firmware with the audio bug (but that may be a different bug, as it's a different player), and =0x1801C000 is SCU_CPU0_CODEBASE. Here it is, from the SDK, or am I misunderstanding?

/
Code:
**************************************************************************
* 函数名称: Scu_ClockEnable
* 函数描述:  enable a module clock
* 入口参数: Clock_Disable_t :  module IP name
* 出口参数: 无
* 返回值:      无
* 注释:
***************************************************************************/
__inline void Scu_ClockEnable(SCU_Clock_t clk_id)
{
    pSCUReg->SCU_CLKCFG &= ~(1 << clk_id);
}

void Scu_ModuleReset(Module_Reset_t Module_id, BOOL Reset);
void Scu_ClockSet(SCU_Clock_t clk_id, BOOL Enable);
void SCU_SetCodecFreq(UINT32 nKHz);
Also, there's an SDK bug flagged by the compiler that might get lost in all the other warnings. In system\driver\cache\hw_cache.c, there's two functions Cache_FlushWay and Cache_FlushDataLine. They have for loops that look like this:

Code:
    for (i = 100; i = 0; i--)
    {
        .
        .
     }
That should almost certainly be:

Code:
    for (i = 100; i == 0; i--)
    {
        .
        .
     }
Otherwise you're just assigning 0 to i, which returns a true, which causes it to skip everything inside of the loop. Of course, I've seen enough "#if 0" code in the SDK so this might be intended. This last error isn't related to anything specifically, I just thought I'd mention it.
Reply With Quote
  #457 (permalink)  
Old 25th Oct 2009, 12:23 pm
New Member
 
Join Date: Oct 2009
Posts: 8
Default

Incidently, in comparing my original FW with the broken audio FW, I've found a difference in IOMUX_PowerOnInit:

My original FW:

Code:
ROM:6002AC60 IOMUX_PowerOnInit 
ROM:6002AC60                 STR     LR, [SP,#-4]!
ROM:6002AC64                 LDR     R0, =0x14200
ROM:6002AC68                 LDR     R1, =SCU_CPU0_BASE
ROM:6002AC6C                 STR     R0, [R1,#0x30]
ROM:6002AC70                 MOV     R0, #0x40000
ROM:6002AC74                 STR     R0, [R1,#0x34]
ROM:6002AC78                 MOV     R1, #1
ROM:6002AC7C                 MOV     R0, #0
ROM:6002AC80                 BL      IOMUX_SetPwmPort
ROM:6002AC84                 MOV     R0, #2
ROM:6002AC88                 BL      IOMUX_SetI2CType
ROM:6002AC8C                 MOV     R0, #0
ROM:6002AC90                 BL      IOMUX_SetI2SType
ROM:6002AC94                 MOV     R0, #1
ROM:6002AC98                 BL      IOMUX_SetUart0Port
ROM:6002AC9C                 MOV     R0, #0x20000
ROM:6002ACA0                 BL      IOMUX_SetPanelType
ROM:6002ACA4                 MOV     R0, #1
ROM:6002ACA8                 BL      IOMUX_SetSDPor
ROM:6002ACAC                 MOV     R0, #2
ROM:6002ACB0                 LDR     LR, [SP],#4
ROM:6002ACB4                 B       IOMUX_SetSDRAMType
The broken audio FW:

Code:
ROM:6002AC60 IOMUX_PowerOnInit               
ROM:6002AC60                 STR     LR, [SP,#-4]!
ROM:6002AC64                 MOV     R0, #0
ROM:6002AC68                 LDR     R1, =0x14200
ROM:6002AC6C                 LDR     R2, =SCU_CPU0_BASE
ROM:6002AC70                 STR     R1, [R2,#0x30]
ROM:6002AC74                 STR     R0, [R2,#0x34]
ROM:6002AC78                 MOV     R1, #1
ROM:6002AC7C                 MOV     R0, #0
ROM:6002AC80                 BL      IOMUX_SetPwmPort
ROM:6002AC84                 MOV     R0, #2
ROM:6002AC88                 BL      IOMUX_SetI2CType
ROM:6002AC8C                 MOV     R0, #0
ROM:6002AC90                 BL      IOMUX_SetI2SType
ROM:6002AC94                 MOV     R0, #1
ROM:6002AC98                 BL      IOMUX_SetUart0Port
ROM:6002AC9C                 MOV     R0, #0x20000
ROM:6002ACA0                 BL      IOMUX_SetPanelType
ROM:6002ACA4                 MOV     R0, #1
ROM:6002ACA8                 BL      IOMUX_SetSDPor
ROM:6002ACAC                 MOV     R0, #2
ROM:6002ACB0                 LDR     LR, [SP],#4
ROM:6002ACB4                 B       IOMUX_SetSDRAMType
Recapping, I have this player: Amazon.com: Pro Ebiz NEW 16gb 3" TFT Touchscreen Mp3 / Mp4 / Mp5 Player (Plays Avi/rm/rmvb/flv Without Conversion): Electronics, which I will henceforth refer to as a "200X-type player". In the original FW, everything works except I get a ticker noise when the display is on. I put another FW (not the SDK) on it, and it cured the ticker, but killed the external speaker. It also made the audio sound distant and strange. Otherwise, this broken FW is indistinguishable to me from the original.

I'm trying to get the buttons to work in the SDK. That audio bug hasn't hit me yet, as I've been unable to detect any buttons or the touchscreen, although the compiled FW seems to run without any horrible issues. It just starts, I see the bouncing headphone sphere, and the screen goes dark as it times out. I have to hit reset to turn it off, or plug in the USB, which works normally. I've tried a bunch of things, and so far, no joy.
Reply With Quote
Sponsored Links
  #458 (permalink)  
Old 25th Oct 2009, 12:32 pm
sid6581's Avatar
Member
Keen on MPx players
 
Join Date: Sep 2009
Posts: 54
Default

Quote:
Originally Posted by Molitor View Post
Incidently, in comparing my original FW with the broken audio FW, I've found a difference in IOMUX_PowerOnInit:
Mmmhh I don't see much difference here, the I2C and I2S type are the same...

For our player, we use the internal RK27xx CODEC.

I2C is set-up to I2C_Internal (2)
I2S is set-up INTERNAL_CODEC (0)
__________________
Rockchip Powah !
Reply With Quote
  #459 (permalink)  
Old 25th Oct 2009, 2:07 pm
Member
Keen on MPx players
 
Join Date: Sep 2007
Posts: 68
Default

The only difference I found is that different values get written to RegIoMuxB register (SDRAM address pin 12 or GPIO pin on port F (bit 18)). Seems to be quite audio-unrelated but you might want to check that yourself.
Reply With Quote
  #460 (permalink)  
Old 25th Oct 2009, 2:22 pm
Member
I love my MPx player
 
Join Date: Jun 2009
Posts: 174
Default

Well, it might be anything. My observations tell me that headphone amplifier is just turned off, so the audio has a weak signal and it works properly only with external amplifier, which also may suggests why speaker doesn't work at all. So it's maybe only a matter of one pin set to high.

As far as I noticed this audio issue happens mostly on RK2705, while on RK2706 the same code runs ok. Perhaps the first one needs a special external power sent to the headphones.

Please note that the audio problem occurs only with simple headphones WITHOUT amplifier. I plugged it into pc speakers and it works fine. And someone else here plugged it into wireless headphones (with amplifier) and it also worked ok.
Reply With Quote
Reply

Sponsored Links



Similar Threads
Thread Thread Starter Forum Replies Last Post
NEW rockchip player (Rockchip RK27xx series) availability knob General Discussion 38 12th Nov 2008 10:47 am
Rockchip Editor: for Rockchip 27xx ALP1987 Support and How To 6 17th Oct 2008 5:25 pm


All times are GMT -7. The time now is 4:25 pm.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0 RC 2
Back to Top

Designed by indiqo.media