Rockbox Technical Forums

Support and General Use => Hardware => Topic started by: eumesmo on August 24, 2007, 04:00:08 PM

Title: iRiver ihp120 failed CF install
Post by: eumesmo on August 24, 2007, 04:00:08 PM
Bought connectors and built adapter myself, standard instructions, test OK on PC IDE, 5v

On ihp120 3.3v, rockbox bootloader hangs on 3rd line Batt: 4.06V, no ATA errors; when connected to USB, "seems" to reset device.

Original firmware(1.66 holding record): check HDD connections, (wait), menu, can't format, file browser shows single line of random characters(unchanging after reset).

Using CF dane-elec red 4gb.
Title: Re: iRiver ihp120 failed CF install
Post by: AlexP on August 24, 2007, 04:05:24 PM
Sorry, just to be clear as your post doesn't say entirely what you are asking.  You are replacing the hard drive in the H120 with a compact flash card and it doesn't work?

The H120 worked fine with the hard disk?

Have you seen http://www.rockbox.org/twiki/bin/view/Main/MiniCF?

As per that wiki page, are you sure the card you are using supports the full TrueIDE spec?

Edit:  Also a patch is required for the mini as on the wiki page, have you created a patched build?
Title: Re: iRiver ihp120 failed CF install
Post by: eumesmo on August 25, 2007, 09:44:14 AM
Sorry for the lack for verbosity. Yes, it did not work, I am asking what is the issue, and more importantly if anyone has tried, succeeded, or tried to address the problem. As is, I cannot vouch for adapter, or CF card for that matter(possibility of being a fake), on top of lacking basic electronic understanding to diagnose. In regards to http://www.rockbox.org/twiki/bin/view/Main/MiniCF, logic suggests I would need to patch ihp120 bootloader, lacking basic programming skills, well, you get the point.

ihp120 with HDD, bootloader 6: works fine
CF card in camera: works fine
CF card with homebrew adapter(1.27x1.27) connected to second homebrew adapter(2.5x2.5) on PC IDE(Connected to 5v) running linux: works fine
CF card with homebrew adapter(1.27x1.27) in ihp120: fails( no ATA errors, bootloader freezes on 3rd(BATT) line, when connected to usb, logic seems to reset storage device)
Title: Re: iRiver ihp120 failed CF install
Post by: bluebrother on August 25, 2007, 11:20:22 AM
In regards to http://www.rockbox.org/twiki/bin/view/Main/MiniCF, logic suggests I would need to patch ihp120 bootloader, lacking basic programming skills, well, you get the point.
That's the point -- you need to adjust Rockbox and the bootloader for this to work. There's a patch attached to that page. Resyncing is easy (just search for the comments that are displayed in the diff file). Beware that the svn bootloader might be unstable, so flashing it isn't recommended (unless you're aware of what you're doing of course). This is much easier for the Ipods as the bootloader isn't flashed and therefore there is no real risk of bricking your player with a broken bootloader.
Title: Re: iRiver ihp120 failed CF install
Post by: eumesmo on August 25, 2007, 06:35:15 PM
But isn't the specific patch relevant only when building rockbox for ipod mini? (I love my ihp120 too much to blindly tweak code for bootloader).
I cannot believe no one tried this before...
Title: Re: iRiver ihp120 failed CF install
Post by: AlexP on August 25, 2007, 06:48:00 PM
The patch disables the ATA sleep command, as with flash storage that causes rockbox to crash.  This is already done for the nano (flash storage).  I would take from that it needs to be done on any flash storage target, and in this case that includes the H1x0.

However, I would be VERY careful about building your own H1x0/H3x0 bootloader as if the flash goes wrong you risk bricking it, which can only be repaired by connecting a low-level interface to the player.
Title: Re: iRiver ihp120 failed CF install
Post by: eumesmo on August 26, 2007, 08:57:26 AM
Yes, logic suggest as much, someone much have a dissected ihp120 somewhere so I don't risk bricking my beloved ihp120, no?
Title: Re: iRiver ihp120 failed CF install
Post by: Siar on September 27, 2007, 12:57:37 AM
My 2 cents:

The whole story is here: http://www.misticriver.net/showpost.php?p=576714&postcount=3
Summary:

My HDD was dying. Some songs still were playing, but HDD heads where hitting the plates, trying to release the HDD soul...

I bought the adapter HDD-CF from ebay.
Installed 8Gb A-DATA Compact Flash 120x
Rechecked results with 512Mb Ultra II from Sandisk

Results:

1. H120 can be connected to the PC ONLY using Rockbox bootloader. Once it is powered on, there is no connection. In the player there is a picture of "USB connected", PC does not see the drive.

2. Standard Iriver firmware does not work (it writes something like "check your hdd").

3. From time to time, pretty randomly, the player hangs up. Sometimes it happened when I am listening music, sometimes - while trying to switch tracks, sometimes - at the specific tracks.

4. ape files plays with interruptions and delays. (flac work fine).

Do you  think that all these is a result of PIO mode?
Does it worth to compile and flash modified rockbox (given that I am not that experienced with this stuff)?

Thanks.

P.S. Copying process to the Ultra II is MUCH faster, especially for the small files, compared to the A-DATA.


UPD: Yes!!! It works (at least, the problem #1 is resolved). To make the story short, as it was mentioned before in this thread, you have to modify ata.c file. I left only return(0) in the function perform_soft_reset(void). Then, compiled source, created rockbox.zip and replace .rockbox folder in my player.

Title: Re: iRiver ihp120 failed CF install
Post by: bluebrother on September 27, 2007, 04:15:46 AM
Please follow our posting guidelines. "smth" is not a real word and not wanted here. See the posting guidelines for details.
Title: Re: iRiver ihp120 failed CF install
Post by: Siar on September 27, 2007, 10:39:55 AM
Corrected
Title: Re: iRiver ihp120 failed CF install
Post by: bluebrother on September 27, 2007, 11:50:37 AM
Thank you.
Title: Re: iRiver ihp120 failed CF install
Post by: eumesmo on September 30, 2007, 02:00:06 PM
Well, I'm glad flashing boot loader is not required, and that someone had more faith than I. Thank you very much for clearing that up. Wish someone could add that to wiki, and perhaps daily builds...
Title: Re: iRiver ihp120 failed CF install
Post by: AlexP on September 30, 2007, 03:39:08 PM
Wish someone could add that to wiki

Feel free, it is a wiki.

and perhaps daily builds...

If you mean removing the ATA sleep command, then that clearly isn't going to happen as it would bugger up normal H100s with hard drives.
Title: Re: iRiver ihp120 failed CF install
Post by: eupeptic on October 01, 2007, 03:42:18 PM
Siar, I have an H320 I recently bought with the intention of using it as a recorder, and even before I bought it I've been contemplating replacing the hard drive with CF as that should eliminate the electrical noise that is picked up on the recordings when the hard drive is being accessed, and that way I also wouldn't have to worry about the possibility of a hard drive failure. And since you're the first person I've come across who has this working on an iRiver, I'm wondering if you're still getting the random hangs (which I would guess are related to the problem that you just fixed), and if so, does it also hang while recording (using the PCM Wave format)?

And if that patch has resolved the hangs then I'd also appreciate it if you could do a couple 3 minute test recordings (one without anything connected to the line input and 48 dB gain, and one with a -6 dB (or so), 3 KHz tone and 0 dB gain), but for now I just want to know if it still hangs or not as that's a make-or-break issue for me.
Title: Re: iRiver ihp120 failed CF install
Post by: eumesmo on October 01, 2007, 05:36:58 PM
I don't mean main release, maybe special build, or as options when configuring source. Regarding ata.c, it has loop for ipod nano, then ends with  "return 0; /* Always report success */", should I change it to "return(0);"?

From what Siar said, he's still having serious problems, could support be improved? Should we expect such improvements?
Title: Re: iRiver ihp120 failed CF install
Post by: Siar on October 01, 2007, 06:23:20 PM
Siar, I have an H320 I recently bought with the intention of using it as a recorder, and even before I bought it I've been contemplating replacing the hard drive with CF as that should eliminate the electrical noise that is picked up on the recordings when the hard drive is being accessed, and that way I also wouldn't have to worry about the possibility of a hard drive failure. And since you're the first person I've come across who has this working on an iRiver, I'm wondering if you're still getting the random hangs (which I would guess are related to the problem that you just fixed), and if so, does it also hang while recording (using the PCM Wave format)?

And if that patch has resolved the hangs then I'd also appreciate it if you could do a couple 3 minute test recordings (one without anything connected to the line input and 48 dB gain, and one with a -6 dB (or so), 3 KHz tone and 0 dB gain), but for now I just want to know if it still hangs or not as that's a make-or-break issue for me.


Additional update:


So far so good. No hangs. Works without complaints. Battery lasts ~ 1.3 times longer. I did not try to record anything, though. I do not have an external mic, but I can test the internal one, if you want.

One more time, you have to have a rockbox loader before the hdd/CF swapping. Without it you cannot access the card from PC and you cannot read anything from the CF. It could be the case that the original firmware does not work only with a cards that have PIO only mode.  I did not find any information that my CF 512Mb Ultra || supports Ultra ATA mode. However, it could be also the case that the adapter does not support it.

I have to emphasize that I tested it with A-DATA 8Gb 120x and Ultra II 512 Mb cards only.

Title: Re: iRiver ihp120 failed CF install
Post by: bluebrother on October 01, 2007, 06:44:31 PM
Regarding ata.c, it has loop for ipod nano, then ends with  "return 0; /* Always report success */", should I change it to "return(0);"?
Why? return 0; is absolutely correct.
Title: Re: iRiver ihp120 failed CF install
Post by: eumesmo on October 03, 2007, 06:36:36 AM

UPD: Yes!!! It works (at least, the problem #1 is resolved). To make the story short, as it was mentioned before in this thread, you have to modify ata.c file. I left only return(0) in the function perform_soft_reset(void). Then, compiled source, created rockbox.zip and replace .rockbox folder in my player.



How do I disable the function in the latest source?

Question to Siar;
Does the adapter you bought have any ICs(chips), voltage regulators?
Title: Re: iRiver ihp120 failed CF install
Post by: Siar on October 03, 2007, 04:28:54 PM
I did not pay much attention to it, but as far as I remember, there were no such things (voltage changers), but I can be wrong.

About the "removal"

Use these instructions to get the source and IDE :)
http://www.rockbox.org/twiki/bin/view/Main/VMwareDevelopmentPlatform

then, in the file ata.c (relative path firmware/drivers/ata.c)
remove from the function I mentioned earlier everything but return(0).

Save the file, and continue to use instructions from
http://www.rockbox.org/twiki/bin/view/Main/VMwareDevelopmentPlatform

Have fun :)
Title: Re: iRiver ihp120 failed CF install
Post by: eumesmo on October 04, 2007, 03:05:55 PM
Even before modifying source, you were able to boot with the CF card, right?
Does it ever freeze on the 3rd line of the bootloader?

Could you please attach your ata.c?
Title: Re: iRiver ihp120 failed CF install
Post by: bluebrother on October 04, 2007, 04:35:17 PM
Could you please attach your ata.c?
How about posting a patch to the tracker where such stuff belongs?
Title: Re: iRiver ihp120 failed CF install
Post by: Siar on October 04, 2007, 11:30:50 PM
Even before modifying source, you were able to boot with the CF card, right?
Does it ever freeze on the 3rd line of the bootloader?

Could you please attach your ata.c?

The sequence (given that you patched your original iriver firmware with the Rockbox loader:)
1. Connect your player to PC while it is OFF using USB cable.
2. Turn on your player. If you can see your player from PC at this stage, you are lucky. Otherwise, I suspect something wrong with your adapter or CF.
Now, if you are lucky, you can use my previous post to compile the modified source and copy it to the player.

I do not think that this is a good idea - to attach the ata.c file here. If you can copy it to the right directory & compile it - you can modify it there & compile it as well. Plus, I suspect, that for different versions of the source this file can be different, too. I can send/post the compiled firmware, if it is not prohibited, instead.

P.S. I am a complete lame in all this stuff. That was the first time I have compiled something like that using linux image.
Title: Re: iRiver ihp120 failed CF install
Post by: Siar on October 04, 2007, 11:33:19 PM
Could you please attach your ata.c?
How about posting a patch to the tracker where such stuff belongs?

Do you think it is worth to do it?
Title: Re: iRiver ihp120 failed CF install
Post by: Jeff on February 11, 2008, 10:01:23 PM
Old Thread but need help...


Have a new ATA to CF adapter and a lovely 32GB Transcend CF card.  I can put it in the player, format the card and load content on the card but when trying to boot rockbox I get the first two lines and then the following:

ATA error:  -80

Can someone walk me through (baby steps) on how to change my ata.c file so i can overcome this issue?  I don't use Linux, have Vista and about as much knowledge about this stuff as would fit on the tip of a needle.

Thanks for any assistance.



Jeff
Title: Re: iRiver ihp120 failed CF install
Post by: Davide-NYC on February 13, 2008, 02:59:55 PM
Since there are several threads about essentially the same subject I suggest we all post our findings at this brand new shiny wiki page! Just to get it all in one place.

http://www.rockbox.org/twiki/bin/view/Main/CFModGuide

 ;D
Title: Re: iRiver ihp120 failed CF install
Post by: Jeff on February 13, 2008, 04:31:48 PM
Success at last!

I can confirm that the A Data 32GB CF Card works fine.

Direct Link:

http://www.newegg.com/Product/Product.aspx?Item=N82E16820211244

No alterations to the bootloader.  Just did a quick format under windows, loaded the latest Rockbox files and all is golden.

Two observations:

1.  Booting into stock iriver firmware gives the "check hdd connection" error but the player does eventually get there, however, you cannot access any files or navigate the player once there.

2.  With the player on, plugging into a USB cable gives you the USB icon on screen but the computer does not see the player.  Removing the cable does nothing and the player must be shut off.  So the only way to get into USB mode is to start with the player off, plug in the USB cable and turn the player on.

Transfer speeds are a bit slow.  It took approx. 15min to transfer 6GB of music onto the card.  Other than that and the above mentioned items, it is sweet to have 30GB of flash based music in my iHP-120!  ;D



ps - i'm thinking that the Transcend and other cards that give an error are giving it due to the sleep command.  If someone could compile the bootloader altering that command, i'd test it.
Title: Re: iRiver ihp120 failed CF install
Post by: petur on February 13, 2008, 05:03:46 PM
that card is the 'slow' version.... I have a speedier one but no go...
Title: Re: iRiver ihp120 failed CF install
Post by: Jeff on February 13, 2008, 05:25:53 PM
that card is the 'slow' version.... I have a speedier one but no go...
Correct.... but....

Once I load 30GB's of music, i only change it, with rare occasion, so it doesn't matter to me whatsoever.  Access times and general player functions are much quicker than with the hard drive as expected since there is no hdd spin up issues, etc...
Title: Re: iRiver ihp120 failed CF install
Post by: Siar on February 13, 2008, 07:37:07 PM

1.  Booting into stock iriver firmware gives the "check hdd connection" error but the player does eventually get there, however, you cannot access any files or navigate the player once there.

2.  With the player on, plugging into a USB cable gives you the USB icon on screen but the computer does not see the player.  Removing the cable does nothing and the player must be shut off.  So the only way to get into USB mode is to start with the player off, plug in the USB cable and turn the player on.

Transfer speeds are a bit slow.  It took approx. 15min to transfer 6GB of music onto the card.  Other than that and the above mentioned items, it is sweet to have 30GB of flash based music in my iHP-120!  ;D


It sounds exactly what I had before changing ata.c file  ;). It will not change the speed (slooooooow), but it will fix the problem #2.

P.S. I do not have much experience with linux either. But following the steps from the link I posted is really easy. If you feel desperate, I can send you an archived .rockbox directory with fixed ata.c. It is compiled ~ in November 07.
Title: Re: iRiver ihp120 failed CF install
Post by: Davide-NYC on February 13, 2008, 11:41:19 PM
Wait. Let me understand this correctly. If you modify ata.c and compile you will not be installing a new bootloader. Instead you will simply be installing a modified version of Rockbox, correct? This is not dangerous and I intend to try it as soon as I can hear confirmation in the IRC channel.

@Siar, please let me know if you could get to the bootloader stage *before* you modified the source code. What exact error messages did you get?

[update] I modified the ata.c file replacing the perform_soft_reset function at line 902 with the following:

Code: [Select]
static int perform_soft_reset(void)
{
    return 0; /* Always report success */
}

I compiled, made zip, deleted original .rockbox (for good measure) and extracted. Unfortunately, this did not change my situation at all. I am using an 2GB A-Data 266x Turbo card and I still get an ATA error -80 at boot.

I believe that those of us with ATA error -80 will not be helped by the sleep hack as it does not affect the bootloader.

Siar: Please confirm that you saw the "Rockbox Boot Loader" message before doing any code hacking.  Thanks.

@Jeff: Could you record a 15 minute stereo WAV file (or even 60 minutes) and let me know if the card can keep up with the write requests? Not being able to keep up with stereo WAV would be a deal breaker for me. Slow transfer speeds I can live with.  :)
Title: Re: iRiver ihp120 failed CF install
Post by: petur on February 14, 2008, 03:37:19 AM
Wait. Let me understand this correctly. If you modify ata.c and compile you will not be installing a new bootloader. Instead you will simply be installing a modified version of Rockbox, correct? This is not dangerous and I intend to try it as soon as I can hear confirmation in the IRC channel.

The ata -80 error comes from the bootloader, so any 'fixes' must be done there. Changing rockbox.iriver will not influence that a bit (but that will need the fix too of course)

I will see if I find the time tonight to start experimenting with bootloaders on h300 (gulp)
Title: Re: iRiver ihp120 failed CF install
Post by: Siar on February 14, 2008, 02:35:42 PM
As I wrote in several places before...

The following worked with slow a-data 8gb and pretty old ultra II 512Mb CF

Prerequisite: You have to have rockbox bootloader before replacing your HDD by smth else. I did not modify it. I do not remember exactly what version is it, but it is for sure in my iriver for more than one year.
You need bootloader before hdd cf swap, because CF DOES NOT WORK WITH ORIGINAL IRIVER FIRMWARE.

So, I repeat, the device was able to run with a "generic" pretty old rockbox bootloader. I HAVE NEVER had -80 error.



Now, using "generic" .rockbox files without ata.c modification:

A. Device can interact with PC (copying/deleting files) via USB ONLY if you use a following sequence:
1. turn iriver off
2. plug it to PC via USB
3. Turn iriver on
It uses some bootloader interface to communicate with PC.

B. The device can freeze from time to time for no observable reason

C. If you plug iriver to PC while it is working,
- iriver tells you that it is connected to pc
- pc tells you that it cannot recognize usb device

While it is not frozen, you are able to play music EVEN USING GENERIC BOOTLOADER AND .rockbox


Problems A,B,C disappeared after I modified ata.c, recompiled and replaced .rockbox directory (though copying .rockbox to A-DATA took ~5-10 minutes :().

I hope, it helps

Title: Re: iRiver ihp120 failed CF install
Post by: Jeff on February 14, 2008, 03:02:30 PM
So it would seem to me that a modified bootloader with the altered ata.c should be made available for those wishing to perform this mod.  It sounds like the issue is that the modified bootloader may or may not work on all players and would obviously need to be specific to player model, etc.
Title: Re: iRiver ihp120 failed CF install
Post by: Siar on February 14, 2008, 03:46:27 PM
So it would seem to me that a modified bootloader with the altered ata.c should be made available for those wishing to perform this mod.  It sounds like the issue is that the modified bootloader may or may not work on all players and would obviously need to be specific to player model, etc.

Not sure. For those who have -80 error, modification of ata.c file will not work. The problem in this case is obviously in the interaction of bootloader and hardware.
And this is a big questions, whether bootloader can be properly modified in this case.

So, for the current state of nature, buy "speedy :D" and the cheapest A-DATA and enjoy the CF mod (and slow copying speed as a bonus :) ).
Title: Re: iRiver ihp120 failed CF install
Post by: Jeff on February 14, 2008, 06:18:21 PM
@Jeff: Could you record a 15 minute stereo WAV file (or even 60 minutes) and let me know if the card can keep up with the write requests? Not being able to keep up with stereo WAV would be a deal breaker for me. Slow transfer speeds I can live with.  :)
Initial test with a 10 minute WAV file.  Recorded from FM in WAV 44.1 KHZ

Listened to the entire 10 min file, nothing unusual to report.  During the recording, the hard drive access light came on approx. 1 time per minute of recording.

I will take it further when i get a chance this weekend and do a 1 hour recording and report back.
Title: Re: iRiver ihp120 failed CF install
Post by: petur on February 14, 2008, 06:41:26 PM
I got my A-Data turbo x266 card working reliably :)

For now, my 'hack' disables set_features() and ata_perform_sleep() which seem to cause issues.

in set_features(), it is only the powermanagement feature that fails (feature[0]), I'm missing some specs to see what is wrong...
Title: Re: iRiver ihp120 failed CF install
Post by: heinimuecki on February 15, 2008, 04:28:01 PM
finally i got my ipod mini2g running rockbox with
a transcend 16gb cf 133x card again  :D

followed these

http://www.rockbox.org/twiki/bin/view/Main/CFModGuide

instructions, downloaded this build: 20080215-080215

and compiled both the bootloader and the firmware under cygwin

and now it works again as far as i can see now.


i love rockbox  ;D
Title: Re: iRiver ihp120 failed CF install
Post by: scharkalvin on February 15, 2008, 07:04:04 PM
I edited the wiki http://www.rockbox.org/tw.../bin/view/Main/CFModGuide
to add my experience with the Gigabeat F CF conversion.
Title: Re: iRiver ihp120 failed CF install
Post by: 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?  I do not have Linux and even if I did, would not know the first thing about compiling, etc.

I would like my new CF enabled iHP-120 to be recognized by the PC when plugged in while on, etc...  I would also like to try my Transcend 32GB card again with the modifications in place to see if the ATA -80 error pops up again or if the features set and sleep timer hacks solve that issue.
Title: Re: iRiver ihp120 failed CF install
Post by: Llorean on February 16, 2008, 06:26:49 PM
While this solution may work in some cases, it is imperfect. I believe a solution suitable for the official version is being investigated. Hopefully it will also allow a wider use of cards.
Title: Re: iRiver ihp120 failed CF install
Post by: petur on February 18, 2008, 03:16:47 AM
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 ;)
Title: Re: iRiver ihp120 failed CF install
Post by: magmaniac on February 18, 2008, 10:48:48 AM
(Note: My Wiki name is FrankOtto.)

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 ... ]

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.)
Title: Re: iRiver ihp120 failed CF install
Post by: petur on February 18, 2008, 11:12:08 AM
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.
Title: Re: iRiver ihp120 failed CF install
Post by: Davide-NYC on February 18, 2008, 12:02:39 PM
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.
Title: Re: iRiver ihp120 failed CF install
Post by: magmaniac on February 18, 2008, 12:49:07 PM
Frank: to get rid of the freeze, just comment out the sleeping = true;

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)
Title: Re: iRiver ihp120 failed CF install
Post by: petur on February 19, 2008, 03:12:21 AM
final answer: we suffer the same problem as ipod nano:

When perform_soft_reset() is done, the next read seems to fail - in my case all reads seem to fail.

As for the shutdown problem: I never saw that, but I see that shutdown occasionally takes longer to perform, none of my fixes ever corrected that. What did you do to prevent that?
Title: Re: iRiver ihp120 failed CF install
Post by: magmaniac on February 19, 2008, 06:03:46 AM
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.

I ran battery benchmarks too (constant playing of MP3 320kb/s, stock battery, 3years old), and the runtime that battery_bench.txt reports is 13:51 with the HD and 18:06 with the CF... but scrap those numbers. In the HD case I'm pretty sure that the last lines of the battery_bench.txt were lost due to forced shutdown, while in the CF case I shut the device down voluntarily (it had been reporting "battery level 0%" for some time). Also, in the HD case I had used USB mode briefly before the test, which puts the HD benchmark at a slight disadvantage.

But! I can shift and scale those numbers until the curves coincide ;D
And this tells me that the mentioned disadvantage of the HD amounts to roughly 20 minutes, and that the battery drains approx. 14% slower with CF instead of HD. See attached PDF.
Title: Re: iRiver ihp120 failed CF install
Post by: magmaniac on February 19, 2008, 06:21:16 AM
As for the shutdown problem: I never saw that, but I see that shutdown occasionally takes longer to perform, none of my fixes ever corrected that. What did you do to prevent that?

petur, I always get the shutdown problem when setting "sleeping=true" is disabled.

shutdown_hw() contains this loop:
Code: [Select]
while(ata_disk_is_active())
   sleep(HZ/10);
and ata_disk_is_active() simply returns !sleeping. The only place where sleeping=true gets set is in ata_perform_sleep(). If you disable this entirely, then the loop in shutdown_hw() cannot finish. Eventually another thread forces the unclean shutdown.
Title: Re: iRiver ihp120 failed CF install
Post by: petur on February 19, 2008, 09:07:01 AM
interesting....so only disabling soft_reset should fix all this... to be tested :)
Title: Re: iRiver ihp120 failed CF install
Post by: petur on February 19, 2008, 05:13:17 PM
hrmpf... shutdown was ok, and then one of my last tests there was a freeze :(
Hard to reproduce, I tried a lot of stuff afterwards without freezing.

NOTE: cleaned up my code and removed some stuff that should have been removed before stability testing. So far no freezing and normal shutdowns....
Title: Re: iRiver ihp120 failed CF install
Post by: magmaniac on February 21, 2008, 05:29:19 AM
Using the latest ideas of petur, I re-enabled ata_perform_sleep() but disabled perform_soft_reset() as on iPod nano. No freezes in the last two days (normal usage for several hours: playing, stopping, idling, skipping, ...). Looks good. :D
Title: Re: iRiver ihp120 failed CF install
Post by: Davide-NYC on February 21, 2008, 11:12:04 PM
I find the ata.c_01-ata80+freeze.patch generally unstable. I get a lot of freeze ups or severe slow downs. This occurs too frewuently to start doing detailed bug reports. It's pretty broken. (sorry)  :-\
Title: Re: iRiver ihp120 failed CF install
Post by: petur on February 22, 2008, 03:42:01 AM
Really?
Does the patch disable perform_soft_reset() in ata.c ?
(don't know if there were multiple versions of the patch - I just looked at the one currently in the wiki)
Title: Re: iRiver ihp120 failed CF install
Post by: magmaniac on February 22, 2008, 06:28:03 AM
Does the patch disable perform_soft_reset() in ata.c ?
(don't know if there were multiple versions of the patch - I just looked at the one currently in the wiki)

petur: No, there's only one version of this patch. It is rather small, it just skips the failing powermanagement set_features call, and activates the iPod nano workaround in perform_soft_reset unconditionally.

Davide-NYC: I'm sorry to hear that it's unstable for you, I didn't have a single freeze with this version yet. Just for completeness: Did you do your testing with or without the additonal RTC mod? (but I doubt that these mods interact)

Maybe we have to face the fact that different cards show different issues... :-\
Title: Re: iRiver ihp120 failed CF install
Post by: scharkalvin on February 22, 2008, 07:33:33 AM
People, please post your results on the wiki.
State what patches you included, which adapter card, which CF card, which player and your results.

Title: Re: iRiver ihp120 failed CF install
Post by: petur on March 09, 2008, 10:52:49 AM
note: current SVN should now be compatible with CF
Title: Re: iRiver ihp120 failed CF install
Post by: ShinyFalcon on April 18, 2008, 12:39:59 AM
I need some clarification, as I'm not having any luck searching through the forums, but does this mean that the ATA -80, etc issues have been solved? I'm interested in as to what was causing the problem. Will any CF cards work on the H120 now?
Title: Re: iRiver ihp120 failed CF install
Post by: petur on April 18, 2008, 03:39:18 AM
yes, but you still need a patched bootloader (see the CFMod wiki page)

afaik, the original firmware does not like the CF, however...
Title: Re: iRiver ihp120 failed CF install
Post by: crv1 on September 20, 2009, 10:52:40 AM
Hello friends my hdd died so I bought PQI x150 CF card but it does not work with Rockbox error pops up ata error -80 can you give me a bearing on the improved soft patch ata.c?