Support and General Use > Hardware

Rockbox with 128GB and 256GB SSD drives (iAudio X5 and others)

(1/3) > >>

sixthofmay:
I searched here and the IRC archives and found that stock Rockbox supports 28bit addressing and that to support > 128GB that LBA48 support needs to be compiled into Rockbox, and also possibly into the bootloader. I also found that for your PC to see > 128GB via the USB connection, that the USB to ATA bridge chip in the player must support LBA48. Not having a LBA48 bridge, it is possible to compile in support for multiple partitions, transfer files to the partition visible to your PC (?), and then use the copy/paste functions within Rockbox on your player to get your files into the other partition(s).

Someone correct me if the above is incorrect.

In my case, I would like to get a 128GB or 256GB SSD into a Cowon iAudio X5. I currently run one with the Martwin adapter and 32GB Kingston compact flash and I've filled it up with FLAC rips. I like flash memory because of the greatly extended runtimes I get.

Photofast has recently released 128GB and 256GB 1.8" 5mm thick PATA IDE 50 pin Toshiba style interface SSDs (they also have zif versions):
http://www.photofastuk.com/engine/shop/category/G-Monster+1.8+50pin+IDE+V4

According to the wiki, the X5 uses a CY7C68310 USB to ATA bridge:
http://www.rockbox.org/wiki/pub/Main/DataSheets/CY7C68310.pdf

In the datasheet I found on page 4 "ATA/ATAPI-6 specification-compliant–provides support for mass storage devices larger than 137GB", which suggests to me that the X5 does indeed have LBA48 support, so multiple partitions wouldn't be needed. Correct?

To use the 128GB SSD, it should work with the stock Rockbox build.
To use the 256GB SSD, a X5 Rockbox build with LBA48 support would be needed.
Correct?

I would like to get 256GB into the X5, but have no experience with creating Rockbox builds. I do have programming experience on the PC and various microcontrollers, and I'll do the necessary research and reading, but does anyone have any tips? Especially about if the bootloader needs to be modified. I don't want to brick my X5...

My starting point in the learning curve:
http://www.rockbox.org/wiki/BigDisk

torne:
Yup, all looks right :)

Building Rockbox is not difficult (there are step-by-step instructions on the wiki) and enabling LBA48 is a one line change.

I don't think you can brick the X5, at least not without really trying to. The built in bootloader has a USB mode which can be used to recover from a bad Rockbox image or Rockbox bootloader.

sixthofmay:
Ok thanks for the info, and a big thank you to all the developers of Rockbox. What you all have created is mostly magic to me and Rockbox has greatly expanded my portable listening experience. :)

After much reading and some hair pulling (newbie figuring out vmware, linux, svn usage and compiling, and the somewhat undocumented scramble command for making the bootloader file work), I have a 256GB Photofast SSD working in my X5 using #define HAVE_LBA48 in iaudiox5.h.

But I'm having an issue with disk spindown. After it spinsdown, it takes 18 seconds to spin back up should I select a different audio track from the file browser or skip to the  next track. Interestingly, playback of a whole album folder is without any pauses between tracks or within songs.

So the issue seems to happen when it's spundown and starting a track from the file browser or skipping to the next. I have watched the buffers on the debug screen while playing, and I can see that it refills the usefl buffer immediately when it gets low. So something different is happening when spinning back up from the file browser, than when spinning up to refill the buffer.

Also the issue happens on just navigating folders if directory caching is disabled. It also manifests itself on shutdown, which takes 18 seconds before it'll continue the shutdown. Sometimes it hits the 20 second shutdown time limit (saw that limit in one of the source files), and Rockbox forces a hard shutdown (I know this because a loud pop occurs when an ungraceful shutdown happens).

And finally I suspect it's happening on bootup, as the bootloader hangs (after displaying the battery voltage) for 18 seconds. It's not really an issue since I only boot up once a day typically, but may be another clue in solving the puzzle.

If you want to easily experience the issue (with a CF or SSD modded X5), disable directory caching, set the spindown time to 3 seconds, and wait more than 3 seconds when navigating between folder levels or starting songs playing. Painful it is.. ::)

Anyway... I have partially fixed it by setting the spindown to 254 seconds, but would like to completely disable spindown.

BTW, I have the same issue on the two X5 compact flash conversions I've done (Kingston Elite Pro 16GB and 32GB). I set spindown to 254 seconds with directory caching enabled on both those and it was tolerable because the delay was only 5 seconds.

I'm posting all this not to criticize, but with the hope that it'll help track down the issue, what with more and more folks doing these sorts of upgrades. :)

After studying the IRC chat archives, it looks like adding this to my iaudiox5.h would disable spindown:
#define HAVE_FLASH_STORAGE

I'm I on the right path?

Edit:
Ok I tried it.. that was ugly. Bunch of errors during the compile..
I use Notepad++ for editing and had it show all characters to ensure only a LF was added at the end of the line.

If I take the #define HAVE_FLASH_STORAGE line out, then make clean, run the ../tools/configure again selecting 30 for the X5 and a Normal build, then make, it builds ok (minus the change I want).

As a sanity check, I added the #define HAVE_FLASH_STORAGE back in and repeated the above, and it repeated back all the errors.

Here's a sample and the full output is in the attached file:
CC apps/settings.c
CC apps/settings_list.c
/home/user/rbt/apps/settings_list.c:861: error: `LANG_MP3BUFFER_MARGIN' undeclared here (not in a function)
/home/user/rbt/apps/settings_list.c:861: error: initializer element is not constant
/home/user/rbt/apps/settings_list.c:861: error: (near initialization for `settings[66].lang_id')
/home/user/rbt/apps/settings_list.c:861: error: initializer element is not constant
/home/user/rbt/apps/settings_list.c:861: error: (near initialization for `settings[66].default_val')
/home/user/rbt/apps/settings_list.c:861: warning: missing initializer
/home/user/rbt/apps/settings_list.c:861: warning: (near initialization for `(anonymous)[0].<anonymous>')
/home/user/rbt/apps/settings_list.c:861: error: initializer element is not constant
/home/user/rbt/apps/settings_list.c:861: error: (near initialization for `settings[66].<anonymous>')
/home/user/rbt/apps/settings_list.c:861: warning: missing initializer
/home/user/rbt/apps/settings_list.c:861: warning: (near initialization for `settings[66].<anonymous>')
/home/user/rbt/apps/settings_list.c:861: error: initializer element is not constant
/home/user/rbt/apps/settings_list.c:861: error: (near initialization for `settings[66]')
/home/user/rbt/apps/settings_list.c:873: error: `LANG_SPINDOWN' undeclared here (not in a function)

Edit2:
Ok this was conflictng:
#define HAVE_DISK_STORAGE

After I removed it and left the #define HAVE_FLASH_STORAGE in place, in compiled fine.
I guess you can't have both flashdisk and harddisk in the same X5 (duh..hehe).

Alas... it did remove the Disk spindown option in the settings, but it has no effect on the topic issue, and actually seems to be using the default 5 seconds to spindown.

I'm going to bed...

(Mods: if this isn't the appropriate forum for this thread, please move it)

pixelma:
I can only say that I have no problems with a 128GB SSD (also Photofast series) in my M5 which is the same as the X5 in this regard (and my brother is using a 64GB SSD in his X5 without a problem). Disk access is fast enough even on track skip and when accessing the file browser after a while so that I deliberately turned dircache off. Since I'm mostly using flac now, re-buffering needs to happen in every track and on every manual track skip usually (because a common flac file is bigger than the 16MB RAM these Iaudios have) and it's quick for me.

As you found out defining HAVE_FLASH_STORAGE doesn't help you and just hides the menu setting. With the above said, I don't know what's going on for you and it's curious that you see the same on two CF-modded X5s.

Could you state the exact revision number you based your build on? If you have any other modifications except LBA48 support, tell us too. It could also help if you post your config.cfg (you can find it in the .rockbox folder), in case you use some setting that cause the delays for you which I don't use.

sixthofmay:
Here are the builds, and I just retested the CF ones (with settings at maxpain, ie. dir cache off, 3 sec spindown):
X5 16GB r19569 delays 2 seconds on spinup, installed with rbutil
X5 32GB v3.4 delays 5 seconds on spinup, installed with rbutil
X5 256GB r25335 delays 18 seconds on spinup, manual install, Rockbox and bootloader built with the VMWare development image, no mods except the LBA48

config.cfg contents from the 256GB when at maxpain:
# .cfg file created by rockbox r25335M-100325 - http://www.rockbox.org

volume: -35
bass: 4
treble: 10
backlight timeout: 120
backlight timeout plugged: 120
idle poweroff: 60
battery capacity: 1100
volume fade: off
disk spindown: 3

With HAVE_FLASH_STORAGE defined and HAVE_DISK_STORAGE not defined, I noticed that during playback, when the buffers needed to be replenished, the 18 second delay occurred each time. Also the antiskip buffer menu item was gone. I searched the sources for both those defines and the behaviors I observed kind of made sense.

So I removed the HAVE_FLASH_STORAGE and put back the HAVE_DISK_STORAGE in iaudiox5.h.

Lots of searching/reading the sources and IRC chats led me to these keywords:
ata_sleepnow
call_storage_idle_notifys
ide_power_enable
ata_perform_sleep
storage_enable
HAVE_ATA_POWER_OFF
ata_power_on
poweroff
sleeping

On a hunch that powering up the SSD is what was taking so long, and that sleep mode was working ok, I commented out the HAVE_ATA_POWER_OFF in iaudiox5.h.

So the only two changes for the 256GB SSD in iaudiox5.h are to add the #define HAVE_LBA48, and comment out the #define HAVE_ATA_POWER_OFF.

And the result is that all the issues (except slow boot) are gone. Shutsdown in about 2 seconds now too. :)

I retimed the hang on boot, and it's actually 18 seconds from the moment of power on, and about 16 seconds after it hangs on the battery voltage display. I also see an 18 second delay when plugging in the USB cable from the PC until the X5 says Connected (and the drive letter shows up about 5 seconds later).
Edit: I wanted to add that the bootloader flashing process did have a worrisome long delay before it began, and yeah 18 second delay sounds about right. I also noticed that when plugging in the AC adapter to charge it takes, guess what, 18 seconds before the display says Charging.  ::)

Which all tells me that this SSD takes 18 seconds to power up. It's probably doing a power on self test or something.., and the large amount of flash onboard takes time.

So the slow bootloader issue I don't think anything can be done, but I'm sure happy to have solved the usability issues! :)

Here's my final config.cfg file contents:

# .cfg file created by rockbox r25335M-100328 - http://www.rockbox.org

volume: -35
bass: 4
treble: 10
backlight timeout: 120
backlight timeout plugged: 120
idle poweroff: 60
battery capacity: 1100
volume fade: off
disk spindown: 3
show filename exts: on
dircache: on

Note I did leave dircache on as it does make it slightly speedier browsing (instead of just fast, it's instant).
Spindown at 3, since in ata.c it looks like it does invoke the sleep function from this setting, and the SSD has no apparent delay waking up from sleep.

When I get a chance, I'm going to make a build for my 32GB CF X5 without the #define HAVE_ATA_POWER_OFF and see if that eliminates the 5 second spinup delay.

Navigation

[0] Message Index

[#] Next page

Go to full version