summaryrefslogtreecommitdiffstats
path: root/firmware
AgeCommit message (Collapse)AuthorFilesLines
2020-04-08hiby: Use HAVE_LCD_ENABLE instead of HAVE_LCD_SLEEPSolomon Peachy1-5/+5
Change-Id: I93819f5ecaad9101a711a0cca626570c7aef0e57
2020-04-08hiby: Refactor X3ii/X20 and Rocker LCD codeSolomon Peachy3-144/+12
Once some missing power optimization stuff was added to the X3ii code, they were completely identical. Change-Id: I68e4db5e270e8ff22f91e521616a054bd7baa95d
2020-04-07Consider sector size when checking cluster sizeStefan Ott1-1/+6
On file systems with 2048 bytes per cluster, the bpb_secperclus value gets multiplied by 4 when the meta data is loaded. This patch changes the sanity check to consider (and reverse) that multiplication before checking the cluster size. Signed-off-by: Stefan Ott <stefan@ott.net>
2020-04-06xDuoo X3II and X20 portMarcin Bukat30-20/+1236
Provided by Roman Stolyarov Integration, Refactoring, and Upstreaming by Solomon Peachy X3II confirmed working by forum tester, X20 is nearly identical. This includes bootloader, main firmware, and the flash image patcher. Eventual Todo: * Further refactor AGPTek Rocker & xduoo hiby bootloaders * Further refactor AGPTek Rocker & xduoo hosted platform code Change-Id: I34a674051d368efcc75d1d18c725971fe46c3eee
2020-04-05checkwps: #undef CONFIG_STORAGE_MULTI for __PCTOOL__ buildsSolomon Peachy1-0/+1
Fixes checkwps build on xDuooX3 (only target that uses it!) Change-Id: I4dfe095338c938f88a2791351c82f310d0531ad7
2020-04-05simulator: Fix sim build for sdl/hosted targetsSolomon Peachy1-0/+2
Change-Id: I39a7be7cf0ace47cd4aba2a01d9450e1ba41cb7b
2020-04-05threads: Move stack_size to end of struct thread (followup to f19ffe2)Solomon Peachy1-3/+3
Makes the structure more compact. Fixes the build failure on the m68k M5 target Change-Id: If17b872f4923d3a52b344e3c59ed6f870d5a7725
2020-04-05Threading: Use 'size_t' for stack size in core threading codeSolomon Peachy1-1/+1
For some reason it was defined as 'unsigned short' but all arguments to the threading functions and other structs used size_t. The SDL plugin tried to allocate a 2MB stack and this resulted in much badness. This is a _very_ old bug, and might be responsible for countless subtle bugs! Change-Id: I8b7fd79a10c21e3ab524a89b4d40d9afa4fab638
2020-04-04pp502x: Don't fill the cache starting from address 0x0Solomon Peachy1-1/+5
The pp502x cache init code tries to flush the cache by reading a block of DRAM. Change the starting point from 0x0 to 0x1000 so the compiler doesn't helpfully insert an undefined instruction to deliberately crash the target. (This behavior is intentional on the part of GCC, and was triggered by using -Os with my experimental 4.9.4 toolchain) Change-Id: I2d2719615a1164a035f3dac8a56dd3737bbab1d5
2020-03-29headers: Don't blindly include <inttypes.h> in files used by ASMSolomon Peachy3-2/+7
Causes things to go boom with newer toolchains. Change-Id: Ibd00edc9ea16aae8115b63ebce08ac920b0608a2
2020-01-29sonynwz/scsitools: add NWZ-S610 seriesAmaury Pouly1-1/+1
Change-Id: I8977e1bcc805df463f7b08f11be889368db4eab2
2020-01-12sonynwz/scsitools: add support for NW-A56Amaury Pouly2-3/+4
Change-Id: I07e57218638ef62c0e4bf92833add6c3ba7bdcd8
2019-12-30Fix As3525 SD unused parameter warningWilliam Wilgus1-2/+3
Change-Id: I0a4bbcf94e9cadf43a822c1cb2f2dad3bd4f7588
2019-12-31Sansa AS3525V1 Sd Interface implement powersave modeWilliam Wilgus1-30/+65
This patch cleans up the sd driver for the V1 sansas powersave implemented for the sd interface Change-Id: I3d864f7aa304cf792cc65fa4ff06c1e52fbed329
2019-11-15MultiBoot_Firmware Fix red for bootloadersWilliam Wilgus1-2/+2
Change-Id: I0446258d1f14f5423cca55de04abf545a92c61cf
2019-11-15MultiBoot_FirmwareWilliam Wilgus1-0/+21
Stop gap till I get a chance to work on the root folder stuff Makes whatever volume marked by bootdata.boot_volume the base or root volume, mounts all other volumes after the specified boot volume. Has the effect of swapping the SD card to the slot for internal and Internal storage is mounted as the Sd-card. Does not honor root redirect -- uses .rockbox folder in the root of boot volume Change-Id: I0f786aa0c8721e21cba607366775be3e3c0cf474
2019-10-17Fix timer Agptek Rocker (other hosted players)William Wilgus3-4/+21
on timer_unregister callbacks are not removed It seems (at least on the Rocker) timers continue to fire (for a bit??) Now we store the registered callback in the sigev structure and check that the callback matches the one registered when the timer is created. This should stop the possible case of a new timer getting spurious callbacks We also now NULL the callbacks on un-register which should stop the segfaults Added some notes to timer.c and timer.h Change-Id: Ia155c3a4e4af89f474d55ed845560ccc1fab85aa
2019-10-13iPod Classic: enable IRAM1 in bootloaderFranklin Wei1-0/+6
7442742 ("iPod Classic: disable IRAM1") was causing subsequent ipod6g bootloader builds to result in a completely black screen upon installation, with recovery only possible with a reflash through DFU mode. IRAM1 is re-enabled for bootloader only. Change-Id: I92d489c91f81cad55d66a8647c1e61a45f468770
2019-08-08Introduce HW_SAMPR_MIN_GE_22 macroSolomon Peachy1-0/+16
Gives us the lowest HW sample rate that's >= 22KHz. Needed because some targets that don't support 22K support 11K or 8K, so HW_SAMPR_MIN will give us much lower quality than is acceptable. Take advantage of this new macro in the SDL, MIDI, and MIKMOD plugins, and implement a crude "fast enough" test to enable higher sample rates on more capable targets. Change-Id: I6ad38026fb3410c62da028e78512e027729bb851
2019-08-01Remove "HAVE_TRANSFLECTIVE_LCD" from iPod 6G configSebastian Leonhardt1-3/+0
The screen content is only poorly visible without backlight, it's not really usable this way. Removing HAVE_TRANSFLECTIVE_LCD also fixes the "flashing screen" issue that appeared on some models when "lcd_awake()" is called. Change-Id: I3ba954c944077a32016820462f782dc27a31f8d8
2019-07-31Revert "cleanup: Remove HAVE_MULTIVOLUME from targets with HAVE_MULTIDRIVE"Solomon Peachy4-0/+4
This reverts commit a89bf68e889dd989e486b0a131618f69e5fc26c6. HAVE_MULTIVOLUME && HAVE_MULTIDRIVE implicitly means "allow 4 volumes per drive" whereas the normal MULTIDRIVE behavior is to only allow 1 volume per drive.
2019-07-30cleanup: Remove HAVE_MULTIVOLUME from targets with HAVE_MULTIDRIVESolomon Peachy4-4/+0
The latter always enables the former. There are no remaining HAVE_MULTIVOLUME users in-tree. Change-Id: I0f4fd03a6ffed5c0eb3fb5f916f671bd199f1c8e
2019-07-29Correct MODEL_NUMBERs used by xDuoo X3, and IHIFI 770, 770C, and 800.Solomon Peachy4-4/+4
This should correct ROLO operation on all targets. Change-Id: Icefbf1af83fd756283a0f6c78ba2370fe41f4473
2019-07-29XduooX3: Uncomment code that prevented hotswap from working.Solomon Peachy1-2/+2
Change-Id: I5efec00e60aacf05166407ad43b9d63340e18967
2019-07-28volume_ismounted is gated by HAVE_DIRCACHE rather than HAVE_MULTIVOLUMESolomon Peachy1-0/+2
Should fix the various sim builds. Change-Id: I1dc5e8228698afb32c84ada2aa916e52e19f49d7
2019-07-26Fix issue with building the UI Simulator for WindowsLiveboxAndy1-3/+4
Addition of rtc support for AGPtEK ROCKER broke building the UI Simulator for Windows. This patch removes the rtc support if building UI Simulator for Windows.
2019-07-25Fix Red -- sound_current #_2William Wilgus1-0/+7
Change-Id: Iae31a5fd414708b4a222ba0b05b5828a8e0d19af
2019-07-25Fix Red -- sound_currentWilliam Wilgus1-1/+11
Remove dependency on settings.g for bootloader ifdef out AUDIOHW_HAVE_EQ Settings these should be indexing the global_settings.hw_eq_bands[AUDIOHW_EQ_BAND_NUM] struct Change-Id: I1d1a8556ef88ce43397b600261696dacdf372034
2019-07-25Add sound_current to plugin apiWilliam Wilgus2-0/+90
Adds: sound_current(int setting) returns the current sound setting from global_settings complements sound_max, sound_min and sound_default Change-Id: I35bd893753c958f808492906fe533edc51d5d57c
2019-07-19Limit float formatting to only targets building QuakeFranklin Wei1-0/+7
The Quake plugin is the only code that actually relies on float formatting. Because Quake only runs on targets with huge memory anyway, limiting their formatting to just those targets will minimize the increased memory use in the core. Change-Id: Icdbe26ec6ede564861cc01ac4add76a12b00ecd5
2019-07-19Add proper float formatting to vuprintfMichael Sevakis4-10/+793
Wanted to see how gnarly it is to do. Big number handling could be done with better algorithms since it can get a bit slow with large integers or tiny fractions with many lead zeros when only a few digits are needed. Anyway, it supports %e, %E, %f, %F, %g and %G. No %a or long double support seems warranted at the moment. Assumes IEEE 754 double format but it's laid out to be able to replace a function to handle others if needed. Tested in a driver program that has a duplicate vuprintf and the content was pasted in once it looked sound enough to put up a patch. Change-Id: I6dae8624d3208e644c88e36e6a17d8fc9144f988
2019-07-19Put -lfirmware in CORE_LIBS, to fix -thumb buildsFrank Gevaerts1-0/+2
For unknown reasons, -thumb builds need -lfirmware after -lrbcodec (but still before -lunwarminder)i. Other builds are still happy if we do that. Including it via CORE_LIBS instead of explicitly achieves that. Change-Id: Id69e4a0c042f90f71cfd9a72202ce4d8ef6a4181
2019-07-10Fix Truncation warning cpufreq-linux.c->cpufreq_available_governorsWilliam Wilgus1-1/+1
limit cpu identifer to 0xFFFF Change-Id: I6fb170aa7ce32b7b5c0366bbd689878bb5069be8
2019-07-09rbendian.h: fall back to generic swap macrosFranklin Wei1-3/+1
Change-Id: If85086c0fd6b22d50759b16d2545e1798832d12c
2019-06-27Fix reversal of "always/never" in "LCD setting > Sleep (After Backlight Off)"Sebastian Leonhardt1-5/+8
The bug was introduced in a06d9c8. The patch also fixes some (more or less) related obsolete comments. Change-Id: I5e491d64574c37cdbc46b146d7cfc555d86b9a11
2019-06-02jz7460: Disable IRQ-driven DMA transfers.Solomon Peachy1-1/+1
This greatly increases the stability of SD card write operations. (I suspect the underlying problem is not IRQ operation itself, instead being exacerbated by it..) Change-Id: Ia00f0656abd4b3cb0b1b5fc9db7c1b6a02847956
2019-05-31Agptek rocker: do not update display when not activeMarcin Bukat1-17/+23
Change-Id: I963a9098b82a09aed8050123932a128f2d08dee0
2019-04-22nwztools: add DMP-Z1 to the databaseAmaury Pouly2-2/+6
This is one of those fancy gold-plated devices. Of course it breaks my scripts that were nicely expecting every device to start with NW. Change-Id: I161320f620f65f4f92c2650d192b26a9831eeb9d
2019-02-08Fix the fixSebastian Leonhardt1-1/+1
Change-Id: I54b97fd0c208f775e4ee22cf8499f1da423ebc39
2019-02-08Fix red and remove duplicated function declarationSebastian Leonhardt2-5/+1
Change-Id: I5fed7fdad077eedfc1e36fbd9e1669f11b90288d
2019-02-07Add YH820 current usage for runtime estimationSebastian Leonhardt1-0/+7
Change-Id: If50d7e6db3077853dfba438d9765cdb3513f2910
2019-02-07transflective LCDs: fix "first buttonpress enables backlight only"Sebastian Leonhardt1-1/+9
This should be done even if the backlight is set to "always off", i.e. if the LCD is sleeping, a button press should be "eaten" and just wake up the LCD. Change-Id: I3946bdbbdc81f23eae3f47423123cefa275e0afc
2019-02-07Simulator: improve simulation of transflective screensSebastian Leonhardt1-0/+8
This patch simulates the three possible states of a transflective LCD: backlight on (bright screen as usual), backlight off (dimmed screen) and LCD off (black screen). Makes use of already defined 'BACKLIGHT_OFF_ALPHA'. Change-Id: I9b0fc79b8d50c29e024ba1e6d9c2501119a7e0e0
2019-02-07Fix lcd not waking up when backlight is always offSebastian Leonhardt2-0/+8
This patch is relevant for targets with a transflective display. If the backlight was set to "always off" (e.g. to use the lcd in a pure passive way), and the sleep timer ran off, the LCD would stay disabled and didn't wake up when a button is pressed. Change-Id: I0a157c7f421d9fc4c7d8ba903f2cf93f6cef51d0
2019-02-07YH820: implement LCD sleepSebastian Leonhardt4-8/+57
use sleep setting to keep transflective LCD active without backlight Change-Id: Iccd97e956d5e4a2a22abc90d15e9123782126ecb
2019-01-04Add HAVE_LINEOUT_DETECTION and associated logicSolomon Peachy6-22/+83
This allows targets to automatically switch audio settings when the line out is plugged/unplugged. Only hooked up on the xDuoo X3, but there are other potential users. Change-Id: Ic46a329bc955cca2e2ad0335ca16295eab24ad59
2019-01-04Buflib add range checks blocks and crc_slot raise panic if out of rangeWilliam Wilgus1-0/+7
Change-Id: I81df5c145a8cb003827a5423f484f70333e2472e
2019-01-02mips: Adjust main & irq stack sizes to fit in IRAM on all targetsSolomon Peachy2-4/+4
New amounts: 7.50K main stack 0.75K irq stack Prior values of 8K+1K overflowed IRAM by ~660 bytes on Onda 7x7 targets, but worked on the xDuoo X3. (The discrepancy is due to the Onda targets having more LCD code shoved into IRAM.) Change-Id: I16fcfae3c5f3e36db688dfa9167b620584e79df8
2019-01-02mips: Use a separate IRQ stack & optimize IRQ handling a littleSolomon Peachy3-38/+60
Should prevent the IRQ-related stack overflows seen on MIPS targets. Change-Id: I447336ef3fe37e11b3276a78ba220ce64c2f87f5
2019-01-02Add Xuelin iHIFI 770/770C/800 supportSolomon Peachy30-508/+2687
Taken from the xvortex fork (Roman Stolyarov) Ported, rebased, and cleaned up by myself. Change-Id: I7b2bca2d29502f2e4544e42f3d122786dd4b7978