summaryrefslogtreecommitdiff
path: root/firmware
AgeCommit message (Collapse)Author
2021-04-09x1000: Trim unused cache functions from the SPL buildAidan MacDonald
Change-Id: Ib645d8ff10cfc672de8ac2debaa17d7dd50dfafb
2021-04-09Revert "sound: add sound_numdecimals() to round out the sound setting ↵Aidan MacDonald
query API" There is already a sound_numdecimals() function, according to Git it's been around since 2005. No need to add another one :). This reverts commit 92a0ab8789c622afecc47f3b399eda8abf26ee9e. Change-Id: I533ebf1763dd7a27346842982493d4550f05ad7c
2021-04-08erosq: Switch to 32-bit PCM output, and do volume scaling in driverSolomon Peachy
Should improve audio output quality, especially at lower volumes. Change-Id: I31c38f05fe4b554b092511f0fe7aaad9f346f6c5
2021-04-08alsa: Fix an #ifdef typo in 54fcb907c1Solomon Peachy
HAE_ALSA_32BIT -> HAVE_ALSA_32BIT Change-Id: Icf375d42f6b20e8393b6ffe6d23b3ac96abb571b
2021-04-08alsa: instead of per-target tests, use HAVE_ALSA_32BITSolomon Peachy
Affects all Sony NWZ (linux) and the fiio m3k linux targets. Change-Id: I2fcf121bd026103d2b72332a5a52cc2b5e93949f
2021-04-08ErosQ: fix panic on startup caused by ad55da5fSolomon Peachy
It turns out #include "settings.h" pulls in rbpaths.h which ends up remapping open() to the path-mangling rockbox open(). By defining RB_FILESYSTEM_OS we prevent the remap. My mistake for not testing this before committing! Change-Id: I2978eb7b413693c4cb887b7ac7b2457780db7d25
2021-04-08ErosQ: Set Line Level Output volumeDana Conrad
With a full-scale 440Hz tone, the line out voltage measured approx. 5.8Vpp at the 0 setting. WAY too hot! (9 dBV, in fact) For 0.894Vpp (-10 dBV - consumer devices), -18 appears to be about right for line level signals, but for "pro" equipment a different level may be desired. Therefore, the user to cap the line out level by re-using the global volume limit setting. Change-Id: I0d1d6482ea95537e9a2d00884eaee2713771c614
2021-04-07MIPS: make sure to fill 'jr' branch delay slot with 'nop'Aidan MacDonald
Inline assembly in RoLO and the FiiO M3K bootloader used 'jr' to jump to a newly loaded Rockbox binary, but incorrectly left the branch delay slot open. That gives GCC an opening to place illegal instrutions, etc, which might cause an unhandled exception. Change-Id: Ia7a561fe530e94a41189d25f18a767c448177960
2021-04-07FS#13272: Fix up volume_limit to respect decimilaztion.Solomon Peachy
Change-Id: Ib0e5ddcd660115f156ddb545e45bbe7da42f9709
2021-04-06x1000: Improve NAND driver APIamachronic
- Proper error codes are now returned from all functions. These codes will be used by a host-side flash tool for error reporting. - nand_erase_block() was replaced by nand_erase_bytes(). The caller can't know how big an eraseblock is with the current API, so next best thing is to verify the correct alignment inside the call and reject the erase if it isn't properly aligned. - Fixed typo in nandcmd_block_erase() which would cause an SFC error to be interpreted as success. Yikes. Change-Id: Id4ac9b44fa7fc2fcb81ff19ba730df78457c0383
2021-04-06x1000: place SPL's NAND bounce buffers in DRAMamachronic
This frees up 2 KiB in the SPL's memory map, leaving more room for code. Change-Id: I01bbe2ab2905b2773a8b76d8c53e9f3d55bd040f
2021-04-06Remove a duplicate constamachronic
Change-Id: I0e6f4d609eb03155de4cd16aa98cab25f54a6681
2021-04-05fiiom3k_linux: Enable HAVE_TOUCHPAD and add in missing bitsSolomon Peachy
Change-Id: I78fa5fdb3648adfaa40f6d5f3c255666a85e2761
2021-04-04hdd1630/hdd6330: update battery capacitiesJames Buren
Ensure the default setting reflects what the service manual says the official battery capacity is. Change the ranges to reflect what replacement batteries are actually available. This range is actually much shorter in reality due to these units requiring the rarer 3 pin battery type that uses a thermistor. As such there's only one real replacement battery for each. So the HDD1630 caps out around 700 mah while the HDD6330 caps out around 680 mah. Change-Id: I2dbbba83ad2cd6e1d84e3481c4af84a06c45e16b
2021-04-01gigabeats: Fix hang on startup caused by a stack overflowSolomon Peachy
headphone ADC thread stack was slightly too small. Bump it up a bit. (it was _perfectly_ sized for the prior older toolchain+optimization flags...) Change-Id: I2ca67c2b85c54f879892a31e281d7696f893389c
2021-04-01PP: More cache invalidation fixesSolomon Peachy
Take into account the size of the pointer in the loop termination condition. Change-Id: Ib4f7625ef143149a0d691a2109bad67aece6241c
2021-04-01PP: Use CURRENT_CORE instead of IF_COP_CORE(CPU)Solomon Peachy
Use of IF_COP_CORE was mistakenly introduced as part of 89acde6af2, effectively short-circuiting multiple tests resulting in the code paths always being executed, on both cores. Use the correct macro, so per-CPU paths are handled properly. Change-Id: Id346cf759fc1b06b7d56694d7af1f469caf785a4
2021-04-01FiiO M3K: Hopefully fix the sim buildSolomon Peachy
Change-Id: If5a58a4b3913645068cee95d4553f285eb55d182
2021-04-01H10 PP Crash -- FixedWilliam Wilgus
This appears to finally fix the issue turns out the status register we were writing was only for the CPU COP cache flush wiped out the CPU cache -- Added some defines to cut down on the magic numbers Added some comments explaining such Set the address to full 20 bit address 0x1FFFFF which is then left shifted 11 internally -- somewhere around 4GB? Link explains the cache status bits https://daniel.haxx.se/sansa/memory_controller.txt Change-Id: I57b7187c2f71a5b54ce145bf3a21ed492a8993cb
2021-03-28Add M3K native to the simulatorSolomon Peachy
Change-Id: If3e877d2df189e44076631fd571cf6aa70ce6ca8
2021-03-28New port: FiiO M3K on bare metalAidan MacDonald
Change-Id: I7517e7d5459e129dcfc9465c6fbd708619888fbe
2021-03-27rk27xx: Take advantage of STORAGE_NEEDS_BOUNCE_BUFFERSolomon Peachy
(And get rid of its custom realignment code) Change-Id: Iff27d717b870d3db239310421776744ea6863373
2021-03-27Use STORAGE_NEEDS_BOUNCE_BUFFER instead of STORAGE_NEEDS_ALIGNSolomon Peachy
Enable its use in the jz47xx MIPS targets. (accidently committed g#3249 before making these changes) Change-Id: I1791946f632901f0c7a94b04b009671aa0d71717
2021-03-27xduoox3ii: Wrap the remote key detection in USE_REMOTESolomon Peachy
Makes it straightforward to disable for debugging or defective hardware Change-Id: Ie72786f6e9eabf396a05ef8a02e422c34c97691a
2021-03-27Have FAT filesystem respect storage buffer alignment on readsAidan MacDonald
This is just a minor cleanup of Solomon Peachy's code, and using per-filesystem buffers instead of a single static buffer. Tested and working on the FiiO M3K. Change-Id: I3c19e8cc24e2f8aa07668c9d1c6d63364815050a
2021-03-25usb: implement macro for initializing USB stringsJames Buren
This uses the new unicode string literal feature that is available now to greatly simplify the initialization of these special string types. This makes them much more readable at a quick glance. Change-Id: Iad8b49aa763486608e3bb7e83fb8abfb48ce0a7b
2021-03-25rk27xx: Get rid of duplicate STORAGE_WANTS_ALIGNSolomon Peachy
Change-Id: I278d42858cc33da3710c8ca8f42d14c6d57509ca
2021-03-25build: Get rid of suplerflous '-Os' references in linker callsSolomon Peachy
We should be using global optimization flags, and -Os is already our default. Change-Id: Iaba511b2b4fa2ee0f1eb1ad28024be954f4c5f03
2021-03-25Revert "lcd framebuffer - Bugfix #2 ensure proper alignment"William Wilgus
This reverts commit 3a5c5edbf6cb3ac5e4b65fe036ca50b41fabaa89. Reason for revert:pulling in system.h breaks SDL :( Change-Id: Ied5e08de4770aa0da87c14b304480448db349423
2021-03-25lcd framebuffer - Bugfix #2 ensure proper alignmentWilliam Wilgus
-- apparenty 0x4 aligned doesn't work properly requires 0x8 alignment at least for the h10 20gb but enabled for all processors that define MEM_ALIGN_ATTR Change-Id: I11edaab183b91a6d158f1f439f173b9b699dc914
2021-03-24Revert "lcd framebuffer - Bugfix ensure proper alignment"William Wilgus
This reverts commit ffee661ab70e9622a05c9c2f24ecf474dad8f042. Reason for revert: <INSERT REASONING HERE> iAudio M5 `IRAM' overflowed by 48 bytes Change-Id: Id808a72c6eacabc562d53eac8acd36b45f678a97
2021-03-24lcd framebuffer - Bugfix ensure proper alignmentWilliam Wilgus
-- apparenty 0x4 aligned doesn't work properly requires 0x8 alignment at least for the h10 20gb but enabled for all arm processors assign the default framebuffer to the default_vp as well Change-Id: I0b76c30f2ddb5d6d2f7c6a132e4081aee58da17b
2021-03-23Add asynchronous I2C bus APIAidan MacDonald
The driver core is based off of the i.MX233 I2C implementation and should work on any platform. Change-Id: I3b9c15e12a689ef02a51c285be08d29d35e323dc
2021-03-23Call powermgmt_init_target() before polling the batteryAidan MacDonald
In the old position of the call, the first battery reading would be made before initializing the target's power management code. If the target needs to initialize before giving a battery reading, then the first reading would be wrong and the power thread might inappropriately shut down based on a false zero reading. The new position avoids forcing special-case logic onto the target power management code. Change-Id: I483cfabe30c6881d80a1094fd526fa0065523d19
2021-03-22Add new audiohw capability: POWER_MODE_CAPAidan MacDonald
This allows the user to make use of the DAC's power-saving abilities. The two modes are "high performance" and "battery saver". This feature is supported by the AK4376 DAC in the upcoming FiiO M3K port. The setting is only a manual toggle right now, but in the future it could be hooked up to the battery level (via another setting) so it can be toggled automatically when the battery gets too low. Change-Id: I482af6e2f969fcbdeb3411bd3ff91f866b12d027
2021-03-17xduoox3: In ROLO, allow the ADC to be shut down.Solomon Peachy
The hang we were seeing was due to IRAM wonkiness. that's fixed. Change-Id: Ie33a1110639fe51ad540e4e172e41f22f3bf875b
2021-03-15FS13274: Bump max battery capacity for iPod Videos to 3000mAhSolomon Peachy
3rd party batteries can go this high for users that have performed SSD mods. Change-Id: Icb34ce08e5ea345bc0fdb555bd3fd8ea9cf9e0d9
2021-03-14sound: add sound_numdecimals() to round out the sound setting query APISolomon Peachy
A necessary prerequisite for fixing FS#13272 Change-Id: Ice288af39a4f08bea376f920d855932bdac69a52
2021-03-12ATA: Increase delay to power-off when device doesn't support ATA SLEEPSolomon Peachy
The storage subsystem aggressively issues SLEEPNOW events when idle and power off happened a fixed 2s later. This turns out to not be enough time for FC1307A (eg iFlash) adapters to flush outstanding writes. So, when we detect a lack of PM support, increase the poweroff delay to 5 seconds to compensate for not being able to issue the ATA SLEEP command. Hopefully this is enough time. If not, we will have to re-disable PM entirely when we detect these popular adapters. Thankfully that is now just an #ifdef away. Change-Id: I4112b9acb965973d81f70483bd9d595461c7301c
2021-03-12ipod6g: increase max battery capacityCaleb Connolly
It's possible to get up to 3000mAh batteries for this device, although it requires that you use an iFlash adapter to make enough space. Signed-off-by: Caleb Connolly <caleb@connolly.tech> Change-Id: I0d0d02aa30caffcae4a7e8c805516a1266eef359
2021-03-11ATA: When device doesn't support powermgmt, only gate ata sleep command.Solomon Peachy
The FC1307A ATA->SD chipset (used by the common iFlash adapters) doesn't support mandatory ATA power management commands, leading to massive data corruption if they were issued. A workaround was identified (54629073ae) that basically disabled all of rockbox's power management code for these adapters, which extends well beyond the specific ATA commands issued. This patch moves the gating test to the issuance of the actual SLEEP, so that the rest of rockbox's PM code can function as intended. This allows the device to get powered down when idle, yielding potentially significant improvements in battery life. Change-Id: Ia13e2405243fe5efe6f68c3a549ab4933567790b
2021-03-10xduoo_x3ii: Improvements in the meymappings!Solomon Peachy
* PREV/NEXT now swapped so they do what is expected in most contexts * List and setting context retains prior behavior * Enable the ADC that reads the headset remote and map the keys. * As ADC-based remote "events" arrive as press/release pairs, delay the button release. Change-Id: I22d4eac3bfe1573b50eca795cf377bdafdeb5336
2021-03-10fiiom3klinux: Fix a build warning.Solomon Peachy
Change-Id: I1355c87d17376422d54b259db2078ea5f886bedb
2021-03-10hosted: Consolidate the code that polls the battery charging statusSolomon Peachy
affects all hiby targets, fiiom3k, and ibasso dx50/dx90 As well as deduplicating a small pile of code, this also implements hysteresis so we're not doing a sysfs read/lookup multiple times back-to-back every time the power management tick fires. Change-Id: I2f7672acbb36341becf67e07960c24c681270d09
2021-03-10usb_hid: switch Battery Strength to use feature reportsJames Buren
This means we will no longer send them routinely and instead rely on the HID driver to send them when the host requests it. This also moves the reporting out of the power management code where it probably did not belong in the first place. Change-Id: I9c8420e81897f1f6caaa55ffacc7525589f1ef75
2021-03-09Move MIPS cache management functions to IRAMAidan MacDonald
Previously these were placed in DRAM, which is overwritten by RoLo when it loads a new image, but RoLo must call commit_discard_idcache() after loading the image. Change-Id: I5dcc4ca711b774166f83c668695edbcabfab2604
2021-03-06usb_hid: add support for Battery StrengthJames Buren
This allows rockbox to report its battery status through the HID Battery Strength method that is available through the Device Controls usage page. Change-Id: Ia7a7dd9b9d476dd9df5a5f5becabc5ae823e9a89
2021-03-04ata: Make ata_disk_is_active() only special-case powermgmt-less devices.Solomon Peachy
SSDs that respect powermgmt commands should be treated the same, as the powermgmt commands are an important part of ensuring it's safe to shut down. And greatly expand the comment explaining things. Change-Id: Ia52b99fca802f495422b5ee097390a72dbc28f61
2021-03-04Always indicate inactive ata disk if device is solid state or doesn't ↵Christian Soffke
support power management Commit 5462907 made sure that SLEEP commands weren't issued on devices that don't support ATA power management commands (e.g. certain CF->SD converters including several iFlash models). Since Rockbox waits for the disk to become inactive in shutdown_hw(), which won't happen in this case, the OS would previously stall during the shutdown process until a timeout was reached. Change-Id: I03bb05f6f6401bb8f0da5d0b76bd3f07681fdc06
2021-03-04Fix typo in MIPS cache discardAidan MacDonald
Change-Id: I6a06e5f3098324d985bd59322755cd68122ec0bf