summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-07-08file/fat: rework utime function as modtime extensionJames Buren
This eliminates the dependence on a special struct since we were only using the modtime anyway. But it no longer fits any known standard APIs so I have converted it to our own extension instead. This can still be adapted to existing hosted APIs if the need arises. Change-Id: Ic8800698ddfd3a1a48b7cf921c0d0f865302d034
2021-07-08Fix yellow in android builds.Solomon Peachy
Change-Id: Ic22908e249f2db85c029e1644c9531a12ed87993
2021-07-08build: Make checkwps use global GCCOPTSSolomon Peachy
Change-Id: I6859d3611b2008bf8a6ec52887d8e278df1ebd9f
2021-07-08x1000: SPL refactoringAidan MacDonald
This streamlines the boot code a bit and reduces target specific boilerplate. The clock init hack used by the bootloader has been "standardized" and works for the main Rockbox binary now, so you can boot rockbox.bin over USB without special hacks. Change-Id: I7c1fac37df5a45873583ce6818eaedb9f71a782b
2021-07-08x1000: more CPM register definitionsAidan MacDonald
Change-Id: Ie6fa343a65a6bd19e578664b10bac771289ed0b3
2021-07-08voice: Corrections to 24-hour time voicing:Solomon Peachy
* Voice leading "Oh" if hours is under 10. (ie "0900" is read as "oh nine hundred hours" Change-Id: I09853909221e0dd6da354f7e4bb9733ff5edca90
2021-07-08Fix warnings introduced in c174d3a5 (redux)Solomon Peachy
Change-Id: Icc871bd9875aa0d092a4fba3e8a6c3a598053854
2021-07-08Revert "Hosted & tool builds need utime.h"Solomon Peachy
This reverts commit a8fd590003774cb5554eaec2d5805d5e5b699fc4. Reason for revert: Inverted polarity and it didn't work anyway. Change-Id: Ife548ce4608405e3243c84a1d72090603fd2decc
2021-07-08Hosted & tool builds need utime.hSolomon Peachy
Should fix the warnings introduced in c174d3a5 Change-Id: Ib4bd863caef4dedf28dadab8b58b9a165ed4ef9b
2021-07-08file/fat: add utime functionJames Buren
This emulates the traditional utime function from UNIX clones to allow for manual updates of the modification timestamp on files and directories. This should only prove useful for non-native targets as those usually have a libc version of utime. Change-Id: Iea8a1d328e78b92c400d3354ee80689c7cf53af8
2021-07-08builds: Move the Sansa Connect to unstableSolomon Peachy
Change-Id: I0087cb3e7d1b412353d3a02d7dd282a27c5a69fc
2021-07-07timefuncs: add dostime_localtime functionJames Buren
This does the opposite of dostime_mktime, converting time_t back to the two dos date time values. We use gmtime_r for native because that is what is available and acts the same as localtime_r on other platforms with a regular libc available. Change-Id: If79469d0aae2d7c5dcdd905fbf04963669aa1138
2021-07-07Sansa Connect: Reduce USB RX buffers from 129 to 2Tomasz Moń
Reducing number of fake RX buffers saves a bit more than 127 KiB RAM. Fix compilation with CPPI logging enabled. Change-Id: If1ad3a6fc251e284caaac78c2406a58f3d6547bb
2021-07-07RFC: Fix a couple more dangling stack-allocated viewportsSolomon Peachy
They could end up getting referenced after the stack has been popped. Change-Id: I12abbf3f436ecfde76a37f2623a044915800d2b2
2021-07-07Sansa Connect: Prevent unresponsive interfaceTomasz Moń
AVR interrupt signal can remain active if the state has changed during state read. In such case, there won't be intterupt and the interface would appear unresponsive until AVR thread received event (e.g. USB connection/disconnect). Solve the issue by not waiting for event if AVR interrupt signal is active prior to event wait. Change-Id: I86e388c7cd6da76e3abe7bf7114940f331e4c308
2021-07-07Fix red introduced in 841e704fc3Solomon Peachy
Change-Id: I5a924f77231a4764f3ad9b196875f5bf073945d6
2021-07-07Sansa Connect: Read HDQ battery dataTomasz Moń
Make it possible for target to provide voltage, percentage and time to empty values. The voltage measurement is nice to have in debug menu even if the actions are taken only based on percentage. Perform battery level estimation based on voltage only if percentage is not available. Use time to empty based on actual power consumption. This makes the estimated runtime displayed in Rockbox Info to react to backlight setting. The bq27000 updates time to empty estimate every 5.12 seconds so it is possible to see the estimate with backlight off on the screen if user enters Rockbox Info, activates hold switch, waits 11 seconds and releases the hold switch. Change-Id: Iafe3fa0fb334e3428e3a0ad05b2c020d208dc934
2021-07-05zip: import initial moduleJames Buren
This provides rudimentary support for parsing the contents of a ZIP file. For now this just supports uncompressed file entries but DEFLATE support is planned. This also only implements a low level public API so more work will be needed to make it usable by application code. Change-Id: Ia68b3078e5276666a0e5023f4bc7a9f94272738a
2021-07-05Sansa Connect: Power off LCD to save powerTomasz Moń
Prevent startup screen flash by properly using AVR LCM functions. Power off LCD when not needed to improve battery runtime. Change-Id: I76e3c5c0208774f189fbc6f7d7b3c9e22c062285
2021-07-04Sansa Connect: Fix power off panic screenTomasz Moń
Queue power off requests because power_off() can be called within tick context that must not acquire mutex. Change-Id: I6f1a8f81d15518876cd03556118fc9eb37b8175f
2021-07-04Sansa Connect: Initial libertas WiFi driver portTomasz Moń
Import non-free firmware image from linux-firmware package. Firmware loading works but is disabled at compile time because just loading firmware without configuring device results in higher power consumption without any benefit to end user. Change-Id: I8fd252c49385ede1ea4e0f9b1e29adeb331ab8ae
2021-07-03fat: move fattime_mktime to timefuncsJames Buren
This moves the time conversion function to timefuncs since it has uses on ports that don't use the FAT driver. This function has no dependency on the FAT driver as it is so this should not cause any issues. To reflect this separation the function was renamed to dostime_mktime since it is really for DOS timestamps. The places where it was used have also been updated. Change-Id: Id98b1448d5c6fcda286846e1d2c736db682bfb52
2021-06-28sdl: increase default worker thread size.Franklin Wei
This fixes a mysterious, long-standing crash that's been bothering me on ipod6g for ages: a silent stack overflow in the sound mixing thread (which is triggered upon loading a new sound, apparently) will thrash the memory which is located directly before it in the address space. In this case, it was the SDL_ButtonState variable which stores the mouse button state that was being trashed. This was manifesting itself by making the player always run forward, since MOUSE2 is mapped to +forward by default. Fix this by quadrupling the stack size of SDL-spawned threads (not the main thread) from 1 KB to 4 KB. Change-Id: I2d7901b7cee1e3ceb1ccdebb38d4ac5b7ea730e1
2021-06-27x1000: NAND rewriteAidan MacDonald
This new design saves on binary size and stack usage. The API is also block- and page-based, requiring awareness of the chip layout to use properly. Out-of-band areas are also exposed for reading and writing. The byte-oriented routines are kept for compatibility with the existing installer and SPL. Change-Id: Iaacc694d2f651ab74d45330e0434ee778a0d91bc
2021-06-27rbspeex: fix shared linkage on newer Linux distributionsJames Buren
The old linking order does not work anymore so reorder it to fix shared linkage. Change-Id: I438c44792b5aff20e752b093b4d81a027db952db
2021-06-27mkzenboot: fix implicit function warningJames Buren
strcasecmp is defined in strings.h but it is not included here. Change-Id: I0629560b6f928f9839f01918cce5e2f1e5b4a85c
2021-06-27Sansa Connect: Ensure adequate AVR Slave Select delayTomasz Moń
Waiting 10 us between selecting slave and transmitting data on SPI resolves spurious startup glitches. Cache last read monotime value as it can differ from the first one. Change-Id: Ia6ac5696f6ee2bc3c6a8be27e33aaddd9ff4ce2a
2021-06-27Sansa Connect: Discard invalid monotime readsTomasz Moń
Read monotime twice in a row and only accept the value if it matches or the two reads are 1 second apart. Change-Id: Ibd289103a20404dd1b2bbd131fdfa8905852c788
2021-06-27Sansa Connect: More reliable AVR communicationTomasz Moń
AVR requires bigger delays between retries. Read state instead of version for synchronization purposes as it shifts more bytes. Change-Id: Ib7fa980496d3bc7744a086b45e1865861ef58b88
2021-06-25Sansa Connect: Retry AVR commands only 3 timesTomasz Moń
If the commands repeatedly fail it is likely that the AVR is not programmed. In such case simply continue normal operation. This is especially important in bootloader as it makes it possible to load new rockbox build using bootloader USB mode. Otherwise, the only recovery option would be to use I2C serial. Change-Id: I4b0999833e9a906ec6353bdfdd5b68211f07ac81
2021-06-25Sansa Connect: Implement RTC functionalityTomasz Moń
Use 32-bit monotime AVR counter for time tracking. Set the time by adding fixed offset to the counter value. Store the offset in rockbox directory to make it persistent between reboots. Do not implement alarm functionality as wakeup is only possible from sleep and not from complete power off. Change-Id: I615c7eb4df8ab0619dcbfcff107bc7051a15aace
2021-06-25Sansa Connect: Manually drive SPI Slave SelectTomasz Moń
Keep Slave Select active during command transmission. This relaxes timing requirements on the AVR side. Change-Id: Ia1a6cf45aba3c11f6aeaa7441c6793807ca827f0
2021-06-24misc: Add a .gitreview file for better gerrit integrationSolomon Peachy
Change-Id: I8ca4afacb54f7b88b984b16249d65ee97c05eb6e
2021-06-22Touchscreen: absolute point mode scrolling bugfixAidan MacDonald
Due to this inadequate bounds check, it was possible under certain conditions to cause a crash by touching & scrolling in the empty space "after" the last item of a list. Change-Id: Ic6c30214d887e1c7ccb212de272248ca24f60856
2021-06-22Touchscreen: adjust how bar padding is handledAidan MacDonald
The old way of padding out bars was to just create a bigger touch region, the intent being to make it easier to touch the end of a bar. Unfortunately, this didn't even accomplish that, and caused an annoying offset between the bar graphics and the touch point. New method is to account for padding explicitly and clamp touches in the padding region so they are within the proper touch region. Change-Id: Id39e571fc1b033a4da94f0eb1143a2fc276bab03
2021-06-22Touchscreen: adjust calculation of bar touch positionAidan MacDonald
Increased the precision of the bar from 100 steps to 1000 steps so it is possible to make finer adjustments, and made it possible to pick the maximum value in a bar rather than just the maximum - 1. Change-Id: I2e694d3e86e4a151e014da1bd15ab3ade4c4b95e
2021-06-22Touchscreen: make volume bars respect volume step incrementAidan MacDonald
Change-Id: I449b305ec4070e61f3619f8b7ac01a74c3ac59a6
2021-06-22Sansa Connect: Refactor AVR command handlingTomasz Moń
Add defines for all commands handled by AVR, including the unknown opcodes (0xC5, 0xD3, 0xD4, 0xD5, 0xD6). Properly synchronize with AVR and keep repeating command until it looks like AVR has accepted it. Change-Id: I3d42e973f135e33092c71c9887421906a900ab58
2021-06-21mi4: replace chksum_crc32 with crc_32rJames Buren
This uses an equivalent algorithm but with a different initial value than we normally use (all bits off vs all bits on). Use the new crc_32r to replace the original MI4 crc32 implementation. This frees up some extra space on mi4 targets which gives us more room on a few very space constrained targets (sansa c200/e200, etc). Change-Id: Iaaac3ae353b30566156b1404cbf31ca32926203d
2021-06-21rockbox: add a crc32 reverse polynomial functionJames Buren
This uses the reverse of the polynomial used by the current crc_32 function. The code for this was derived from the implementation used by tinf. This version is space optimized and should be a good way to reduce code duplication in other parts of rockbox that use the same crc32 algorithm. This is mainly of use in areas where DEFLATE is in use. Change-Id: I918da5b4ea4dc441c0e7e6b5007abcc2da463bcb
2021-06-20Sansa Connect: Indicate charging statusTomasz Moń
Consider battery level down to 0 as safe as OF continues to operate normally even when at level 0. Change-Id: Ie3889e5662b9fa6588e20ad02d8953f29e28800c
2021-06-17build: Add an 'xz' target to generate a .tar.xz imageSolomon Peachy
Improve the tarball generation a bit too Change-Id: Ie68bea4e876bad5cd101dd396ec2247127b1b390
2021-06-17mknkboot: optimize verifyfirmJames Buren
The checksum only needs to be calculated once. A small oversight on my initial implementation. Change-Id: Ie23faf36f5add7ed7f146769b604dbd8204c2605
2021-06-16FS#13299: Handle MP3 files with more than 128K of headers before audio dataSolomon Peachy
Encountered a file with ~600K of ID3v1 headers. Optimize the potential overhead by minimizing reverse seeks. Change-Id: I972dbf1af1c36659f19c7ab4eed0b9149c642880
2021-06-16Revert "FS#13299: Simplify VBR frame parsing in the metadata decoder."Solomon Peachy
This reverts commit 756c0d2ac82515ea8389c69f5f87ca395daca63d. Change-Id: I5f98972f69e7645239fd9218c9d4eeb9bd2ec7a5
2021-06-16Fix yellow from 9ccae042Aidan MacDonald
Change-Id: Iad4eaab8b766d1d0aad051971fd49a64126ca4be
2021-06-16Implement x^y in calculatorMoshe Piekarski
Change-Id: I868b703131675876bd91198b8a53a921152aecba
2021-06-16Enable float formatting in printfAidan MacDonald
Needed for g#3415, and if the comment is to be believed, this needed updating for recent MIPS targets anyway. Just blanket enable everything for all targets with >= 8 MiB of RAM. The only targets with less than this are the Sansa Clip, c200v2, and m200v4, which all have 2 MB of RAM. The added code size is around 4 KiB to 7 KiB, depending on the target. Change-Id: I5773482a13543dabb1f93f713a21f1382a9c5a22
2021-06-15DM320: Use SD/MMC data done interruptTomasz Moń
Wait on semaphore until DMA finishes instead of busy waiting. This allows the CPU to be used by other tasks during transfers. Increase peripheral clock frequency, divide AHB by 2 instead of 3. Function clock frequency is AHB divided by MMC divider + 1. Change-Id: Ic890634da7e3541962ea3501eae8fa2ca2db606a
2021-06-14FiiO M3K: Add dual boot supportAidan MacDonald
Change-Id: Ic34d50855b317b5f4073b232dbf458edf82f55e1