Commit graph

35952 commits

Author SHA1 Message Date
William Wilgus
fe4628fc30 Fix Red Multiboot Firmware Root Redirect
Exclude bootloaders

Change-Id: Id26120df0a047711efe49a43917dfec4c25107cb
2022-03-03 23:20:07 -05:00
William Wilgus
c9857098ac Multiboot Firmware Root Redirect - WIP
Loads external drive into root namespace
Root Redirects can now be put into different folders
For instance placing '/_test' into SD1/rockbox_main.<playername>
will redirect to /<1>/_test/.rockbox
Debug menu>Bootdata now has root directory listed in addition to RAW Bootdata

Redirect root work from Michael Sevakis g#1556, RESTORED -> g#4256

Change-Id: Ia97cf50ff5f5b440877f9c005da6f12c53af931e
2022-03-03 22:08:28 -05:00
William Wilgus
c7bbd5b090 Fix Red SDL, Android mounting root directory, and all the yellow too
Change-Id: Ic5077140fdcb1e3168111336bc428c27a782123c
2022-03-03 20:38:57 -05:00
William Wilgus
0ddac1fdaf Fix Red SDL, Android mounting root directory
Not actually used in either atm

Change-Id: I40e0143fdde1970ac485bf664962c62d4c493d57
2022-03-03 20:08:12 -05:00
William Wilgus
9daacabd65 [RESTORED!] Allow mounting of any directory as the root directory.
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-03-03 18:58:07 -05:00
William Wilgus
f88ea12bac tagcache compress uniqbuf 2 16-bit indices occupy a single 32 bit slot
a lot of space is wasted when file indices less than 65535
entries should be more than 1 byte apart so use the LSB as a flag
when indices are > 65535 set flag to 0 and proceed as before

explicitly mark uniqbuf as 32bit

Change-Id: I54e06c152c369eb6c0322186fe2c1e9a1e6d940d
2022-03-02 20:22:49 -05:00
Dominik Riebeling
ae97d410c5 utils: Set cmake build type to default to Release.
Change-Id: Ie4e6aa326840cb1fbae0fe8d025e592e139d4508
2022-02-28 20:37:32 +01:00
Dominik Riebeling
8d462a1edd rbutil: Rework Logo display.
Replace QLabel with QSvgWidget so the widget draws the svg directly
instead of first creating a pixmap from it.

This also avoids an issue when building with mxe which causes the image
to not show due to a missing svg plugin (which doesn't happen for svg
icons.)

Change-Id: Ic4e265f0567984d1ffe7a3e1cc641df27755e90b
2022-02-28 20:37:32 +01:00
Dominik Riebeling
83e4078d9c cmake: Strip Release binaries when building with gcc.
Change-Id: Iaf87d6b65a38b6d0ecb66c5cb8bc7164741d7419
2022-02-28 20:37:32 +01:00
Dominik Riebeling
72904569e3 Remove outdated theme editor deploy script.
This doesn't work anymore since the switch to cmake.

Change-Id: I3a829cc58412f2e1415c6c9defeb552137757214
2022-02-28 20:37:32 +01:00
Dominik Riebeling
fa1e6cc5bf rbutil: Replace deploy with tarball script.
The old deployment script doesn't work anymore due to the change to
cmake, and since we build the distribution packages (zip / dmg /
AppImage) with cmake directly there's not much need left for the old
deployment.

Change-Id: Ide20887c5bc2e22aabbfb47374d70529609fbc3c
2022-02-28 20:37:23 +01:00
William Wilgus
045f52d475 tagtree.c optmize clause operator parsing
makes WS after a clause conditional optional

Change-Id: I335b5381fb788c19130aa8d57dfb18bb43a07c18
2022-02-28 06:35:11 -05:00
William Wilgus
1bcb1e39ee tagcache, coverity cleanup, Add TAGS_ALL_COUNT
Change-Id: Ia880c921a00b603aa4ba81b0c0670ed00491e41a
2022-02-27 11:01:24 -05:00
William Wilgus
6b360d8b04 action.c keyremap clean-up add logf to core_keymap.c
move the remap out of the loop and eliminate a status flag

Change-Id: I9ab841037a8ea7dff736b452ff55e8242084af82
2022-02-26 00:40:42 -05:00
William Wilgus
887249671c TagTree Show file name for tag_title [UNTAGGED]
fallback to filename as [UNTAGGED] is a terrible way to browse titles

Change-Id: Ifcdc4c27562339b8a916313fb946c88c4eba3b5a
2022-02-25 22:54:47 -05:00
William Wilgus
836616b937 Tagcache Don't create filters when parsing a logical OR
if possible search clauses are converted to filters

once a logical OR is added to the mix (CLAUSE1|CLAUSE2 & CLAUS3))
if CLAUSE1,2 are database non-numeric tags they get made into filters
but the logical OR gets carried to the next CLAUSE

Rather than trying to figure this out just keep all clauses around a logical OR

Change-Id: I03e064e7f897033c5d47d78a1d34238217cde485
2022-02-25 22:04:49 -05:00
William Wilgus
bba0564ec1 keyremap plugin use yes_no prompts, bugfix
use the supplied yes_no dialogs for file delete, key reset, save prompt

return to root menu automatically after loading a file

fix bug where deleting the last file in the list exited the menu

Change-Id: Ib98f6b200b9dee3e4350ad4d7ef80bbb95c77481
2022-02-24 00:26:40 -05:00
William Wilgus
295ec3790d Core Keyremap Allow setting keymap from plugin
Allow setting and removing keyremap on the fly

It was pretty annoying trying to work out a keyremap with a restart
required to set the remap and was quite annoying when I was no
longer able to navigate to the plugin or filebrowser due to setting
the wrong remap

now you can try out a keymap and if it doesn't work a restart will
sort things out

Change-Id: I848fb3bd759f9684ac2497324a371f92b7464f7b
2022-02-23 21:38:27 -05:00
William Wilgus
f7bb9e2167 Add custom action mapping to core
results of an idea I discussed in IRC

changed the way the lookup in the remap file works..

 entries consist of 3 int [action, button, prebtn]
 context look up table is at the beginning
 action_code contains the (context | CONTEXT_REMAPPED)
 button_code contains the index of the first remapped action for the matched context
 [0] CORE_CONTEXT_REMAP(ctx1) offset1=(3), count=(1)
 [1] CORE_CONTEXT_REMAP(ctx2, offset2=(5), count=(1)
 [2] sentinel, 0, 0
 [3] act0, btn, 0
 [4] sentinel 0, 0
 [5] act1, btn, 0
 [6] sentinel, 0, 0

 Note:
 last entry of each group is always the sentinel [CONTEXT_STOPSEARCHING, BUTTON_NONE, BUTTON_NONE]
 contexts must match exactly -- re-mapped contexts run before the built in w/ fall through contexts
 ie. you can't remap std_context and expect it to match std_context actions from the WPS context.

-- Done --

Code for reading core remap entries

-- Done --

import of core remap entires from disk
-- Done --

plugin to set new key mapping (the hard part)

The plugin is started and FULLY functional
you can add actions and contexts
you can change context, action, button, prebtn
delete keymap files
load keymapfiles
save user keymaps
test keymaps before applying them
loading keymaps to core still requires restart
-----------------------------------------------------------------------------------------------

Change-Id: Ib8b88c5ae91af4d540e1829de5db32669cd68203
2022-02-23 08:47:12 -05:00
Solomon Peachy
7952687185 FS#13337: Updated Slovak translation (Matej Golian)
Change-Id: I067c5a8e26b44def88fa60b38aabd1d014555e23
2022-02-22 11:15:02 -05:00
Aidan MacDonald
e8faf2f2ad buflib: add a common dummy callbacks struct & use it
There are various allocations that can't be moved or shrunk.
Provide a global callback struct for this use case instead of
making each caller declare its own dummy struct.

Also fixed ROLO and x1000 installer code which incorrectly
used movable allocations.

Change-Id: I00088396b9826e02e69a4a33477fe1a7816374f1
2022-02-12 10:24:32 -05:00
Wolfram Sang
95dfc489b5 sync clock with RDS time
Tested with my SansaClip+. I don't think this will need extra battery
but let me know if I am wrong.

Change-Id: I287dae134113e0f8a138af68f5087b8ea45b0f4c
2022-02-07 22:04:10 +01:00
Wolfram Sang
5b8873bf33 RFT: convert Gigabeat RDS to thread
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-02-07 22:01:20 +01:00
Christian Soffke
8d453ae9c3 Fix glitches with custom list title viewports
Elements were not being drawn correctly or
title text appeared delayed in several places
when using themes with a custom viewport
for list titles.

E.g.:
- after deleting a shortcut
- when returning from a warning screen in
Playlist Viewer
- returning to some Settings screens
- in "Playing time" screen

Change-Id: I8ab07a31d4b6f290e089ecd7857f43ec195a06e0
2022-02-06 11:20:34 -05:00
Solomon Peachy
04cbb3c7e4 misc: Add 'mpga' as a valid file extension
Some podcasts use this, apparently.

Change-Id: I24f372ed760f15e204dba3a99552ad3b6a051515
2022-02-01 13:23:39 -05:00
Christian Soffke
fb91184c4f PictureFlow: Fix broken (iPod) keymap
I must have only tested de8ee6c9e9 using my
custom iPod keymap. Re-mapping the "Left"
and "Right" buttons in this context badly breaks
existing behavior in Pictureflow when using
Rockbox's default iPod keymap.

Change-Id: I2aff6297d7e229a056383afe6074c41829b38e2d
2022-01-30 16:36:07 -05:00
Solomon Peachy
2ddbb9cad5 Fix manual build on some targets (76a2a00732)
Change-Id: Iaf87d11cd2ce3faf9b98da0a1978dfd3fcdb2ba8
2022-01-30 16:33:58 -05:00
Aidan MacDonald
b25d8457bc Shanling Q1: fix DAC power mode switching
The OST prescaler bugfix (7a5130a277) broke runtime switching
between 1.0V and 2.0V modes. The 1ms delay after shutting down
the DAC isn't long enough to reset it, so it gets stuck in the
power mode assigned at boot. Change the delay back to 4ms, the
effective value prior to the OST bugfix.

Change-Id: Ic4583d1a6fa82540062aa185386f14bbf785a3f4
2022-01-30 17:37:24 +00:00
Wolfram Sang
76a2a00732 si4700: optimize RDS cache update a little
use si4700_read() instead of si4700_read_reg() to make it clear we are
not interested in the register itself but in the cache update. Also, a
tiny bit more efficient as we save a function call and don't request a
return value we don't use anyhow.

Change-Id: Ibbb66fd9e5ea748ba11ac3c2a0570f5219b72637
2022-01-30 12:27:30 -05:00
Wolfram Sang
68887b4730 manual: reenable "Configuring the Theme" for devices without remote LCD
Commit 0c4f89370d ("[2/4]  get rid of HAVE_LCD_CHARCELLS") missed a
closing brace which disabled the above topic in my Sansa Clip+ manual.

Change-Id: Ic7a104757f258a37628645389dbfa1b6c8499415
2022-01-30 12:26:36 -05:00
Solomon Peachy
e91e8439ca FS#13335: Updated Polish translation (Adam Rak)
Change-Id: I6288e6c64d82cc737c5ec1dd3651aa0793894d29
2022-01-30 12:15:51 -05:00
Solomon Peachy
6fd18ef4a5 FS#13334: Updated Italian translation (Alessio Lenzi)
Change-Id: Icfc81db225911d1b034e5c77b3d4cf0baec210c2
2022-01-30 12:15:03 -05:00
Aidan MacDonald
127bb1b6e1 FiiO M3K: remove volume setting on rec. screen
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-29 15:13:54 -05:00
Aidan MacDonald
c1f1d91404 FiiO M3K: audio recording
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-29 19:28:03 +00:00
Christian Soffke
bc5a638594 Option to switch off album art or to prefer file over embedded
Large embedded album art can cause pauses during
playback or when skipping between tracks, especially
on older devices, but embedded art is currently loaded
even when separately stored smaller image files would be
available.

A workaround is to remove large album art from the
metadata of files.

This now adds a setting to either turn off loading of
album art completely, or to prefer loading the album art
from a separate image file and thus ignore the embedded
versions.

Change-Id: I22fb581abf56072e35e6c29d72e553747ec1a96a
2022-01-22 08:29:40 -05:00
Aidan MacDonald
aafe2dd2d1 tagcache: don't allow temp commit buffer to be moved
The temporary buffer used during database commit did not
have any buflib callbacks set, which allows it to be moved
by buflib at any time. The code is not prepared to deal
with this, so things break horribly if anything tries to
allocate during the commit.

The solution is to pass dummy callbacks to prevent the
buffer from being moved. I expect this may create other
issues since the commit uses up all available RAM, but
at least things won't get silently corrupted anymore.

Change-Id: I3183aaee58c94bfbaf4e24424030b8be6e341d22
2022-01-18 19:45:55 +00:00
Aidan MacDonald
525eb15864 recording: fix mono mode mixdown functions
Rewrite copy_buffer_mono_* functions for correctness.

Bad pointer arithmetic in copy_buffer_mono_l produced
wrong results, or panics on archs which can't handle
the unaligned pointer.

None of the functions handled zero size copies properly
though this probably wasn't an issue in practice.

Change-Id: I81c894e1b8a3440cb409092bec07fe3778a78959
2022-01-17 00:37:12 +00:00
Aidan MacDonald
f68c6c14d9 recscreen: clean up menu building code
Remove the use of constants and ifdefs in favor of a
single enum and build the menu with a counter. This
simplifies the source and optimizes to the same code.

Change-Id: Ib07f0634ac8f663452c3e6e3c3d92fb6da1a1b4c
2022-01-17 00:37:12 +00:00
Aidan MacDonald
acc7d16e3b Fix some hardcoded assumptions in recording.c
There were some hardcoded branches handling left/right gain for line-in
or FM radio inputs. If the target only has a microphone, these bits are
useless and cause compile errors due to missing audiohw settings, etc.
This patch #ifdef's them out.

Change-Id: If6a6918b2fabb256261c84651803bbf44deacb1a
2022-01-17 00:37:12 +00:00
Aidan MacDonald
8e65f1db55 manual: Document the DAC power mode setting
Make a note of the fact that the M3K DAC's high performance
setting is not necessarily the highest quality setting --
see forum post
https://forums.rockbox.org/index.php/topic,52917.msg249741.html#msg249741

Change-Id: If0196d2a224868aae10d61f66bac2e8c6843263f
2022-01-16 19:35:40 -05:00
Aidan MacDonald
d93e054419 fiiom3k: power down amp before switching DAC power modes
As detailed in the <Low Power Mode> section of the AK4376A
datasheet, the amp should be powered down before switching
power modes (or to a sample rate <= 12 KHz).

Change-Id: I3ab0a21c78a3ad2bb418b64c916f7dbe2a843efa
2022-01-16 19:35:40 -05:00
Aidan MacDonald
dac3175445 audiohw: avoid magic numbers for DAC power mode
Define proper symbolic constants for power mode. Also allow
targets to define the default power mode setting.

Change-Id: Ia07cf854dce47d0a6aa88e067471f1ff9fbc45fb
2022-01-16 19:35:40 -05:00
Aidan MacDonald
18b3e91707 x1000: internal codec audio driver
Change-Id: I2eb551ec6b593951c33ae6b93df2a23dc6612c43
2022-01-16 19:17:25 -05:00
Aidan MacDonald
15e3d37110 x1000: core PCM recording support
Change-Id: I71883272cc3bffadc1235b0931c3f42bb38e4c1e
2022-01-16 19:17:25 -05:00
Aidan MacDonald
0fbaeed250 Remove ACTION_SETTINGS_RESET
This action has never been used since its introduction
in 2006. There's no real need for it, as it's possible
to reset settings from the context menu.

Change-Id: I6b357ad1a2e19a9b631ee3055e158492570479e3
2022-01-16 23:58:30 +00:00
Aidan MacDonald
c62c323ebc axp-pmu: adc refactor
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-09 20:12:41 +00:00
Aidan MacDonald
b490f08b7c axp-pmu: remove chip ID code
It's useless except to developers, who can easily add code
somewhere to print the ID.

Change-Id: I486240f1c7b45808a1a830abdb22b9381d69cb3f
2022-01-09 19:58:35 +00:00
Aidan MacDonald
eee8243102 axp-pmu: clean up charge current setting
Change-Id: Ifac30f728887c376a83052c826b4bb6a98bbd27a
2022-01-09 19:58:35 +00:00
Aidan MacDonald
eaee5e7339 Revert "AXP PMU rewrite (again)"
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 42999913ba.
This reverts commit 90dd2f84a9.
This reverts commit 2d89143962.

Change-Id: I1cff2bfdd1b189df14bcf8cce42db725caa470d7
2022-01-09 19:58:34 +00:00
Christian Soffke
8f063d49c2 ImageViewer: Fix FS#13329 (GIF File handle/memory leaks)
Change-Id: Ib3ef22716c8ba35c7bb78231ca4f5c7155f16018
2022-01-09 14:36:14 +00:00