summaryrefslogtreecommitdiffstats
path: root/firmware/export
AgeCommit message (Collapse)AuthorFilesLines
2022-04-17viewports, set flags to VP_DEFAULT_FLAGSWilliam Wilgus1-0/+2
flags were getting un-initialized memory it really didn't matter with the flags getting initialized anyway But once I added a new flag that didn't explicitly set or clear the flag at init well here we are set flags to VP_DEFAULT_FLAGS in viewport_set_defaults() add the flags variable to the default vp's set to 0 (it was already initialized to 0 by bss, make it explicit) Change-Id: I3a9a062455b4cf66d2b8c70fdf05402a5c0c091c
2022-04-16apps: Add ability to do a clean rebootAidan MacDonald1-1/+8
Allow a clean shutdown to end in either power off or reboot. Add a new event SYS_REBOOT to signal it and sys_reboot() to trigger the event. SYS_REBOOT signals a reboot request and should be listened for alongside SYS_POWEROFF events. Change-Id: I99ba7fb5feed2bb5a0a40a274e8466ad74fe3a43
2022-04-15viewports add flag to disable updatesWilliam Wilgus1-2/+3
when drwing multiple areas of the screen with other gui elements you might want to combine updates into a single screen redraw Change-Id: Ie4130366fa13e25d3d14e937257d11547dd61134
2022-04-01system: update MEM_ALIGN_ATTR for targets with CPU cachesAidan MacDonald1-2/+2
MEM_ALIGN_ATTR should take advantage of cache line alignment on all native CPUs which define it, not just ARM CPUs. (This could arguably be done for hosted targets too, but we don't necessarily know the size of a cache line there.) Change-Id: Ife9302105ea57388afd55ce31da848b00b5b1b25
2022-04-01Add path_strip_last_volumeAidan MacDonald1-0/+1
This gets the volume that the path eventually refers to by parsing the last volume specifier and returning the part of the path after it (which does not contain any volume specifiers). The initial part of the path therefore contains everything up to and including the last volume specifier. Change-Id: I9a935543256f8f22e0b8b1e3c88d4e47bd9dae8a
2022-03-27x1000: Add multiboot supportAidan MacDonald3-0/+15
Enables multiboot for the FiiO M3K, Shanling Q1, and Eros Q native port. Note this requires an up-to-date Rockbox _and_ bootloader. Usage instructions will (eventually) be found on the wiki: https://www.rockbox.org/wiki/MultibootBootloader Change-Id: Ia2da1ad6ef611e499d2fbafa93838387bc1023ba
2022-03-27multiboot: Allow searching in volume 0 for redirect fileAidan MacDonald7-0/+12
Searching in volume 0 is necessary for multiboot targets with only one drive, like the M3K/Q1/ErosQ. Without this the search code will never look at the redirect file on these targets. The search bound is configured with a setting MULTIBOOT_MIN_VOLUME, which defaults to 0, but is defined to 1 for Sansa players so they keep their old behavior. Change-Id: I6dc5cf98db4258731de2c68c3ab1182b4a4a655b
2022-03-25x1000: bootloader: add screenshot functionAidan MacDonald3-0/+3
Screenshots of the recovery menu will be useful for documentation. This can be disabled by turning off HAVE_BOOTLOADER_SCREENDUMP in the target config file if the bootloader should ever run up against max size limits. Change-Id: I62ec1e465df2ca7a8a0e78625d88b31f6c4ef078
2022-03-24x1000: bootloader: fix Linux self-extracting kernel bootAidan MacDonald1-0/+3
Basically, there's longstanding bug in Linux with self-extracting kernels on MIPS which just happened to manifest now on the M3K as a hang on boot. The fix is applied to the M3K and Q1 since they both use this type of kernel image. Change-Id: I17d2bad6eebd677cd6d2e0bf146450c71fcf1229
2022-03-24firmware: allow screendump in bootloaderAidan MacDonald2-7/+11
Enabled if target defines HAVE_BOOTLOADER_SCREENDUMP Change-Id: Idc135ef81e55d0f3eb8e7d2763d455c6455cf8fd
2022-03-24firmware: minor screendump related cleanupsAidan MacDonald1-2/+2
- Remove unused redefinitions of screen_dump() from bootloaders - Use empty do-while when screendump is compiled out Change-Id: I3ccdb0390ddaa28d8f561ff744d0db6aaef17f5d
2022-03-21Lcd save function pointer to frame buffer get_address_fn before loopsWilliam Wilgus1-1/+3
Calling multiple levels of indirection in a loop slows things down Really these need to be rewritten to take a start and end address like most of the rest of the codebase But this is safer without having test hardware in hand Change-Id: Idae7b92ee779d020ed7fcc9334e2d5a9c710e64d
2022-03-11x1000: Clarify definition & usage of RAM areasAidan MacDonald1-4/+48
Document what the symbols are supposed to mean, fixup SPL's usage of DRAM_END which should really be SDRAM_END instead. No functional changes. Change-Id: Ie85b0ee35fea8b7858891e5b9d6634eaae42c9f8
2022-03-11x1000: support new binary header in roloAidan MacDonald1-0/+3
Change-Id: I192c3d69616c39534ff329174c4d8d4a357d014d
2022-03-11multiboot: Refactor duplicated functions to a separate fileAidan MacDonald2-18/+34
The implementation of write_bootdata() and get_redirect_dir() was copied verbatim in two different places, obviously a bad thing for maintainability. This moves them to a new file multiboot.c as they are only used for multiboot. Change-Id: Id0279216e4dd019f8bf612a81d3835eff010e506
2022-03-04Add support code for dealing with U-Boot uImagesAidan MacDonald1-0/+189
Adds a loader for the legacy uImage format that is commonly used on embedded Linux systems. It verifies checksums and supports uncompressed and gzipped images. Supports arbitrary reader functions to allow the images to be streamed off any storage device, for optimal RAM use. Change-Id: I93c35f9a6f323999a22a07300e05627fabfcbd2c
2022-03-03[RESTORED!] Allow mounting of any directory as the root directory.William Wilgus3-0/+13
Provide definitions for the macros: * RB_ROOT_VOL_HIDDEN(v) to exclude certain items from the root. * RB_ROOT_CONTENTS to return a string with the name of the directory to mount in the root. Defaults are in export/rbpaths.h It's a bit much for those that don't need the full functionality. Some conditional define can cut it back a lot to cut out things only needed if alternate root mounts are required. I'm just not bothering yet. The basic concept would be applied to all targets to keep file code from forking too much. Change-Id: I3b5a14c530ff4b10d97f67636237d96875eb8969 Author: Michael Sevakis
2022-02-07RFT: convert Gigabeat RDS to threadWolfram Sang3-11/+2
This kind of reverts 7b596416bf ("Gigabeat S: Update RDS processing to use asynchronous I2C rather than thread."). However, requiring RDS to run in thread context will a) allow more upcoming features and b) remove quite some complexity from the codebase (see the diffstat here) because Gigabeat is the only user. iMX31 should be able to handle one more thread, as it can even run Linux. Change-Id: I46130034595ba66392c5417c275d036f4bd26943
2022-01-29FiiO M3K: remove volume setting on rec. screenAidan MacDonald1-0/+1
This controls the playback volume, which is not useful for the M3K because it's impossible to play back and record at the same time. Change-Id: I5b0931c22b484f3ff6441d6c88079f18ec70f7f8
2022-01-29FiiO M3K: audio recordingAidan MacDonald2-3/+9
Recording works now, although I'm sure there will be a few things that need fine-tuning. A major issue is that writing to the SD card creates noticable interference, which happens on the original firmware too but seems worse under Rockbox. (Since Rockbox waits until RAM fills up before writing data, the interference will only be heard on >50 MiB recordings.) Change-Id: I5561dd9668c3bdd34e92f34ef50848aef8c0b7eb
2022-01-16audiohw: avoid magic numbers for DAC power modeAidan MacDonald2-2/+8
Define proper symbolic constants for power mode. Also allow targets to define the default power mode setting. Change-Id: Ia07cf854dce47d0a6aa88e067471f1ff9fbc45fb
2022-01-16x1000: internal codec audio driverAidan MacDonald2-0/+191
Change-Id: I2eb551ec6b593951c33ae6b93df2a23dc6612c43
2022-01-16x1000: core PCM recording supportAidan MacDonald1-0/+5
Change-Id: I71883272cc3bffadc1235b0931c3f42bb38e4c1e
2022-01-09axp-pmu: adc refactorAidan MacDonald1-3/+1
Remove the battery power ADC since it's not used right now, and seems to fluctuate too rapidly to be of much use. Change-Id: If115e4e3ce14d4c18ce899f5a889f7f99ab66489
2022-01-09axp-pmu: clean up charge current settingAidan MacDonald1-1/+1
Change-Id: Ifac30f728887c376a83052c826b4bb6a98bbd27a
2022-01-09Revert "AXP PMU rewrite (again)"Aidan MacDonald3-439/+151
This caused LCD problems on the ErosQ, where the screen would go white until being put through a sleep/wake cycle. The exact reason for this isn't obvious, but the problem didn't exist prior to the AXP driver rewrite. The two dependent changes, 42999913ba - x1000: Increase USB current limit to 500 mA at all times 90dd2f84a9 - x1000: Correctly limit USB charging current ended up bringing the USB charging situation back to where it was prior to the rewrite, so the cleanest option is to revert the whole lot. This reverts commit 42999913ba3a76221fceb04b1f935ed4e0e71476. This reverts commit 90dd2f84a9174c38dbfb07d582ec6ee7697b1939. This reverts commit 2d891439623bb76d38b98202ca5f3eea3c01c5f0. Change-Id: I1cff2bfdd1b189df14bcf8cce42db725caa470d7
2022-01-02x1000: Fix USB connection problems in bootloaderAidan MacDonald3-0/+15
This problem actually had nothing to do with USB boot; it's because the cable is plugged in when the USB mode menu item is selected. The USB thread detected the select button press and went into charge-only mode (as it usually does when you hold down a key in Rockbox). This is fixed by having the USB thread ignore most keys in the bootloader. USB connect events are delivered via the button queue, and there were also cases where the connection could be missed if the event happened within another UI screen. This should also be fixed. Change-Id: I077d705a6ac845c8713219eee45d26aa6addfa61
2021-12-28powermgmt: Better time estimationAidan MacDonald1-2/+2
This method, while far from perfect, is able to make use of real-time battery usage information and updates frequently in fine-grained increments. This should make time estimates a lot more useful than they previously were. Change-Id: I66c6daba88210f60a27e239fbbcc56869be3b878
2021-12-28AXP PMU rewrite (again)Aidan MacDonald3-151/+439
I noticed a few mistakes in the old driver code and it was in need of an overhaul anyway... I decided to scale things back, simplify the code and remove most of the debug menus, netting a nice code size savings. One new feature is an advanced debug menu which is accessible by recompiling the code with AXP_EXTRA_DEBUG. It adds quite a bit of code size and isn't useful other than for development so it must be manually enabled by editing the source. Change-Id: I30e17c1194c14823decd726a574ed14451d4cb2d
2021-12-23Revert "powermgmt: Remove an unnecessary function"Aidan MacDonald1-0/+4
This reverts commit 6ff1a935b923b69d34d18e68af612297912c806b. Reason: it created a mismatch between the displayed voltage and percent since the voltage was unfiltered but percentage was based off the filtered voltage. Change-Id: I4cba099f2e1edf0ef7c4e17a32f566aa66f5b933
2021-12-23Report battery current on all X1000 native targetsAidan MacDonald3-3/+3
This allows battery run time to be calculated from the actual battery usage on the FiiO M3K and Shanling Q1. This isn't very good for the time being and the estimate tends to go all over the place due to small variations in current or voltage. The Eros Q can support this feature as well, but since it already has fixed estimates defined and the quality of the "real time" estimate is low I am not enabling it there. Change-Id: Id34a93ee4b7d66f9f7e56ef0f5149f67e8e72039
2021-12-23powermgmt: Add battery current measurementAidan MacDonald2-0/+9
This allows targets to report the actual discharging or charging current if they are able to. Change-Id: I0b538e6ac94346f1434e45f83c8da8c1260a53a3
2021-12-11allow sim to shutdown while 'charging'William Wilgus1-0/+3
Change-Id: I28a9312d1ce6bf68d8ee6fc2cca680047bfec810
2021-12-05powermgmt: Refactor battery current estimationAidan MacDonald6-17/+8
Create a new battery_current() function to report the the battery's charging/discharging current. Move the old runcurrent() implementation into it and clean up some of the related defines. Change-Id: I7dbe5b6532d291fa72add1cb23b30e3cbac8c3ca
2021-12-05powermgmt: Remove an unnecessary functionAidan MacDonald1-4/+0
Remove battery_read_info() which is a simple wrapper function only used by debug screens. Use the polling functions directly to save a bit of code size. Change-Id: I2919f78105bab186f6933dc1823f9fa67fe74f3e
2021-12-05powermgmt: Small cleanups to battery capacity codeAidan MacDonald2-1/+11
- Don't include the 'battery capacity' setting unless the target allows changing it. - Clean up the preprocessor conditionals used to check for variable battery capacity support. - Don't use a variable for battery capacity unless it is actually needed. Change-Id: I3d8a338f107014f2c5098bc0a44ef0cfb4df9356
2021-12-05powermgmt: Remove outdated definesAidan MacDonald1-6/+0
CHARGING_DEBUG_FILE is not referenced anywhere else so just remove the #ifdef block. Change-Id: Icf4bd4edb7d38bdc86477d7d1f4e7bf9cf697d31
2021-12-02Make inline functions in headers 'static inline'Aidan MacDonald1-4/+5
Future-proofing against newer versions of GCC/binutils which are stricter about the use of 'inline' functions in headers. Change-Id: Id620812ed340f0d790ba6c5b8b5cb1d700acfbbf
2021-11-29config: Get rid of an (incorrect) duplicate definition for USB_DESIGNWARESolomon Peachy1-1/+0
Change-Id: I9778a1a7b5e2e15b3775dbaed719c64b4e52194b
2021-11-24Shanling Q1: enable multi-touch reportingAidan MacDonald3-7/+18
The FT6x06 driver used for the Shanling Q1's touchscreen has been extended to report more than one touch point. It can also return the gesture detected by the controller, but this doesn't seem to report anything useful on the Q1. Multi-touch is only useful in 3x3 grid mode since the Rockbox button API cannot report more than one touch point. The FiiO M3K uses the same driver so it's been updated to the multi-touch API, but functionality is unchanged. Change-Id: I4de42f44808d6eb902e3da212d8f936b7a5042c7
2021-11-22jz47x0: Minor code quality improvements in the jz47xx USB driversSolomon Peachy1-0/+5
* Replace magic nubmers with #defined constant * Tweak some logf messages No functional changes! Change-Id: I6a5e4c371a471197a8edbb853967e461621d73f8
2021-11-21touchscreen: change odd sentinel value for time of last touchAidan MacDonald1-1/+1
Using tick 0xffff does not make any sense, use -1 instead. Change-Id: Id574eb35418c6713c4fc91ed539aadc42fd29aa5
2021-11-18WIP: Samsung YPR0/1: switch to generic SI47xx pollingWolfram Sang2-0/+4
Should work(tm). But I don't have the hardware, so it needs to be tested. Change-Id: Ic086434f570dcddacb5b7e7a1acce4b8cafc5c03
2021-11-18Sansa Clip+: add RDS supportWolfram Sang3-1/+14
Based on a patch by Amaury Pouly which was based on a patch from Ryan Hitchman. I mainly moved the code for polling into the tuner driver so it can be reused by other targets. I added the CONFIG parameter for the polling frequency (in ticks) to save energy. Also, I did some minor cleanups. Change-Id: I95a62e7e1e42c62dbf47ecb27a3b312a42be62aa
2021-10-31USB add Insertion and Extraction callback eventsWilliam Wilgus1-1/+11
We have this nice event library laying around probably a few more places we could use event callbacks Change-Id: I9180fa9d78788d161f2587110644ca3e08df6f50
2021-10-16x1000: enable DMA for USB driverAidan MacDonald3-3/+12
This boosts USB transfer performance a bit, ~10% for reads and ~25% for writes, for large-ish file transfers. Rockbox is still around 33-50% slower than the OF. Change-Id: I236a1e5c69a290c47ed27b70cb2631111fc157ed
2021-10-16usb-designware: port to new USB APIAidan MacDonald2-1/+7
List of all platforms using this driver: - Sansa Clip+ (tested, works) - Sansa Clip v2 (untested) - Sansa Clip Zip (tested, works) - Sansa Fuze v2 (untested) - iPod 6G (untested) - iPod Nano 2G (untested) - FiiO M3K (tested, works) - Shanling Q1 (tested, works) - Eros Q (tested, works) Change-Id: I403ec64b030ea38f22cb52b31865639a78cd11e4
2021-10-16usb: implement new API with legacy emulation layerAidan MacDonald1-0/+4
All existing USB drivers now define USB_LEGACY_CONTROL_API to enable the emulation layer. Control request handlers will be ported in follow-up commits. Change-Id: I4be1ce7c372f2f6fee5978a4858c841b72e77405
2021-10-16usb: give USB transfer completion events two data pointersAidan MacDonald1-1/+1
Change-Id: I036cc7f02c2f86a364d2dba59493a6aa893f2c16
2021-10-16usb: introduce new control request APIAidan MacDonald2-1/+11
Change-Id: I6545d8985ab683c026f28f6a7c0e23b40d0a6506