ipod6g was configured with SECTOR_SIZE of 4096, but this ATA driver
unconditionally translated these to 512B operations on the actual
storage device.
Rockbox's storage layer already has robust support for "logical sectors
larger than physical storage sectors" through use of
MAX_LOG_SECTOR_SIZE. So switch to that mechanism, allowing the ipod6g
ATA driver to be simplified.
If we want to support drives with physical sector sizes > 512B, then
we need to port the MAX_PHYS_SECTOR_SIZE logic from the primary ATA driver.
Additional changes:
* Simplify MWDMA/UDMA selection logic
* Report CE-ATA mode in debug menu
* Use LBA48 commands only if drive is over 128GiB.
* Drop default sleep/poweroff time from 20s to 7s (matching main ATA driver)
Finally, the bulk of the changes are the first phase of a badly needed
style cleanup that made reading this driver a lot harder than it should
be. I intend to split this into a separate patch.
Change-Id: I2feca9fd319c8d6cfb3c2610208970428d2fa947
I'm 98% sure that the "byteswapped" value I saw was due to another bug
(bad PIO timings on ipods leading to data corruption) and none of the
growing pile of identify device data files that I have include the
backwards one.
Change-Id: Iea47b7419b120a3c8a282b2e3a8f65b8965356ce
The iPod 4g and color always ignored the very first
button press after booting, i.e. you needed to either
press another button or scroll for a bit first.
Not sure whether any other PP iPods exhibit the same
behavior, although it is not reproducible on an iPod
video.
This patch basically copies the code from FS#5230
that fixed unresponsive buttons whenever the HOLD
switch was turned off (committed as a5961c944b).
Change-Id: I8d3444094e5d000e0f8e30e39a23f054abeeb0f5
Basically, there are weak aliases for all possible IRQ handlers,
pointing at a NORETURN function. GCC complains that the aliases
don't have the same attribute, but that's actually what we want.
Change-Id: I7f877e00193ed457589c8442db82e93ddea0d60a
The flag would apparently make hardware accelerated
rendering mandatory. SDL2 will still attempt to use
hardware acceleration, if the flag is missing.
Change-Id: Icfdcad90591d2a5003a1540f2a669c7e54dcfc3b
The 12K-per-thread necessary on arm64 linux systems caused an
unnecessary 180K increase in RAM usage on the hibyos hosted ports. So
back off to the old size unless we know it was needed.
Change-Id: I1e25417433052027ae02a51903b0f5245819db44
This allows callers to see if it's safe to enqueue something instead
of triggering a panic if the queue turns out to be full.
Change-Id: Idb887e7a47cfbfef998f27d9d85090f3c0ed2230
Due to the heisenberg principle, we don't want to check the battery
level when the ATA drive is "spun up".
Unfortunately some ATA devices *cough most SD adapters cough* don't
support mandatory ATA power management commands like flushing caches and
(safely) shutting down so we have to leave them "spinning".
This leads to us never updating our battery status with these
out-of-spec devices. Work around this issue by having is_active() always
return false if that's what we have.
Change-Id: I629f3fdbc7e5cffb0a4d546c80cb5fca8529c0e6
bootloader passes the player version to rockbox for LCD init changes
Credit ZappBranigan2972 on forums for original changes
Credit Bilgus for devicedata additions
Change-Id: Ia2ca493edef49b7457e84dc19b05397dc915fa5a
lcd_scroll is include in a weird manner and includes need to go in
scroll_engine.c instead and still be blocked from bootloaders
Change-Id: Ic99d123f7d428d511380c7064a9453de56218a17
This option is especially useful for theme creators that want to create themes with lockscreens. When text is scrolling, it is breaking the lockscreen so setting this option to true prevent this. Text will continue to scroll normally in all other contexts.
Change-Id: I194f6837217881d50f567a775b81d0b422caf35c
Set number of FSR edges required for DPLL/ASRC lock
Set DPLL bandwidth larger
Both should help prevent dropouts, especially with
sample rates >=96khz
Credit to ZappBranigan2972 on the forums
Change-Id: I55a90d44ac7fcec5894377e32cdadad66bb05610
* Create new 'sector_t' type alias:
* uint64_t for all targets with HAVE_LBA48 or HAVE_SDUC
* unsigned long for the everything else
* Alter all storage APIs to use sector_t instead of 'unsigned long'
* Alter Volume/Partition/storage info structures to use sector_t
* Disk cache converted to sector_t
* ATA Core:
* convert to using sector_t for sector addresses and drive sizes
* Always fill out upper 16 bits of LBA48 addresses
* IDENTIFY INFO is fixed at 512 bytes, not SECTOR_SIZE
* USB mass storage:
* convert to using sector_t for sector addesses and drive sizes
* Implement READ_16/WRITE_16 for LBA48 addresses
* Convert FAT code to use sector_t for all sector references
* output_dyn_value() now accepts int64_t instead of 'int'
* Corrected "rockbox info" to work for (MULTIVOLUME & !MULTIDRIVE)
* Better reporting of disk and (logical+physical) sector sizes in debug info
* Detect SDUC cards and report on storage debug_info screen
To-do: SDUC
* Refactor SD core to remove duplicate code in every driver
* Card probe and init state machine
* Implement core SDUC support
* SD2.0 needs to be 2.0+ (fixed for jz47xx and x1000)
* Host and Card ID (ACMD41)
* 32-bit addressing for all read/write/erase operations (CMD22)
* ADD SDUC to target device drivers, defining HAVE_SDUC as appropriate
Change-Id: Ib0138781a0081664d11511037685503df1b93608
Making line-out default output should allow detection to work
correctly. Headphone detection should work whether or not
headphone is currently the active output due to the
low impedance (relatively) of the headphones. Line-Out sinks
will likely be high impedance, so we need the output
as a pull-down for detection.
Debounce detection to prevent false triggers due to voltage swings
during playback.
Change-Id: If5e497d900330f64d0f49a135e953ee6b0499668
...So just move that call into storage_init and be done with it!
Hopefully this doesn't cause any functional regressions.
Change-Id: I08700fbd1613638606a23ee3a0c2149123c2c24a
the define for HOME_DIR has a single slash for native
hosted does or doesn't but native always has 2
Change-Id: I2ff546da8e422feb04027de164caf3747f6d9355
(It would be interesting to try and work around this but it would have to
be done on a per-target/platform basis)
Change-Id: I7a27199082998420fea3c6abbbf5f3c526ccaec4
* If CF Timing mode is specified, treat it as SSD
(some SD adapters don't report CFA supported but but report this,
and _all_ microdrives seen do not report this)
* If CFA compliant and CF power level 0, treat as SSD
Change-Id: Ia8c88b4636af9bae75fbd1c253d8b2b01bca6584
The SSD detection heuristic is flawed, and when it fails
(due to very crappy CF->SD adapters) we end up corrupting things.
So let's give up a slight amount of performance on the original hard
drives (which are aging out anyway) in favor of guaranteeing safety.
Change-Id: Id92583a6b9ae6ec543b91b3e0f8f28b57ac38cb0