summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2021-04-17FiiO M3K: disable CPU frequency switchingAidan MacDonald2-28/+1
After conducting some simplistic tests, I found that the power usage did not appear to be affected by the CPU frequency. I tested by playing back a 44.1 KHz FLAC file on single track repeat, and measured current with the AXP173's battery discharge current ADC. The button and LCD backlights were set to always on. Headphones were unplugged and the volume was muted to eliminate any influence from the headphone amp. On average the current usage was between 78-81 mA at 1008 MHz, 252 MHz, and 112 MHz. If anything, 1008 MHz drew _less_ current than the lower frequencies, by about 1-3 mA. A possible explanation for this, assuming it's not just a bias of the test, is that the CPU idle state saves so much power that it's better to maximize the real time that the CPU spends idling. More systematic testing is needed to confirm this. Change-Id: I527473e8c4c12bc1e94f8d4e849fecc108022abe
2021-04-17x1000: disable CPU idle stats by defaultAidan MacDonald4-0/+19
There's no point including this in normal builds: the stats are not used for anything, they are not really of interest to anyone except developers, and add a small overhead to the kernel tick. Change-Id: I1b4f67cc62d11d634a8cec279dca513dd10eea96
2021-04-17FiiO M3K/X1000: Do system clock initialization in the SPLAidan MacDonald4-39/+45
Initializing the clocks in the SPL brings Rockbox in line with how the FiiO M3K's original SPL works. It's likely other X1000 devices do this too. There was a logic error in the previous setup: the code falsely assumed that DDR memory would always be running from MPLL, but it would be switched to APLL by the bootloader. Rockbox would then try to re-init APLL, albeit with the same parameters. Maybe this was the cause of the boot hang on some units. Change-Id: I64064585e491bbdf1e95fe9428c91a9314f2a917
2021-04-17x1000: don't reset all GPIOs at bootAidan MacDonald1-12/+8
What we really want is to avoid any interrupts being generated before the drivers which handle them are properly initialized. Intead of trashing all GPIOs, search for the problem pins and fix them, leaving the others alone. This fixes the M3K's button light flickering on boot and should stop the M3K from entering a potentially confusing "dead" state where all the lights are off but the CPU is still on. Change-Id: I13a6da0f0950190396bff5d6e8c343c668e8fea1
2021-04-17jztool: New utility for installing a bootloader on FiiO M3KAidan MacDonald14-0/+1961
At present, this is just a command line tool for Linux only. Integrating this with the Rockbox utility and porting to other platforms should be straightforward; the README contains more information. Change-Id: Ie66fc837a02ab13c878925360cabc9805597548a
2021-04-17x1000: Redesign SPL, and allow it to flash the bootloaderAidan MacDonald7-126/+279
SPL is now designed so core X1000 code is in control of the boot, under the reasonable assumption that the device boots from flash. It should not be too hard to adapt to other X1000 ports. The biggest functional change is that the SPL can now read/write the flash, under the control of a host computer. The SPL relies on the boot ROM for USB communication, so the host has to execute the SPL multiple times following a protocol. Change-Id: I3ffaa00e4bf191e043c9df0e2e64d15193ff42c9
2021-04-17 16 bit lcd_mono_bitmapWilliam Wilgus1-1/+8
'Bugfix' mono_bitmap_part reads ahead in the buffer, if the height is <= char bit pixels other memory gets read Change-Id: I6e0d7a9017e1f9c371ffbd56af149ac20cb82341
2021-04-17Fix Pictureflow bugsAidan MacDonald1-5/+6
It turns out that aa_cache.buf, used to store decoded album art during background scanning, was not correctly allocated and overlapped with memory allocated for buflib. This was what caused all the segfaults. Also fixed a logic error in read_pfraw(), which returns a buflib handle on success, but also returned 0 on failure -- since 0 is a valid buflib handle, it should return -1 on failure instead. Change-Id: Ifaa1c02ec19b0859e43c40c0462ed7738d07fec3
2021-04-17erosq: Tweak volume scale to be approximately correctDana Conrad2-6/+6
Tested on eros q, everything measured from line out, open circuit. - volume steps were approximately double the dB they were labelled as, so "-2 dB" would result in a change of about -4 dB from maximum (0, +6.2dBV) - maximum volume defining the line out volume only changed every 10 values, and then was not close to correct- "-10 dB" resulted in -2.5 dB from maximum This gets the volume dB approximately correct, and maximum volume correctly sets the line out volume. I was unable to get odd values in the max volume to work, so set the step size to 2 instead of one. For "consumer level" (-10dBV), set to -16. For "Pro level" (+4dBu -> ~1.8dBV), set to -4. Change-Id: I898b85d768153579a893b23551019af88f865d21
2021-04-16The Matrix plugin -- BugfixWilliam Wilgus1-5/+5
Off by one errorS in the matrix plugin might even say its the matrix plugin re-loaded Change-Id: I2bc7487615a9e28fcd1d170961fb0b5ee6da6af7
2021-04-14hosted: Don't open alsa control device directlySolomon Peachy4-73/+25
It was just being used as a proxy "yeah, we called hw_init()" so just use a flag for that directly. affects rocker, erosq, xduoo x3ii/x20, and fiiom3klinux Change-Id: I14bd9f8d91f1d6cc8de0982a7426e2a103c6bfce
2021-04-13ibasso: Found a reliable way to determine if SD card is present at startupSolomon Peachy1-1/+1
Change-Id: If02788a50e141cc2e5b1a6cde2df2a5ef5713e30
2021-04-12ibasso: Default to assuming the external SD card is insertedSolomon Peachy1-1/+6
Detection at startup is proving to be unreliable. Even if card is not present at startup, upon insertion it will sort itself out properly. Change-Id: I9ee90b724c90c530a39264f698c200a48aa72b1d
2021-04-12ibasso: Implement proper PIVOT_ROOT filesystem accessSolomon Peachy5-5/+75
Including direct use of the external SD card mount Known issue: If SD card is inserted at startup, it must be ejected and reinserted to be registered. Change-Id: I5f420160bda32135cbb088c1e8b04b6e3a73018e
2021-04-10build: Make the lang.h and genlang.h depend on the genlang toolSolomon Peachy1-3/+3
(So if genlang is updated, regenerate the language headers) Change-Id: I1de94eff609b27788db4f08e2d99992b8f360849
2021-04-10Fix red in bc416ff590Solomon Peachy2-7/+9
Most of it was due to checkwps breaking, the rest was m68k with radios. Change-Id: I8a00e094e4006a132932f05e6c4ff7db63dfbfc8
2021-04-10misc: Only include rbpaths.h and string-extra.h in places that need itSolomon Peachy17-10/+15
(Don't include rbpaths.h in settings.h, or string-extra.h in rbpaths.h) Build-tested on rocker, erosq, mini2g, nano2g, xduoox3, clipzip, dx50, and uisim Change-Id: If32e9c9910f5c8247a655cb64522b84d6d7ccbb5
2021-04-10ibasso: Get rid of #include "settings.h" in the button codeSolomon Peachy1-3/+0
(It mucks with paths causing the input device open to fail) Change-Id: I1e8a63d09c229ed9bacbd599a7869e875df21fd2
2021-04-10pp: fix adc mistake where base 10 was used instead of base 16James Buren1-1/+1
Change-Id: I8562af8a11a22cd9edec149b2519ac0205d2b2dc
2021-04-09erosq: When mucking with the clickwheel, ensure we keep the screen awake!Solomon Peachy2-5/+30
Change-Id: I49d39f301f4b44c2477a657e2af964b97d73cf6b
2021-04-09xduoox3: Global volume_limit now applies to the line output as wellSolomon Peachy2-40/+44
The X3's line out is a bit hot, at ~4.3Vpp, so allow it to be backed off. (On my X3, backing it off to -6dB brings Vpp down to ~3.4V) Change-Id: Iea38ef1c6a1b183d0f8fb4eaf2bf9ed6b350a532
2021-04-09Skin engine: respect volume decimalizationAidan MacDonald1-1/+13
This is basically the same problem as FS#13272, except it happens on certain themes, eg. rayboradio. The issue only affects targets with decimal volume levels. Tested the fix using the rayboradio theme on the FiiO M3K and the Fuze+ simulator. Volume was displayed correctly on both. Change-Id: I9e035f7a3c04c85c9b3b01243c7f0a5f8f0ccf9f
2021-04-09x1000: don't add pointless '1' after SPL signatureAidan MacDonald1-1/+0
I added this because it is present on the FiiO M3K's SPL, but nothing in Ingenic docs suggest this means anything. Just get rid of it; the M3K boots fine without it. Change-Id: I2e480b8c0ada386b0e772db49c0a7ebd32ffc7ea
2021-04-09x1000: Trim unused cache functions from the SPL buildAidan MacDonald1-0/+9
Change-Id: Ib645d8ff10cfc672de8ac2debaa17d7dd50dfafb
2021-04-09Revert "sound: add sound_numdecimals() to round out the sound setting ↵Aidan MacDonald2-6/+0
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 Peachy4-12/+14
Should improve audio output quality, especially at lower volumes. Change-Id: I31c38f05fe4b554b092511f0fe7aaad9f346f6c5
2021-04-08alsa: Fix an #ifdef typo in 54fcb907c1Solomon Peachy1-1/+1
HAE_ALSA_32BIT -> HAVE_ALSA_32BIT Change-Id: Icf375d42f6b20e8393b6ffe6d23b3ac96abb571b
2021-04-08alsa: instead of per-target tests, use HAVE_ALSA_32BITSolomon Peachy4-26/+32
Affects all Sony NWZ (linux) and the fiio m3k linux targets. Change-Id: I2fcf121bd026103d2b72332a5a52cc2b5e93949f
2021-04-08ErosQ: fix panic on startup caused by ad55da5fSolomon Peachy1-2/+3
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 Conrad1-4/+10
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-08lua print_table add ability to draw a line separatorWilliam Wilgus2-4/+16
allows you to draw a line between items Change-Id: I7e6e2f56738e12ff06d06a24f0f9d0769932a7b1
2021-04-07Update the english-us "translation"Solomon Peachy1-3/+17
Change-Id: I306fe06628ceee4efb6913cf0d4744a7fc8e814f
2021-04-07configure: Enable easy use of AddressSanitizer with sim buildsSolomon Peachy1-1/+20
Change-Id: I6df7e63b1820296a280faa0925ad4781637b879b
2021-04-07Fix: Directory stream not closed in Shortcuts menuChristian Soffke1-0/+2
Change-Id: Ie653682f35945f334e1658804500467f76495fcc
2021-04-07MIPS: make sure to fill 'jr' branch delay slot with 'nop'Aidan MacDonald3-2/+7
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 Peachy2-5/+12
Change-Id: Ib0e5ddcd660115f156ddb545e45bbe7da42f9709
2021-04-07menu.c submenu items should be limited to MAX_MENU_SUBITEMSWilliam Wilgus1-1/+3
maybe someone is checking somewhere but pretty sure the error message is a buffer overflow Change-Id: I3b95db12bbbd4631223bbbbe540beb2d0dd984c6
2021-04-07FS#13285: Updated Italian Translation (Alessio Lenzi)Solomon Peachy1-17/+180
Change-Id: I248d92121fb76056add2b533681aff27a6c58dd7
2021-04-07list: After drawing scrollbars, explcitly switch back to old viewport.Solomon Peachy1-1/+2
The viewport used for the scrollbar is allocated on the stack, and falls out of scope before the next call to set_viewport(), which sets a flag in the now-out-of-scope "last" viewport. Change-Id: I2c8bfcff500d189fa3857411aadc2e16aa545d2c
2021-04-06x1000: Improve NAND driver APIamachronic4-52/+93
- 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 DRAMamachronic2-6/+22
This frees up 2 KiB in the SPL's memory map, leaving more room for code. Change-Id: I01bbe2ab2905b2773a8b76d8c53e9f3d55bd040f
2021-04-06Remove a duplicate constamachronic1-1/+1
Change-Id: I0e6f4d609eb03155de4cd16aa98cab25f54a6681
2021-04-06rbcodec: Fix typo in include guardamachronic1-1/+1
Change-Id: I503ace58fb46e803c66b92113d2be7daebeb8b71
2021-04-05fiiom3k_linux: Enable HAVE_TOUCHPAD and add in missing bitsSolomon Peachy3-0/+19
Change-Id: I78fa5fdb3648adfaa40f6d5f3c255666a85e2761
2021-04-05Add ability to always have autolock onDana Conrad6-26/+61
Tested on ErosQ Added a setting in the Advanced Softlock menu to always have autolock on, rather than having to "arm" it with the softlock button. Lock/Unlock still works the same with this on, but when the screen turns off, the device always ends up in the locked state. Requires Autolock On to be set as well, and the normal Autolock functionality is unchanged with this off. Caveat: the power/softlock button must be pressed at least once after powering on the device or enabling the feature. After that, it should consistently always "arm" the autolock. Added feature to manual in manual/configure_rockbox/system_options.tex. Also updated some labels I had changed in the Advanced Key Lock menu and added information for Disable All Lock Notifications in a previous commit. Shared items also updated in manual/configure_rockbox/display_options.tex for selective backlight. Change-Id: I09dc6814bee803e40c7088157e1fe9d01d5f3474
2021-04-04hdd1630/hdd6330: update battery capacitiesJames Buren2-5/+5
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-04Enable QuickScreen in filtered dir modes & playlist viewerChristian Soffke2-6/+24
Will allow the QuickScreen to be accessed in the playlist catalogue and when editing a playlist using the playlist viewer. Change-Id: I4b7108db6384eb2077ffdccb2992f2e51a39f42f
2021-04-04QuickScreen: Update status bar after changing volumeChristian Soffke1-0/+4
So that (e.g.) a skin's custom volume bar doesn't appear choppy during volume adjustments Change-Id: I65b9c46ccbdea3f2cb84c418d5d2e33e0121acc9
2021-04-03Fix accidental fallthrough in FiiO M3K simulator keymapAidan MacDonald1-2/+2
Change-Id: I4959d44998c44b5458721ba5f76ab5bc761e9f83
2021-04-02README: Update cross-toolchain infoSolomon Peachy1-10/+9
Change-Id: I23adcc2f08c8a6465b17fe7c755ab68ad0a4d2c4