summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-06-14x1000: Extend CPM registers for dual bootAidan MacDonald
Change-Id: I283834a653506fd95ff8b56897e5f3afaf375cf5
2021-06-14x1000: NAND driver bugfixesAidan MacDonald
- Missing mutex unlock in nand_open() - SET_FEATURE command incorrectly issued as a read operation - Inverted protection bits, not sure how that happened... - Block erase skipped ahead by a wrong amount, causing erases spanning multiple blocks to erase the wrong blocks This code was buggy as hell... it's in need of a major overhaul. It's not very flexible or reliable, and access to the flash is useful during development of a new port, even if not useful once the port is complete. Change-Id: Ib85ee7453beab9657e3d19798ebaa09174b3649e
2021-06-14Sansa Connect: Properly setup internal speakerTomasz Moń
Switch to internal speaker when headphones are disconnected. Change-Id: I7c04ac139ad540d85f960e9dadc2faaf4f856055
2021-06-13FS#13299: Simplify VBR frame parsing in the metadata decoder.Solomon Peachy
The old code would seek forward by the frame length, expecting to see a frame header there, perform a validity check, and then seek back to the current header. Unfortunately this doesn't handle situations where there is extra padding between the frames, leading us to potentially read garbage, causing the validity tests to fail and rejecting the file outright. Instead, keep track of the previous valid header/position, and if we find "valid" headers in a row return the first after seeking back to it. This change allows the file referenced in FS13299 to be properly parsed, but further work is needed to get the file to be playable. (file reports itself as layer 1, variable bit rate, variable sample rate!) Change-Id: I85f61a6360cc041a172db4b7a6b5516e5b60ceee
2021-06-12FS#13297: M3K Autolock allows one action before disabling touchpadDana Conrad
Intercept buttonpress and action, and nullify both if the button is part of the touchpad. Only affects autolock functionality. Adding removal of note about autolock in the manual - the lock button no longer needs to be pressed at least once to prime the autolock, if enabled, since commit 14f7a95 Change-Id: Ic3582764df490d96abc2d78116f23cbe0fdd6173
2021-06-12USB Serial: Implement Abstract Control ManagementTomasz Moń
On devices that can assign interrupt IN, bulk IN and bulk OUT endpoints this change results in the serial interface working out of the box on Linux and Windows. On Linux it is registered as ttyACM device and on Windows it is assigned a COM port number. On devices that cannot assign the interrupt IN this change won't have any effect. Implement minimum required interface control requests. Respond with whatever line coding was set to make terminal programs happy. Change-Id: Id7d3899d8546e45d7cb4ecc3fe464908cb59e810
2021-06-12Sansa Connect: Disable endpoint double bufferingTomasz Moń
Disabling double buffering results in expected CPPI TX behaviour. With the double buffering enabled, sending single ZLP resulted in two ZLPs being available. The two ZLPs is problematic because this causes Windows to reset USB device after failed SCSI command. The problematic sequence on Windows 10 was as follows: * Host sends SCSI Mode Sense(6) Informational Exceptions Control(0x1C) * Device sends ZLP * Device sends command failed response With endpoint double buffering enabled the ZLP was read twice by host. As host was expecting command response on the second read (and got ZLP instead), host attempts recovery by resetting USB device and retrying. Change-Id: I64e95998f429ffb7b14143d956b1f29d20218d14
2021-06-12mknkboot/beastpatcher: implement basic firmware validationJames Buren
This imports the MD5 code used by other utilities and creates a function for checking the provided NK.bin against known original firmware checksums. Integration into mknkboot and beastpatcher is also added. For the sake of consistency with beastpatcher, mknkboot had its printf statements rewrote to print to stderr like beastpatcher does. Change-Id: I0e52271d8d627a5b02302ab5cd1da2815b7cec1e
2021-06-11beastpatcher: fix some minor issuesJames Buren
This mainly fixes some compiler warnings and makes it work with mingw64. Change-Id: Iabd13b5bed3427869ae78ceeb7e2255e68a6f7bd
2021-06-11sendfirm: fix some minor issuesJames Buren
This patches some compile warnings and also makes it work correctly with modern mingw64. Change-Id: I8cd292bc989ae04bbaa1d7149d58d6d833a51c0a
2021-06-11Spin off common ft6x06 code to a driverAidan MacDonald
Allows for the i2c boilerplate to be shared between the M3K and Shanling Q1 ports. M3K-specific quirks remain in button-fiiom3k. Change-Id: I8879b603cefc16416bb200f1c484ca916d935c6a
2021-06-10Sansa Connect: Remove fake battery voltage scaleTomasz Moń
Use battery percentage as reported by AVR. Change-Id: Id697d460b240798eb0b103f9e1f419906b87e9ca
2021-06-10Sansa Connect: Add missing includeTomasz Moń
Include usb.h to have usb_acknowledge() prototype. Change-Id: I2dd951315a93e7c1c456358d715f9ec44bf9e5af
2021-06-09Sansa Connect: Working USB Mass StorageTomasz Moń
Acknowledge SYS_USB_CONNECTED in all queues so USB task can gain exclusive access to the storage. Reduce CPPI requeue timeout to speed up disk access. Change-Id: I322aae4cac679696bb8186ccacf838a18f0715e9
2021-06-09Sansa Connect: Fix sending ZLP on non-zero endpointTomasz Moń
This fixes panic when mass storage driver sends failed result. Change-Id: I14ae975b1f23aee7bc2f7bad6ed68dde29cf5e36
2021-06-09Sansa Connect: Fix bulk transfers greater than 64 bytesTomasz Moń
Correctly set endpoint maximum packet size so host will not consider end of transfer after receiving first packet when transfer is larger than 64 bytes (at High Speed the endpoint max packet size was set to 64 but according to descriptor it is 512). Split DMA transfers up to CPPI_MAX_FRAG so we get single interrupt after each call to tnetv_cppi_send(). Change-Id: I385b66bc5d71975a4e3e9167efac0b1334bd3ffc
2021-06-09DM320: Fix SDHC response format 2 handlingTomasz Moń
Return complete R2 response to caller. Due to incorrect bitfield handling only bits [127-96] were ever returned to caller. Change-Id: I83726af35fb24a8051fcca8b8d019ad89d17500e
2021-06-07ErosQ Simulator: fix keymapDana Conrad
The eros q simulator keys have been weird for a while, found out why. Change-Id: Icb4209774448bc3c0d67dd87f802661cf12874b2
2021-06-07FiiO M3K: filter touchpad input when it's disabledAidan MacDonald
I had hoped this would fix FS#13297, but no luck. Might as well do this change anyway, because it's the "right" thing to do. Change-Id: I55819c881d2141dd565e1c1f21460578c9114ff6
2021-06-06ErosQ: undo ACTION_YESNO_ACCEPT button releaseDana Conrad
I accidentally left this in commit 8056b7f, and I think I'm giving up on this for now - it just gets too complicated in the usb use case. Revert to BUTTON_PLAY. Change-Id: I9e392a3d7f2c18f34de54ecbafdb27cdf863b28c
2021-06-06x1000: Allow setting IRQ handlers dynamicallyAidan MacDonald
Avoids having to #define the names of GPIO pin interrupt handlers, as they can now be set at runtime instead. Change-Id: Ib5da1bdb475ff7b64280fe7cdd00adab63389152
2021-06-06x1000: GPIO refactorAidan MacDonald
The GPIO API was pretty clunky and pin settings were decentralized, making it hard to see what was happening and making GPIO stuff look like a mess, frankly. Instead of passing clunky (port, pin) pairs everywhere, GPIOs are now identified with a single int. The extra overhead should be minimal as GPIO configuration is generally not on a performance-critical path. Pin assignments are now mostly consolidated in gpio-target.h and put in various tables so gpio_init() can assign most pins at boot time. Most drivers no longer need to touch GPIOs and basic pin I/O stuff can happen without config since pins are put into the right state. IRQ pins still need to be configured manually before use. Change-Id: Ic5326284b0b2a2f613e9e76a41cb50e24af3aa47
2021-06-06jztool: add correct compiler flags for building on MacAidan MacDonald
Change-Id: Ic89b5a2e65754891fedd63fec1e7235ed424e5f9
2021-06-06Sansa Connect: Initial TNETV105 driver portTomasz Moń
Port USB driver from Sansa Connect Linux kernel sources. The device successfully enumerates and responds to SCSI commands but actual disk access does not work. The SCSI response sent to host mentions that both internal storage and microsd card are not present. Change-Id: Ic6c07da12382c15c0b069f23a75f7df9765b7525
2021-06-05DM320: Fix buffer overrun in sdmmc driverTomasz Moń
Modify count, buffer and start address only after successful transfer. This makes the retry operation to use the same address and buffer as the just failed transfer. Change-Id: I4f49bbdc861d634e33ea5e939a9693474411d24d
2021-06-04toolchain: To build GCC for hosted targets, we need -std=gnu++11 for stage2.Solomon Peachy
But for stage1 (and non-hosted targets) we can stick with -std=gnu++03. This keeps everyone happy with no apparent regerssions on older host compilers. Change-Id: I1300574557bc8d4d13e5cf07d4ae85645998f071
2021-06-04rockboxdev.sh fixes for hosted MIPS toolchainAidan MacDonald
Add --with-sysroot= to the configure args of glib and dbus because otherwise they get confused and try to use host system dependencies. Also fix the broken restart logic so you can actually restart a build. Change-Id: Ib456c04845d80cc923dcc6b83e57f67a0868104b
2021-06-04toolchains: Fix gcc 4,9.4 compilation using GCC11.Solomon Peachy
Basically it defaults to using C++17, which breaks the GCC compilation. Instead, explicitly specify -std=c++03, which should work everywhere. Change-Id: I821591dbbac4fab4b1d930702ed66c7c767b5c92
2021-06-03ata: fix a typo in a definition that's thankfully not used.Solomon Peachy
Change-Id: I6f2d4d05249dc01b48caa1507ee0e71496c67ba6
2021-06-04ipod6g:: Get rid of magic command numbers in ata driverSolomon Peachy
Use CMD_* macros instead. Makes the code a bit easier to follow. No functional change. Change-Id: Ieb3d8f6fcca503421d3067aafbd0011a908368e0
2021-06-04Softlock ImprovementsDana Conrad
Add a check to see if the keys are currently locked and allow them to be unlocked to ensure we don't get stuck when the current playlist ends while the WPS is locked. (Original by Aidan MacDonald) Adding initialization for unlock_combo and to arm the autolock (if enabled) without the user needing to press the lock button at least once every boot (which is the prior behavior). Removing screen_has_lock check from is_keys_locked() Change-Id: I0fbf9b9746b011a7086ec8505a7ecc4b84f2d332
2021-06-03x1000: LCD driver minor fixes & improvementsAidan MacDonald
- Use unsigned bitfields in 'lcd_tgt_config' - Set DTIMES when using an 8-bit bus width - Allow using DMA big-endian mode - Provide an #ifdef to avoid stopping DMA in the middle of a frame - Correctly #ifdef LCD sleep code when target does not implement it Change-Id: I327c6b05223638b876d5ab62cb6e48f82e6d5fa5
2021-06-02x1000: minor adjustments to PWM codeAidan MacDonald
- Change busy loop to wait on the timer flag instead of hoping to catch the timer at exactly the right moment... unsurprisingly, that did not work well with higher frequency PWM outputs. - Put GPIO data into a dedicated const array. Change-Id: I2a920ed265c192da197a18c7242f3205d11636d3
2021-06-01axp173 driver: rename to "axp-pmu" + other changesAidan MacDonald
The old name was a bit misleading. AXP173 is sort of the lowest common denominator of a series of related chips. The M3K uses an AXP192 which has a few extra features vs. the AXP173. New voltage regulator stuff was added for the sake of the Shanling Q1 native port (that player also uses an AXP192). Change-Id: Id0c162c23094bb03d13fae2d6c332e3047968d6e
2021-06-01FiiO M3K: minor fixesAidan MacDonald
- Drop obsolete NAND patch script (it's simpler to use 'dd' directly) - Remove an outdated comment - Fix missing 'void' in a function definition - Reset the poweroff timer when we poke the backlight Change-Id: I752624386f30ac95f41a731d2b6be837e12275a9
2021-05-31AK4376 driver: refactoringAidan MacDonald
Some audiohw API calls are shared between playback and recording, eg. frequency settings. Implementing these in the DAC driver won't work for the M3K, as it uses a separate codec for microphone input. Change-Id: Ieb0a267f8a81b9e2bbf0bbca951c5778f8dcd203
2021-05-30x1000: refactor AIC initializationAidan MacDonald
Have pcm-x1000 handle most work, so target's audiohw code touches only the relevant settings. Change-Id: Icf3d1b7ca428ac50a5a16ecec39ed8186ac5ae13
2021-05-29MIPS: add another mipsr2 endian functionAidan MacDonald
Used by WAV and AIFF encoders for recording. Change-Id: If1bf05583c6b5c123c91eb9c4dfe0e11efd3a0f7
2021-05-29x1000: Complete the register definitionsAidan MacDonald
I think this covers everything now, although some fields are missing enum values. Those can be added in if and when they are needed. Change-Id: Ib1a94ba9c9a5949b6a038f8c1a49786823fae58f
2021-05-27Yes/No Screen: Allow accept to be button releaseDana Conrad
Allows the ACTION_YESNO_ACCEPT action to be set to a button release by ignoring certain system events. Moving USB init in main.c to the last thing to prevent getting stuck in the USB prompt, if enabled. Also changing ACTION_YESNO_ACCEPT to button release on erosq Change-Id: I5e7498521a13cb4e840223dd0b9c8633e99093bc
2021-05-24Allow Softlock to happen in most contextsDana Conrad
All this tested on erosq, I'm not sure if this will break on other targets or if there is a reason this shouldn't be done. apps/menu.c: Added CONTEXT_MAINMENU|ALLOW_SOFTLOCK in do_menu(), this allows the user to lock the keys in most places within the main menu tree. apps/tree.c: Added CONTEXT_TREE|ALLOW_SOFTLOCK in dirbrowse(), this allows locking the keys in most other contexts not covered by the above. Notable exceptions I've found that still cannot be locked: View Playlist, any settings change screen (ex. Shuffle No/Yes, Volume Select dB) Adding fix for Advanced Key Lock feature brought to light by this change in apps/action.c. Expected behavior for Advanced keylock is now (according to my testing here): Volume: Can be exempted from keylock anywhere Skip/Scrollwheel: Can only be exempted in WPS Seek: Can only be exempted in WPS Play: Can only be exempted in WPS Backlight exemption is same except the Volume exemption doesn't work outside the WPS, but I don't believe that is due to this change. Change-Id: Ifa3d1a03cf4884520a37dd91ed53a825cdb66778
2021-05-23manual: Migrate the manual from freenode to liberaSolomon Peachy
Change-Id: I6a9ae1661b69dcaaddee75f3739f9c8dc8a940df
2021-05-22FiiO M3K: keymap improvements & fixesAidan MacDonald
- Add support for skip and seek while the player is locked. (Thanks to @bahus for the suggestion) - Fix touch zones because the down button zone ended up being a lot smaller than expected due to the touchpad's wonkiness. Also added a visual display of the touchpad to its debug menu. - Fixes the pictureflow keymap because it was mostly unusable. Change-Id: Ic0da4f8df3613ff7828ce1cb940ed9e77ada3281
2021-05-22Allow alternative keymap when keys are lockedAidan MacDonald
To enable support targets must define HAVE_LOCKED_ACTIONS and then handle the CONTEXT_LOCKED flag from get_context_mapping(). Change-Id: I92703b534e4a45b4ebbf9bf98af42df9b8ac3b1a
2021-05-21Sansa Connect: Clear recoverzap parameterTomasz Moń
Clearing recoverzap parameter exists the Recovery Mode. This makes it possible to run Rockbox on Sansa Connect without relying on original Linux firmware. Enable write-through cache on flash memory as write-back complicates handling without any real benefits. The flash memory accepts commands as series of writes at predefined addresses, so it is important that the cache does not interfere with the writes. Change-Id: I219f962f20953d84df43012cf16bbb16d673add8
2021-05-20[Cabbiev2] If the 'Artist' tag is empty read the 'Album Artist' tag.James D. Smith
Change-Id: Ic8b90cd2c833a08b57ed0157f960c9471cc5a51b
2021-05-19lua add a way to filter settings on readWilliam Wilgus
rather than dumping all the settings allow a filter function to choose desired settings in menucoresettings you can see an how to do exact text matches or wilcard matches you can even use luas version of regex Change-Id: I4c7f7592498ea194e06e9a556b77ffd57f5d4223
2021-05-19lua latebound function updateWilliam Wilgus
return the nextfunction and nil instead of pairs it allows a faster return to lua rather than calling the lua function pcall(fnpairs) from c and returning the result back into lua to kick off the search yeah, no clue why I didn't realize that before.. testing in x86 and ARM.. its more RAM efficient to do the initial creation of the stack in lua code for the __pairs functon its not faster but being that its a one time hit per iter creation the reduced churn alone should be worth it along with a reduced peak RAM usage fix bug where a failed module can not be reloaded optimize filetol fix potential bug in splash scroller when no break character is found Change-Id: I42c922e07039a19138b97c0d0e80cf3cf2426471
2021-05-19FS12845: Fix uninitialized readSolomon Peachy
Change-Id: If0e5b65a70e10b624416e2a15e0b3df29c2b4591
2021-05-19FS#9093: Database initialization hangs if there's no music file on the playerSolomon Peachy
Original patch by William Poetra Yoga Hadisoeseno Change-Id: I198a4d1b2899bd9200a35dbefd034a2e9857fa19