This way if there's no valid partition/filesystem we still report the
"correct" sector size out via USB.
Update the ipod5g/6g bootloaders so they do the right thing too.
Change-Id: I0d93ae7e6664f1591d8edf1c0252c586e329cd4b
Normally, we figure out the virual sector size from the filesystem info.
However, if there's no filesystem, we fall back to the hardware's
logical sector size.
Some device firmware (eg ipod5g/6g) need their partition tables set up
with larger-than-logical sector sizes; this way we can present the
"correct" sector size to maintain interoperability with the stock
firmware and make it so that the drive can still be properly partitioned
from within rockbox.
This patch adds support for DEFAULT_VIRT_SECTOR_SIZE. Nothing uses it yet.
Change-Id: Iae746a50ffc37c51abb2c9b82d3c4596f1fa7559
When enabled this allows 512n and 4Kn drives to be used with a single build.
(So far all ATA SSDs use 512 byte logical sectors)
Change-Id: I902d2318ca8abb581699c0bca68d6e3ec227d064
Only used if MAX_LOG_SECTOR_SIZE is defined
This allows a single build to seamlessly work with (eg) 512B or 4K sectors.
Change-Id: I85d2a6612afca6a1d7a3bd49c588b5745ab2b220
Comment copy was added in c647e62c as workaround for FS#11033 and no longer needed (I tested really long lines and scroll no longer throw any errors on my Sansa e200v2)
Change-Id: I96a5b26096829034692dffc2abc730ff2bdd5d9c
Increase buffer size by 368 bytes by using id3v1buf.
Limit tag size only if metadata fails to fit without limitation.
Change-Id: I82d551ac75c2e8fcb9ff0ef318445e0e6a1f8148
Basically this requires un-hardcoding SECTOR_SIZE everywhere, in
favor of using a variable containing what was reported in IDENTIFY INFO.
Note that the rest of the storage subsystem still needs to be fixed up!
Change-Id: I7f2dbd54ff2bc16b15010721e011949cbf308e12
The 'struct font' definition says:
const void *offset; /* offsets into bitmap data,
uint16_t if bits_size < 0xFFDB else uint32_t*/
However convbdf was unconditionally using 'unsigned short' without
checking bits_size. This generated a bogus table if used with an
uncapped SYSFONT due to offeset overflows. And a pile of complier
warnings.
That said, we're still capping SYSFONT at 255 chars due to space
constraints -- 14-Rockbox-mix jumps from 2.6K to 1022K if left
uncapped. Yowza.
Change-Id: I4577da08ab1633ab7abbc167523196f38c8a348a
This lets us *natively* handle varying physical sector sizes
without playing games and lying about the logical sector size.
(The original drives use 4K _physical_ sectors with 512B logical
sectors, but you have to access everything in 4K blocks...)
Achieve this by splitting the MAX_PHYS_SECTOR_SIZE code out
of the main ATA driver and re-using it.
Change-Id: I0bc615ab4562f1e3e83171a8633c74fb60c7da1f
this adds a new command %byfirstletter
%byfirstletter "custom_track" "Track A to Z" "title"
^ command ^menu name ^menu title ^subitem
need a better name for subitem btw..
this patch also allows us to tell when we are in the BFL menu
by checking customaction == ONPLAY_CUSTOMACTION_FIRSTLETTER
we then enable spelling of the letters in the menu
it spells Numeric too but that shouldn't matter with the upcoming voice patch
Change-Id: I59815f697a4ef84a8cb540783b620d15f6670e00
Fuze+, native Sonys, and some of the Zens use 2K sectoring from
the partition/filesystem perspective, even though the underlying
storage used 512-byte sectoring.
Change-Id: I247d8cae2582c63ec1d4dda0fb225b1a25c8e16a
This allows a single build to support ATA drives with (eg) 512B and 4K
logical sector sizes. This is needed because ATA drives are user-
replaceable and we don't know what could get plugged in.
* Add disk_get_log_sector_size() API (no-op for non-ATA storage)
* Mostly a no-op if MAX_LOG_SECTOR_SIZE is not enabled
* Sanity-check that storage's logical sector size is not larger
than what we're built for
NOTE: Other layers (eg ATA, FAT, etc) still need to be made aware of this.
Change-Id: Id6183ef0573cb0778fa9a91302e600c3e710eebd
* Support varying-sized logical sectors in a single build, instead
of a hardcoded SECTOR_SIZE.
* Properly truncate READ CAPACITY(10) if drive has over 2^32 sectors
And fix potential alignment issues
* Properly truncate READ_FORMAT_CAPACITY if drive has over 2^32 sectors
* Support READ CAPACITY(16)
Change-Id: I744b8629131f9ede31e1a972a6700b2244f2e798
....It's specified in 16-bit words, not bytes. So multiply it by 2.
(This hasn't been a problem in practice as everything uses 512B logical
sectors so far..)
Change-Id: I0b1abd0f6184330f0b7f5c000c5ad547038f7c95
ata_disk_is_active() behavior with SSDs has reverted, so we want to keep this.
This reverts commit ef19fa4408.
Change-Id: I29f08617285747c17a52352bd7bba4069e71cde6
* FLUSH_EXT is used if featureflag is set and we are using LBA48
(unconditionally used for CE-ATA on ipod6g)
* FLUSH is used if featureflag is set (ATA6+) or if device claims to be ATA5+
* Rename ata_disk_can_power_off() to ata_disk_can_sleep() as that is
what it actually tests for. Only use it to gate issuing the
STANDBY IMMEDIATE command.
* Restore behavior of ata_disk_is_active() to return 1 if drive is
"spinning" or powered up.
* Allow poweroff if drive claims PM support OR we are able to issue
FLUSH/FLUSH_EXT commands.
* Added ata_flush() to explicitly trigger a flush operation, and hook it
up to storage_flush() in the device shutdown path. (Flushes were
only previously used in the storage device power management path)
* After issuing all settings, re-issue IDENTIFY_DEVICE to make sure
it reflects everything we've enabled.
* Update manual section on Flash/SSD mods.
Change-Id: I6770a54ef3a87f4c47120bcb96c944a6652f1bf4
We moved to SDL2 but still had the SDL1 'sdl-config' executable
used in one place. Additionally, all comments and the help text
referenced the wrong executable name.
Change-Id: Ie2efa80d27be5f6391fc84e49e207aa2aac26e72
Attempt to change file fails due to access to uninitialized memory with negative index
Fixup for 55a5bfe7
Change-Id: I9c42f66c856c1d4b7261da5e4996efbe9597bcd4
Add ability to imageviewer to view current track embedded/folder album art
Add "View Album Art" WPS context menu item
Change-Id: I49caebd38e5e3e2910d418bbeaa5e51da0e6bd93
sizeof(...) has type size_t which is long unsigned int on amd64, and so
the conversion specifier d without length modifier isn't suitable. There
is the length modifier 'z' for size_t arguments, but this is only
available on Linux. So casting to unsigned long and using 'lu' is the
portable fix.
This fixes:
rkboottool.c:215: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’
This is just to display the frequency correctly in the debug menu and prepare
for future use of said divider
Change-Id: Ib4c80ec71b3300bdf17edf6cc590229f7640d0f5