Support and General Use > Hardware
iRiver ihp120 failed CF install
petur:
Yes, the intention is to make most cards work with normal rockbox, but it has proven not that easy. A quick hack worked, but we're still investigating why. Once we know that, we can have a nice solution.
There is progress, even if a bit slow... Patience ;)
magmaniac:
(Note: My Wiki name is FrankOtto.)
--- Quote from: Jeff on February 16, 2008, 04:29:19 PM ---I know i'm groveling but is there any way to create modified ROM's or bootloaders to assist those of us who are technically challenged in these areas?
[ ... CF enabled iHP-120 ... ]
--- End quote ---
Jeff, if you are willing to try, I can send you a build for the H120. But at the very least you need to install the V7pre4 bootloader, as the workaround currently only works when Rockbox is loaded from ROM (which doesn't work with V6 bootloader). This also means that you will lose the original iriver firmware. (Installation of the bootloader is detailed on the Wiki page IriverFlashing.)
To be completely clear: My build does not modify the bootloader, but you still need the prerelease version of the current bootloader. Whether you want to take this risk is up to you.
My build contains three patches to vanilla Rockbox (SVN r16316), all to firmware/drivers/ata.c :
1) In set_features(), the ATA command which sets the advanced powermanagement feature is skipped. For some CF cards this is necessary, as this command would fail and result in the ATA -80 error.
2) In ata_perform_sleep(), the sending of the ATA SLEEP command is skipped. For a hard disk, this command tells the drive to park the head and stop spinning. For a CF card, there's nothing to park or spin, so skipping this command should be safe, especially since the CF spec states that the CF card will enter sleep mode anyway after 5 msec. If we do send the sleep command, we often experience freezes of the player, although the command itself returns success.
@petur: I think I was too hasty in stating (in the Wiki and on IRC) that I don't need to modify ata_perform_sleep(). In my first tests, I still had a logf call in there, which changes the timing of course, and I think this prevented my player from freezing. I since tried a new build without logf, and this one freezes quite often, unless I again disable the ATA SLEEP.
EDIT: while at first a build with this patch ran stable, it later caused lots of freezing. So this patch doesn't fix the freezing. See petur's post below.
3) In ata_thread(), the call to ide_power_enable(false) is skipped. This call would power off the IDE bus. For me, this results in the disk acess LED being on constantly. Very odd. (So far I seem to be the only one who has encountered this behaviour.)
All in all, the patches disable a lot of the power management related to the disk part. So the question is whether the player will now use more power than necessary. In order to answer this question, I'm currently running a battery benchmark. (Preliminary results suggest that the player at least will run as long as with HD, but of course with CF it should run quite a bit longer.) This benchmark with continuous playback should also serve as a measure of stability, i.e. to see whether there are still freezes. (So far: 7 hours of continuous playback without problems.)
petur:
Frank: to get rid of the freeze, just comment out the sleeping = true;
I hope to find the cause of the freezing tonight, the next thing to attack is set_features. I searched quite a bit this weekend but couldn't find a reason for its failure.
Davide-NYC:
I ran battery_bench on a CF'ed H120 after applying FrankOtto's patch as well as on a standard (HD) H120. Both have the stock battery.
The CF-H120 lasted 16:18:05.
The HD-H120 lasted 14:05:52.
Note that this was not done on the same battery, just the same type of battery.
magmaniac:
--- Quote from: petur on February 18, 2008, 11:12:08 AM ---Frank: to get rid of the freeze, just comment out the sleeping = true;
--- End quote ---
petur, won't that bring back the shutdown problem? (hanging on shutdown, until forced shutdown occurs with noise on speakers)
Also, without sleeping=true, some code path in ata_thread() never gets hit, and I suspect that it might be a timing problem with what happens after the SLEEP command is sent. The SLEEP command itself succeeds, but then sleeping=true gets set, and this hits certain code paths which do other ATA stuff which then freeze the player because we didn't wait long enough after issueing SLEEP... (yes, this is all rather hypothetical)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version