This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#9977 - Tagcache Database Song limit of 32768
Attached to Project:
Rockbox
Opened by Brian Sutherland (rmaniac) - Tuesday, 03 March 2009, 04:10 GMT+2
Last edited by Thomas Martitz (kugel.) - Friday, 06 March 2009, 16:44 GMT+2
Opened by Brian Sutherland (rmaniac) - Tuesday, 03 March 2009, 04:10 GMT+2
Last edited by Thomas Martitz (kugel.) - Friday, 06 March 2009, 16:44 GMT+2
|
DetailsWhen running an iPod 5G player with a 240GB drive in it, any song added to the database after 32,768 have been added will not play. It lists it's play time as -2:-2 and just skips past it when trying to play. It seems the tagcache uses and int somewhere that is cutting off rockbox's ability to to support large drives with large amount of files going forward. I have attempted to change some of the int vars to long to see if I can isolate where it is. Unfortunately I do not know rockbox or c well enough to find a real solution to this issue. Since only a few people at current will need this many files I guess it should be a compile time option. Is there anyone who can work a patch for this?
|
This task depends upon
Closed by Thomas Martitz (kugel.)
Friday, 06 March 2009, 16:44 GMT+2
Reason for closing: Fixed
Additional comments about closing: Fixed in r20214. Thanks
Friday, 06 March 2009, 16:44 GMT+2
Reason for closing: Fixed
Additional comments about closing: Fixed in r20214. Thanks
would have been the most obvious line:
tagcache.c
170: short idx_id; to an int.
After compiling and running it will build the database (I erased the database files) when it commits it seems to add only to _4 and _idx. When I try to view
the database it looks like it is blank. Any ideas?
Please could you attach a patch of your database changes (and only those) at some point?
Here is a patch to up the number of files allowed in the db from 32k to more than you would ever want. This does not include anything to enable LBA48 in any targets or add a 4096 sector size like my hard drive needs. I mention this because the odds are if you need this patch you have a drive over 138GB in size.
The only short in that struct is "short tag_length" which I believe has to do with the tags within any single file.
If that is correct then 32768 should be plenty enough.
is better than long as long is 64 bits on amd64 linux so it would mess up the sim for some of us.
About this ec thing thoug, a struct member is aligned to it's size so there will be 2 bytes of padding
after the short now that the following member is an int so using "sl" will not work as then two bytes from
the int will be byteswapped with the padding bytes.
Changing the other short to int and using "ll" or placing the int before the short and using "ls" should work
in this respect, not sure if any other part of the database depends on member order or something like that though.
Artist/Track/Album/Albumartist/albumsort/title/date filled out at the minimum. With all that going on the ramcache is right around 6MB according to the debug info and so far everything
seems quite snappy. My player is a 5.5G that was an 80gb so it has 64mb of ram. One other thing I noticed is my "Disk Info" looks find but the Disk Info under debug does not seem happy with the
LBA48. I might see if I can find a fix for that.
No matter of the outcome of the RAM usage, I think the limit should at least be raised for high mem and tagcache-as-pc-app.
8713 Files
Pre-Patch:
1554060/1587296 Bytes
Post-Patch:
1667164/1700400 Bytes
Also remember I have the sort patch applied and all tracks were tagged with:
Artist/Track Number/Track Total/Album/Album Artist/Album Sort/Title/Date/Disc Number on multi disc sets.
So I guess it grew by 110KB or about 13 Bytes per song
Let's see how irrelevant this increase really is :)
I'd suggest someone checks that that 64-bit systems are still happy with the sim (and database tool), then this should go in.
#if MEMORY_SIZE <= 2
33k files [or, if possible change to unsigned,
#else
2/4M files
#endif
I don't really want to restrict (and I think on low mem they're just as restricted too due to the ram usage increase, but probably less if we leave things unchanged for them) database user which depend on voice more, or something like that.
only "waste" a couple kb's of diskpace, i vote for consistency across targets
(this also helps in case people want to generate the db externally)
BTW: The clip has the database and 2MB of RAM.