1
0
Fork 0
forked from len0rd/rockbox
Commit graph

38236 commits

Author SHA1 Message Date
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
Solomon Peachy
a220402d51 voice: clean up a debug message
Change-Id: Iee8c68a8e943218ce53b46a7150af7df08702719
2025-01-22 13:22:25 -05:00
William Wilgus
9bcf6a8bb7 [bugfix] ensure tree_context dirfilter is restored on plugin exit
rockpaint is the only plugin doing anything dit setting the dirfilter pointer
it appears to restore it but this is cheap insurance on weird crashes
that result..

Change-Id: I70c826d6ec4c9cb6e1539ab23f1de82ca3e67ad1
2025-01-22 00:33:54 -05:00
William Wilgus
f3a858e16c [bugfix] tree.c rockbox_browse dirfilter use after free, set_current_file_ex
rockbox_browse() set its own *dirfilter and then may neglect to restore it

set_current_file_ex()
can take a unified path and file or separate path and file

only issue is when you send a folder and don't have the final slash
its then interpreted as a file and current file is set to it
meanwhile path is split and you end up in the parent dir

instead if filename is null check if path points to a directory
if dir_exists(path) then we will use it as is and set filename to ""

Change-Id: I6beaa91141c1a4025cdfac5d6ba426137146c212
2025-01-21 22:10:46 -05:00
William Wilgus
3c9233e972 [Feature] shortcuts_view plugin remember last item and return to it on menu cancel
Also adds the ability to supply a directory without the final slash
you then are take to the directory but have the ability to travel
up one level above before exiting
when you hit cancel

Change-Id: I1091fbe496e2c7c34ecb2113ab1cd31b0c678d9d
2025-01-21 22:10:46 -05:00
William Wilgus
db477bdeda settings.c make lasttime static
statusbar can use reset_runtime() and we can ensure topruntime gets updated
before clear

Change-Id: I3712649fc394c42f911ec88404c831422872c25b
2025-01-21 18:48:05 -05:00
Christian Soffke
2debcf2c1f Fix %Vp in SBS error message after USB disconnect
Stops “Error accessing playlist control file” message
after returning from USB mode, due to control file
fd being closed

Change-Id: Ic4ecb276ef32f8dc24fe7e540742161b50934c73
2025-01-21 22:24:20 +01:00
William Wilgus
7100090f99 Remove NVRAM infavor of a separate cfg file
remove nvram and use the existing settings framework for it

add a crc check to the user_settings data to see if we need to save
the user setting file or if we can just save the status file (resume.cfg)

move volume to the system_status struct so we don't write the whole settings file
over volume changes

allow user to still export volume with save sound settings

allow the user to also export pitch and speed

name the file .resume.cfg

Rename all the SYSTEM_STATUS save file variables to TLAs to save space and
discourage tinkering

Cleanup DEBUG_AVAIL_SETTINGS output

when saving user_settings it calls status_save as well this cause the resume
file to be written twice. instead remove the callback for status_save
when setting_save is called

remove header text when saving .resume.cfg

convert status_save() to status_save(bool force)
add SYSTEM_STATUS_UPDATE_TICKS

for ATA device set this to 5 minutes
since we arlready wait for the disk to be up before saving
we don't want to miss our window

for all other every 15 minutes

that way if the battery is too low by the time shutdown comes around you
don't lose much progress

Change-Id: I27214ffd6e5d5494ee5ca83b14f04a41ba426ad7
2025-01-21 00:04:32 -05:00
Vencislav Atanasov
8e293b4948 serial: Add serial_tx_raw() function for sending raw bytes to the serial port
serial_tx() can only be used for NULL-terminated strings, and also adds CR before every LF.

Change-Id: I8c3eafa5bc152bb54abf4629ee76396dc1cb9b8c
2025-01-20 08:17:48 -05:00
Solomon Peachy
46eb089f97 More fixes for when both battery PERCENTAGE and VOLTAGE are enabled
Hopefully this fixes the last of the red

Change-Id: I732a595cfda088fb5517a15d83c29427dfc18137
2025-01-20 08:16:38 -05:00
Solomon Peachy
07b0015d17 Fix android build, regression from 96463d855f
Change-Id: I1ddb80645c0e895a536a1cec8bebf6e721f8932e
2025-01-20 07:14:48 -05:00
Dana Conrad
96463d855f erosqnative: hw4 units prefer egauge battery percentage
Use AXP2101's egauge battery percent level if available (hw4 units).
If not available (_battery_level() will return -1 on hw1-hw3 units),
fall back to voltage battery level.

Also fix logic in axp2101_battery_status()

Change-Id: Ic300418532dae6f7772fff8bf5e2b32516f3b973
2025-01-19 17:30:21 -05:00
Vencislav Atanasov
f566f63b63 iPod S5L87xx dev bootloader: show error code if OF fails to boot
Change-Id: Ie00bcdd81b9385b89389ea90b6b0581f6142c37e
2025-01-19 14:52:01 -05:00
William Wilgus
02c256565f [FixRed] Reove HAVE_PITCHCONTROL from bootloaders, fix warble
Change-Id: I85a3580bd5fac881ca36efc260791d03f0b8c83a
2025-01-19 01:20:58 -05:00
William Wilgus
af859acf04 Tie NVRAM CRC to NVRAM_BLOCK_SIZE
by tying initial to NVRAM_BLOCK_SIZE we get automatic invalidation when the
system_status struct changes

Change-Id: Icd8fad14bdd31dddd609833830c939d5560feeb1
2025-01-19 00:29:47 -05:00
William Wilgus
4e271642df [Feature] Persist pitch settings through reboots part deux
Revisit this after discussion with chris_s on IRC and forum

Pitch menu now changes icon when pitch has been changed

uses NVRAM to save the pitch settings unconditionally

Manual updated

Change-Id: Idcb4c2b7fe42f7a203dc4bfc46285657f370d0fd
2025-01-19 00:29:47 -05:00
Christian Soffke
3e57ca15a5 skin_parser: fix parse_filetext fd not closed
Change-Id: I5efb0474a349c2cdf58e8e6dfd3de6fb40444a79
2025-01-18 14:32:01 -05:00