Commit graph

38052 commits

Author SHA1 Message Date
William Wilgus
5471f58fb1 [Bugfix] set_current_file_ex filebrowser wrong file on resume
can't have it both ways blocking directories from filename
makes shortcut folders browse into the folder but blocks
the folder when the file browser loads it causing you
to be in the wrong folder upon resume

I wanted a way for the user to be able to leave the slash off
so ensure shortcut folders have a trailing slash (on load)

Change-Id: I9ea173a90a8c12291a159e7d30ee1076e0ca5d3e
2025-02-15 02:47:14 -05:00
Paul Sauro
ac03680df3 keyboard.c: Layout dynamically the morse cheat sheet (supports larger sysfonts)
The main usecase of this is so the morse cheat sheet does not look broken (with cut characters) when we are using a different/larger sysfont. All is adjusted automatically thanks to the SYSFONT_WIDTH and SYSFONT_HEIGHT constants.

Long pushs are now represented as vertical long bars, while short pushs are represented into short bars (centered in the middle). The long pushs bars are not larger anymore, so spacing is consistent everytime for all long+short order different combos thus looking cleaner and more readable.

The code was also a bit refactored to be more easily understandable in the future by using clear variable names to describe the magic values.

- Tested with mini2g: no regression, can still show all characters no problem within the limited screen space that is available on this device
- Tested with ipod6g by configuring the same default font as erosq (14-Rockboxmix) which is larger than the default sysfont: looks really good ! Way more readable than before
- Tested with 4gmono: no regression

Change-Id: Ida8b37ac7bd0bb5f0d314b5dea7657aa41bf2650
2025-02-13 20:37:13 -05:00
Solomon Peachy
da9dc33d85 lang: Correct voice string for LANG_FONT_LOAD_ERROR
Cut-paste error that was unfotunately carried forward in translations

Change-Id: If3a61ec3a276873cf3099f27ee7aa64ef6300876
2025-02-13 20:04:42 -05:00
Solomon Peachy
78fa02aa39 FS#13559: manual: Correct URLs in ipod6g bootloader installation instructions
Change-Id: Ie97534e710d10b07d4bcfb5a323dca08b45bf343
2025-02-13 10:34:45 -05:00
Solomon Peachy
ad556794d2 internals: VIRT_PTR correction for PP SoCs
Accidentally put one too many zeroes in the address, placing it into
(real) IRAM instead of just past the edge of DRAM.

This didn't affect the s3c2440 and imx31, as they didn't have anything
in that typo'd location.

Change-Id: I2a2e3e3e0d1222ccd04901f8a85790cf21f0aac9
2025-02-13 08:37:32 -05:00
Solomon Peachy
dc0cef8304 libopus: Re-add another optimization that was accidently dropped pre-3.15
This puts the entire ~26K decoder state structure into IRAM.

(was lost as part of 14c6bb798d, Nov 2019)

Change-Id: Idbf53657e7c0581b4e47247fc5550b59842b23f1
2025-02-12 08:51:37 -05:00
William Wilgus
922a2a4f3d tree.c optimize bookmark_play()
optimize the index search loop using mod()
instead of checking index and then scanning we can start at index
and roll over saving a compare in the process

Change-Id: Ie54fbf1ca0131db8914985b654248eeb8d725a82
2025-02-12 02:29:30 -05:00
Solomon Peachy
801260dd79 internals: VIRT_PTR needs to point at an *invalid* unmapped address
As an added bonus, don't allow it to be 0 as that could result in a
nullptr for ID2P(0).

Change-Id: I1d6eed774771790fae49f0e56a2f29351cab8d5c
2025-02-11 12:27:06 -05:00
William Wilgus
1ea5d57303 [BugFix] TagNav Custom Menu Entry Wrong title, crashing menu
Wrong title is due to the VIRT_PTR being 0 so when a NULL
string is passed through P2STR() you get langid(0)
that was 'Yes' now it will be 'Rockbox'

the crashing menu was due to a call to retrieve entries that wasn't guarded
against  getting called on a menu with no entries

g#5911 introduced this path to call custom_action for shuffled track adding

Change-Id: I3918debbe2e79dfc9595df56b05b1ae59ba94317
2025-02-11 01:00:28 -05:00
Solomon Peachy
2c1d31fcd9 xduoox3: Fix inverted test for USB power supply detection
Only affected status display, charging is handled entirely by hardware.

Introduced in f3026cd0 (2024-11-02)

Change-Id: I08c7c442fb3bddf18e5a0d33dac963c24d3c9182
2025-02-10 14:31:32 -05:00
William Wilgus
d893da1929 tagtree.c get_tag() increase performance
while its not a particularly hot path it still gets called upwards
of 1000x on startup

with a little pre processing we can make it faster than even the
prior version

check first letter before calling function
move strlen check to after the case match

Change-Id: I0108aaf9828501b57b0950fbc24cd478a9eeacc1
2025-02-10 13:12:18 -05:00
Solomon Peachy
39285d06d5 xduoox3: Rework how we detect "charging" state
The "charging" status is apparently "charging needed" as it
is asserted even when power is not being supplied.  So first check
to see if USB is connected, and if so, then check the "charging" status.

Change-Id: I3050f187e0b6c9d97d25d80015b413cd02e5c3b2
2025-02-10 09:47:48 -05:00
Solomon Peachy
0a2a90c182 FS#13560: ATA: Don't check for 80 pin cables on SATA devices.
On PATA, we'd cap our transers at UDMA2 if the device reported that an
80 pin cable wasn't detected, but SATA devices do not perform this test.

So alter the check to only apply on PATA devices, so that SATA devices
can run at full UDMA speeds.

Change-Id: Id7aa25f2a702c0af73d707395439d69da1e04719
2025-02-10 09:23:11 -05:00
Solomon Peachy
8cc937f33a FS#13563: Updated Chinese (Simplified) translation (王吉)
Change-Id: Ied4b8191c1b00b24bfc5678526c004eb6277cd94
2025-02-10 08:52:30 -05:00
Solomon Peachy
0a29f8b452 FS#13562: Updated Korean translation (Hoseok Seo)
Change-Id: I04e4f88598a521882a880a96adc74bc0436cd93a
2025-02-09 17:06:50 -05:00
Solomon Peachy
210b5e602f FS#13561: Update Polish translation (Adam Rak)
Change-Id: I06ce6112825b7fa7c72951431a6ba2562c65e211
2025-02-09 17:05:41 -05:00
William Wilgus
a29af6e7c6 tagtree reduce size of get_tag lookup table
this is not a hot path only runs at start-up and tagnav reload
so speed is not so much of a concern

we can split the data into two separate tables to
remove the padding and allow symbols to be stored in uint8
(highest symbol <128) and do strlen at TOU

use uint16_t for get_clause()

Change-Id: I0f8663d0de9cac102f1d58b43bf200272754c466
2025-02-09 16:39:55 -05:00
Solomon Peachy
bb84e9def5 Update english-us "translation"
Change-Id: Ic9933064de5fc874cbdb395e822336fe623f2845
2025-02-09 08:41:57 -05:00
Solomon Peachy
fa0c81e0e4 french: Fix missing <phrase> syntax for LANG_RESET_EQUALIZER
Change-Id: I3415405e75a63f20a87f46addc6cba99922b3044
2025-02-09 08:33:54 -05:00
Paul Sauro
2e98889be3 tagtree: Special character/Numerical entry: reduce required CPU cycles to improve performance
Change-Id: I3939e417b78e674834af7154c4a1d0565f606aa7
2025-02-08 20:01:45 +01:00
Paul Sauro
d5fc0e4cb3 tagtree: "By First Letter" : fix numerical entry + add a "Special character" entry
- The "Special character" entry will show all special characters (non numerical + non letters)
- The numerical entry was bug, and could show some special characters from the ASCII table. It is now fixed.

Change-Id: I001fb322fab81918996e15e4d0ca6b7c9e5160af
2025-02-08 12:14:32 -05:00
Paul Sauro
2cf6a443b1 tagnavi.config: Add "Album Artists by First Letter"
Add a new entry, it is useful to go this way for large libraries rather than scrolling manually through the whole list

Change-Id: Ia54b613b4a5fa40863ebb176a549287d3a765a56
2025-02-08 12:14:32 -05:00
Paul Sauro
fa5d2f3edf Database view is fully translatable and entries can be voiced.
* All tagnavi.config entries pulled into language files
 * Database viewer looks up LANG_IDs from the entries
 * If we find a match, we can translate and voice these entries
 * Add (disabled) mechanism to allow voicing database metadata

Original patch by Paul Sauro
Modifications by William Wingus
Further modifications by Solomon Peachy

Todo/Problems:

 * Current Tagnavi headers are rather awkward in English
 * Can't voice the "By first letter" alphabetic entries
 * No mechanism for generating talk clips for DB metadata

Change-Id: Ic276ccda1bd8aae550d38be852bae4c6f697cd47
2025-02-08 12:14:32 -05:00
Solomon Peachy
3b850e0c6f toolchains: Correct bad default path for toolchain PREFIX
Change-Id: Ib4e91f72a4e1b4eae123f676610045309a891309
2025-02-08 10:57:31 -05:00
Roman Artiukhin
0847bcc110 metadata: opus, vorbis, speex: support embedded jpeg album art
It includes .opus, .ogg, .oga, .spx files

Change-Id: I3d0ee9806b05911fc8c3ce5cb761de87d4166141
2025-02-08 10:02:21 +02:00
William Wilgus
95f4accf45 use lcd_drawinfo instead of separate drawmode, fg, bg calls
Change-Id: I181ff3a93f03ce1ae44a20f2b216de400320207f
2025-02-08 01:02:22 -05:00
William Wilgus
e09b466554 screen_access add set_drawinfo
Change-Id: I32e4932eb3a6f06d45aff2cd767484d254a1c9ff
2025-02-08 00:49:28 -05:00
William Wilgus
b94b0d3bf4 Skin engine, optimize hot paths
callgrind identified check_viewport and scan_int as pretty hot code paths on startup
and playback

check_viewport uses strlen to check the string has at least 4 characters
we can just check if str[3] != '\0' without walking potentially much further
and no function call..

scan_int was building a buffer for atoi to parse when we can just do it in the loop
directly

Change-Id: Ie028980333cbed4c066d8ea547a89cf4fad76808
2025-02-08 00:49:28 -05:00
Paul Sauro
4bde992ca3 pp502x: Fully shut down storage power on older(4g/photo, mini, mini2g) iPods
On these older iPods, power was not being shut down completely, which led to a backfeed situation leading to decreased battery life and some stability issues.

This was particuarly apparent when using SD card adapters that do not
respect the ATA power management commands (ie all of them), as they never enter a low-power state on their own.

With this change, there are reports of battery life exceeding 20 hours of continuous playback (~30% increase with CF cards, 3x improvement with SD cards) and appears to resolve intermittent wakeup stability issues with SD adapters.

Change-Id: I46cfff7a59bb18a448989812303f30869df24d2d
2025-02-07 09:49:50 -05:00
Solomon Peachy
f60892e26c FS#13558 - Updated Simplified Chinese Translation (王吉)
Change-Id: Ifaa27865851694cd64593e1adc501fb8c9241f5a
2025-02-03 23:29:52 -05:00
Solomon Peachy
371797cf1f FS#13557 - Updated German translation (Wilfried Winkler)
Change-Id: Ib78162c9ae13397b27b76a69c316b8b7964584c1
2025-02-03 23:28:41 -05:00
William Wilgus
f55fe21f66 add itoa(), replace snprintf("%d") calls
we can save some space and still end up with a 20% faster function

Change-Id: Ia58900122944b8527ef01a673afe18ea794acb41
2025-02-03 01:23:49 -05:00
Solomon Peachy
9e61d53c7c FS#13556: Updated French translation (CHAPUIS Adhemar)
Closing in on that 100% mark!

Change-Id: If27f9820b6d96aabfaa642e3e387cb2704cb5795
2025-02-02 18:30:36 -05:00
William Wilgus
231d552972 isdigit replace with a slightly faster and shorter conditional
in testing of three ways of doing this
current: ((_ctype_+1)[(unsigned char)(c)]&_N)

alt1(this patch): (((unsigned int) (c) - '0') < 10)

alt2: ((unsigned int)(c ^ 0x30) < 10)

alt1 and alt2 are the same in terms of speed and instructions (on arm v7) but alt2 has one more
instruction on mips

(across several archs in godbolt mips, armv7v8, x86) and on ARM7 (clipzip) device about 9% faster

less false positives for both alt1 and 2 when you start supplying more than 8bits
not sure if that matters in practice though

I tried similar with isxdigit but could only get to within 1 instruction of the ctype implementation
although it negated the array lookup I saw no discernable speed difference on device

https://godbolt.org/z/qGvh4hqnG

Change-Id: I5c9e8fd3915709853e0e33427038e20a068058b6
2025-02-02 13:57:58 -05:00
Christian Soffke
cf42dd6b12 powermgmt: adjust sleep timer behavior
Responding to the bug report posted by iPodVT:
https://forums.rockbox.org/index.php/topic,55180.msg255292

- An active sleep timer that runs out will now cause the
player to shut down regardless of playback state

- When playback state is paused or stopped, once the
idle timer has run out, player will shut down, regardless
of any running sleep timer

Change-Id: I33de682a63ed1db76174eb2394ef5568f37cc677
2025-02-02 13:00:30 -05:00
Solomon Peachy
078699ef49 FS#13555: Updated French Translation (CHAPUIS Adhemar)
Change-Id: I6e9229710392cd85010230457c284f3ac3b21e81
2025-02-02 08:05:26 -05:00
Solomon Peachy
50e0c99832 dailyvoices: Switch back to 'espeak' for Bulgarian and Japanese
gtts rate limited us before even a single voice was generated.

Change-Id: Ibe705e5d6023e8046216a4e0cd48d5f60ed43ace
2025-02-02 07:53:31 -05:00
Solomon Peachy
f82f925f23 FS#13553 - Updated Turkish translation (Mustafa YILDIZ)
Change-Id: I350c25b111bf7bc364b5de3a5670799594244cbd
2025-02-01 17:31:29 -05:00
Solomon Peachy
14ba18b1dd builds: Add Japanese to the nightly voice set (using gtts)
Change-Id: I77fb5601d45c008f72b613f8e67148ccca738b71
2025-02-01 13:34:01 -05:00
Solomon Peachy
e4179e4ff9 FS#13554: Updated Japanese translation (Emi Foster)
Not quite 100%, but _very_ close!

Change-Id: I56848fbd5ae3791828aacdae833a8742aeaab4a3
2025-02-01 13:05:53 -05:00
William Wilgus
f501dd00eb short circuit is_diacritic for 5-15% text drawing speed-up
characters less than the first diacritic in the symbol table (0x300)
return false after checking the MRU table

we gain some performance by eliding the function call all together if less than first diacritic

Change-Id: I02c14e350eb168eca808523affad443cd43888b4
2025-01-31 21:48:44 -05:00
Solomon Peachy
c5103bab95 Translation updates:
* English-US (myself)
 * Italian (Alessio Lenzi)
 * Korean (Hoseok Seo)
 * Polish (Adam Rak)

Change-Id: I17e2e0a991c0bc221d60dbde6e2ec2e129c1780f
2025-01-27 11:22:44 -05:00
Vencislav Atanasov
fc4e0d912e iPod S5L87xx bootloader: Move variable declaration to avoid macros
No change in the bootloader binary for ipod6g.

Change-Id: I17a91ec8a710250b5400b06f9520360b814d1184
2025-01-27 10:58:31 -05:00
William Wilgus
4930fac05c [bugfix] run_debug_screen case-insensitive matching
Change-Id: If7ed57b34a7a13d7332742c117fdf67fc7e189d3
2025-01-27 10:27:25 -05:00
Solomon Peachy
8aa54286c4 Fix red in 43068ef270
Change-Id: Iea771deb777222908d85dc818a5f01ad6022881c
2025-01-25 15:47:10 -05:00
William Wilgus
43068ef270 [Feature] Set values of settings from shortcuts
Adds 'Add Current to Shortcuts' for settings alowing you to save
the current value and restore it with a shortcut

Change-Id: I0d5c5da9553248a70fd46d5553486ebf7865a20a
2025-01-25 15:13:13 -05:00
William Wilgus
bdf89bf4b0 settings set_file() cleanup unused maxlen and check for file exist
maxlen is set to MAX_FILENAME by all callers so lets just make that part of the deal
check the file exists before we set it

Change-Id: I3074f3164fcd4b8873b69612d5c1a51a39de4baf
2025-01-24 00:20:45 -05:00
William Wilgus
14898bc19e [bugfix] FS#13456 - Loaded FM preset list doesn't restore after restart
the fmr file wasn't being detected on multivolume targets

the global preset list couldn't be cleared once set

empty global preset file wasn't detected properly either

Change-Id: I9c4b40ed0b6f3dbb0d38eb668fc74a512ea34062
2025-01-23 23:58:10 -05:00
William Wilgus
277c66d9d2 : [bugfix,bugfix] ensure PREVIOUS tree_context dirfilter is restored on plugin exit
Change-Id: I521e8d660ca76744f5452643578c2f7e5651b870
2025-01-23 19:50:48 -05:00
Solomon Peachy
36e85ef78a voice: Correct a rather embarrasing bug in talk clip generation
Introduced

Change-Id: I150617267b8866a7ae09bf9c01430e7afbd369ed
2025-01-23 15:52:02 -05:00