Commit graph

38735 commits

Author SHA1 Message Date
Sebastian Leonhardt
873163c671 iMX233 RTC init: make clock source (32kHz/24MHz) explicit for targets
Change-Id: Ib4fa56ad8ee28f3799b6c6c3c058d156353dd15c
2026-01-08 13:48:44 -05:00
Aidan MacDonald
2f2b90535a firmware: use C versions of memcpy and memmove for ARM Cortex-M
The ARM assembly versions of memcpy and memmove try to
directly modify the PC based on the number of bytes to
be copied as an "optimization"; but this only works if
instructions are guaranteed to be 4 bytes wide.

This trick is completely broken on Cortex-M, since an
instruction can be 2-4 bytes wide: for example a memcpy
of 4 bytes ends up storing 32 bytes worth of garbage to
the target address!

Use the C memcpy/memmove implementations for Cortex-M
instead; fixing the ASM version is more trouble than
it's worth.

Change-Id: I695587fd585ec25ef276f2dbc61e2290b7015e13
2026-01-08 16:41:59 +00:00
Aidan MacDonald
6f4b6a8078 make: remove asm.make and use asm/SOURCES directly
asm.make replaces source files listed in asm/SOURCES with
a corresponding .c or .S file under firmware/asm/${ARCH}.
This makes it difficult to handle differences within one
architecture, eg. different instruction sets or versions
of the architecture.

Get rid of asm.make, and instead use the preprocessor to
select the architecture-specific sources directly from
asm/SOURCES. This is slightly more verbose but is more
flexible.

Change-Id: Id2a484794d5d951b7ba7b54a552de6960414fa45
2026-01-08 16:41:57 +00:00
Vencislav Atanasov
e2196c4566 Run the LBA48 check only if the target has support for reading of SysCfg
This fixes a regression introduced in ad6cc2f0 for the ipodnano4g bootloader.

Change-Id: Iacf079adbfa85399b248a4c4ac35b93155a1d87b
2026-01-08 10:12:57 -05:00
Vencislav Atanasov
e3372f495e Add a dummy nand_get_info for ipodnano3g and ipodnano4g
All non-simulator and non-hostfs targets are required to implement storage_get_info() since 04dc052a

Change-Id: I87febd12e101797d9cbbffc0e2e46efc2dace9da
2026-01-08 10:12:51 -05:00
Solomon Peachy
98a182a19f genlang: More fixes
* "english.list" started the VOICE_* enumeration at the wrong number
 * vstrings file had the wrong string count

There is still one remaining issue; Currently the vstrings header is
generated with a section size that is consistently 6 bytes shorter than
the actual data. However, the non-voice .lng file has correct size.

Change-Id: I01f9622399cf3f3ac4c62ddea1deeb19a7b028ba
2026-01-08 09:35:12 -05:00
Solomon Peachy
24220d13e5 genlang: Correct the 'size' in the binary vstrings sub-header
It was only taking into account LANG_* strings, and ignoring VOICE_*

Fortunately rbutil currently ignores this field as it's not needed.

Change-Id: If58230cd047abe7a80ebab7eca9147e510b034ea
2026-01-06 23:09:49 -05:00
Aidan MacDonald
1f39ae52e3 codecs: fix compile error on ARM Cortex-M DEBUG app builds
Some of the inline assembly generates "impossible constraint"
errors in this function, but only when DEBUG is enabled.

Change-Id: I3b1135a8a55436bd3068ef560ebcef64a5184a05
2026-01-05 15:33:16 -05:00
Aidan MacDonald
e6e56ceb51 firmware: make lc_open_from_mem() optional
Define HAVE_LC_OPEN_FROM_MEM if the target implements
lc_open_from_mem(). Make HAVE_CODEC_BUFFERING depend
on this feature.

Change-Id: If5f70db58963dcdc33848b860c028841ac380ab2
2026-01-05 13:42:52 -05:00
Aidan MacDonald
cb2b2a5021 simulator: remove lc_open_from_mem() implementation
This was not actually used in practice because codec
buffering was switched off in playback.c.

Change-Id: Ic337db4a6f20972fe8a6480e7b182b5857294e9b
2026-01-05 13:42:52 -05:00
Aidan MacDonald
d791d26b6b apps: remove lc_open_from_mem() from plugin API
No plugin uses it and it doesn't work on hosted targets,
which limits its utility.

Change-Id: I5f29eec4dd11ffceb7be3e4d26e536483058055f
2026-01-05 13:42:23 -05:00
Aidan MacDonald
3d281c2ea3 apps: cleanly disable codec buffering when not supported
Move HAVE_CODEC_BUFFERING to config.h, and disable all
related code on targets that don't support the feature,
ie. hosted targets that can't implement lc_open_from_mem().

Change-Id: I0d2a43900cd05b1a80c3cee519f8ad7b26e39fe7
2026-01-05 13:15:49 -05:00
Aidan MacDonald
3d0888875e firmware: introduce CONFIG_BINFMT
Add CONFIG_BINFMT to select the binary format used for
plugins/codecs and define two options for the existing
implementations (native ".rock" format or dlopen-based).

Split the load_code.h header into two separate headers
to make it look less messy.

Change-Id: Ibd66773160df35a8c6f29a617d12c961bdabf317
2026-01-05 13:14:30 -05:00
Hairo R. Carela
8b6491db57 rbutil: fix stray rbutil.log creation when using a suffix
When instaling rockbox rbutil.log was still created in /sdcard/.rockbox

Change-Id: Iea987623a206d8c8f663e8ef0ee26a103ccc285f
2026-01-05 11:54:27 -04:00
Nyx Guan
012245c51f tagtree/tagcache add new clause operator contains_oneof
new operators @~, *~
contains_oneof and not_contains_oneof

genre @~ "metal|core"
black metal, death metal, grindcore, mathcore

genre ~ "jazz" & genre *~ "rock|pop|fusion"
included: jazz, free jazz, cool jazz, etc.
excluded: jazz rock, jazz pop, jazz fusion

Change-Id: If9590c8607b58373a98f5c9ea537f54df78d5a2f
2026-01-04 22:55:40 -05:00
Solomon Peachy
b31becd4bc lang: Actually remove the deleted translations from SOURCES
Change-Id: I3cca83c2c999cbd99361606ef3fafc341d5b1395
2026-01-04 17:43:41 -05:00
Solomon Peachy
87f135b349 Retire the Afrikaans and Walliser German "translations"
They have not been touched in over 20 years, and have effectively
bitrotted to the point where they are effectively untranslated.

Any interest in these translations would have to effectively start from
scratch anyway, so let's stop pretending the status quo is useful.

Change-Id: I13e1ae920883f5babb232f0592076be24c8122d4
2026-01-04 17:25:51 -05:00
Solomon Peachy
2c30a6e243 voice: Switch default Turkish Piper TTS voice from fettah to dfki
The former was removed from the upstream repositories "at the request of
contributors", leaving only the latter.

Change-Id: I4afe827be9037915d6d13b4d7ec0713509b88da3
2026-01-04 17:24:53 -05:00
Aidan MacDonald
2e532129d7 echoplayer: add storage & RTC demo in bootloader
Change-Id: I146e2205182239ed9d0176c23e3d0ad05e72a3be
2026-01-04 10:27:30 -05:00
Aidan MacDonald
6a8989f347 echoplayer: enable SD card using sdmmc_host
Enable pullups on SDMMC CMD/DATx lines and set output
speed to medium. Using HIGH and VERYHIGH speeds seems
to cause data corruption, with frequent CRC failures.

Change-Id: I732d19e03a2a857453755b68b6749497eafaef70
2026-01-04 10:27:15 -05:00
Aidan MacDonald
141b4a223f stm32h7: implement sdmmc_host-based SDMMC controller driver
Change-Id: I26c47c630ea364de043a224b549d7867fb1e5794
2026-01-04 09:31:05 -05:00
Aidan MacDonald
38db211a48 stm32h743: add SDMMC registers and RCC_AHB3RSTR register
Change-Id: I134a10e4b9116b85ec4327cc76c539c8340973cf
2026-01-04 09:31:05 -05:00
Aidan MacDonald
ed1f34af75 system: add membarrier() function for compiler memory barrier
Change-Id: I27be9b635bdabee523e56dd0c2245812cb7647eb
2026-01-04 09:08:22 -05:00
Aidan MacDonald
87bf6b4ebb firmware: add sdmmc_host storage driver
sdmmc_host is a portable driver for targets with SD/MMC
storage. It handles all the logic needed to initialize
and access SD/MMC devices which is common to all targets.

Targets only need to implement functions to issue SD/MMC
commands, manage clocks & power, and managing the insert
state of the card (if it is hotswappable). This vastly
reduces the work needed to get a new SD/MMC based target
up & running.

At present it's only written for and tested with SD cards,
as I don't have access to an MMC-based target to test on.

Change-Id: I6a0d7747113c11a3697ae20cbb551bef8bfd1292
2026-01-04 09:07:06 -05:00
Solomon Peachy
385483d6c5 manual: Don't lead a paragraph with '\\'
(Turns out that tex4ht is a lot pickier than latex)

Change-Id: I4fa320a14ca6fd136fb8abc31120ebecb17a23e3
2026-01-03 23:18:53 -05:00
Marc Aarts
1f97ae73a5 Use user preferred touchscreen mode in 'Main Menu Config' plugin instead of defaulting to 'button' mode.
Motivation:

1. 'Absolute point' mode works fine in this plugin.
2. This plugin is part of the Rockbox menus. If the user setting is not 'button' mode, it is unexpected to have only this menu work in a different mode compared to all other menus.

Change-Id: Iec91d3cd875e8a80e835a4a58d87a6ec84529def
2026-01-03 20:25:13 -05:00
Sebastian Leonhardt
a0bd48bfd7 Creative ZENV: fix keymap
(remove overlooked reference to BUTTON_MENU)


Change-Id: I63e8f19726dc04c57e45fa4ad704fe83951ed987
2026-01-03 20:03:24 -05:00
Hairo R. Carela
d695c3b95b rgnano: rbutil support and manual updates
Needs some testing in windows but except for uninstalling everything should work.

Change-Id: I55691d4cae9b37921f08177edaadc88854fef948
2026-01-03 20:03:12 -05:00
mojyack
e3bb80384d usb: do not call usb_core_do_set_config(0) inside bus reset isr
Change-Id: Ic06719ef92cd1fae42c7155ab72029466826a59b
2026-01-03 19:58:38 -05:00
mojyack
6db1e937e9 usb: set config to 0 on bus reset and exit
Change-Id: I4ee0e33f031388d17b30bbe591fe9b7d6386e940
2026-01-03 19:58:07 -05:00
mojyack
03fbd2784d usb: preparation to support multiple usb configs
- existing class drivers are placed to config 1
- drivers_connected==true is replaced with usb_config!=0
- supports config transition between nonzero configs
- STALL if request set_config was invalid

Change-Id: Ia775ae2dcb7d0cc08d2f3ee5ca41683837b04259
2026-01-03 19:57:33 -05:00
Aidan MacDonald
ea49358cc6 playlist: fix missing cleanup on OOM in playlist_resume()
Introduced by 3892773bd7, my fault for hitting merge
too quickly...

Change-Id: I18bbc3259a67664753a608a0175c59ee5a4241e0
2026-01-04 00:05:16 +00:00
mojyack
3892773bd7 playlist: fix deadlock when calling playlist_restore() on certain timing
for example:
<audio> audio_thread
<audio> -audio_playback_handler
<audio> --audio_start_playback
<audio> ---audio_fill_file_buffer
<audio> ----playlist_peek
<main>  -playlist_resume { playlist_write_lock(playlist) }
<main>  --alloc_tempbuf
<main>  ---core_alloc_ex
<main>  ----buflib_alloc_ex
<main>  -----buflib_compact_and_shrink
<main>  ------playback.c:shrink_callback
<main>  -------audio_queue_send(Q_AUDIO_STOP)
<main>  (waiting for audio queue reply)
<audio> -----get_track_filename { playlist_write_lock(playlist) }
<audio> (waiting for playlist lock)

resolve this by not locking playlist until temporary buffer is allocated

Change-Id: I55a856780d17455b13e2515e096095ae0e9c86c2
2026-01-03 18:56:57 -05:00
Solomon Peachy
ef47ffe250 Fix the last of the issues introduced in 350a2250b
Change-Id: I4b58f5d9d1c4649080826a9cf1b438e13ed7ce81
2026-01-03 14:42:54 -05:00
Solomon Peachy
247d2020fa Mechanical correction for Ukrainian translation
Change-Id: Iaf1476e81c6145cd33ec35267027cb172732f5a5
2026-01-03 14:03:57 -05:00
Solomon Peachy
ae1bcbf913 FS#13743 - Small fix for Ukrainian translation (Pavlo Rudy)
Change-Id: I250bd30cfceaf7c210626c18697ede2ccd90d5bd
2026-01-03 14:02:08 -05:00
Solomon Peachy
5bbd4d63f0 Fix build errors+warnings introduced in 350a2250b1
Change-Id: Ia5f2079ccc99da30e0058b0d9ce5bb8369201804
2026-01-03 13:59:53 -05:00
mojyack
eccce5b267 docs: add myself to CREDITS and COMMITTERS
Change-Id: I8d4d29a9bdd7d6eb75d4240e6aebc026aa959e2b
2026-01-03 13:30:08 -05:00
mojyack
350a2250b1 usb: implement endpoint allocation
this commit has following changes:
- introduce `usb_drv_ep_spec` table to udc drivers, which represents
  endpoint characteristics.
- introduce 'ep_allocs' table to class drivers, which represents what
  endpoint type does the class driver want.
- implement endpoint matching logic to usb core.

this is a required step to implement usb config switching, because we
need to create config descriptors without actually initializing endpoints.

Change-Id: I11c324cd35189ab636744488f6259d0cdb2179f0
2026-01-03 13:23:53 -05:00
Hairo R. Carela
f13f80c506 rbutil: more path suffix support
This commit adds suffix support for some missing components:
- Info widget
- Voice/talk files generation
- Backup
- Uninstall

Also fixes a crash in the uninstall window when there's no bootloader to select.

Change-Id: Ie97505a8cbd12dddf160bdebae2c04e738c373e5
2026-01-02 22:41:03 -05:00
Solomon Peachy
8aec8ee686 configure: Filter out "-Wl,-z,noexecstack" for winsim builds
Change-Id: I0222627729fbd475dfa7f4955b534f76ca780ccf
2026-01-02 07:51:44 -05:00
Aidan MacDonald
20d31c114a arm: use optimized find_first_set_bit() on Cortex-M
Use the optimized version based on __buitlin_ctz() which GCC
will compile to two instructions (rbit, ctz) on Cortex-M4/M7;
faster and smaller than the handcoded assembly version.

Change-Id: I33f69ff829b048f1e53fc7ead1bd6ac3c5bd7a4c
2026-01-01 11:25:43 -05:00
Aidan MacDonald
4ceb9e22d6 echoplayer: drive LCD parallel bus using STM32 LTDC
This is much, much faster than using SPI and is able to
offload the CPU completely.

Change-Id: Ia4c0289775296fe41d594ba849bd057e8482306e
2026-01-01 11:16:23 -05:00
Aidan MacDonald
e98dc7936c stm32h743: add LCD-TFT controller registers
Change-Id: Icefbe3c7f10a38c424105586b0bccf6941972cb1
2026-01-01 11:16:23 -05:00
Aidan MacDonald
801f386d9d stm32h743: add AXI GPV registers
Change-Id: Ie048e60701405e9aeafa6aa066cd88b3354e11c2
2026-01-01 11:16:23 -05:00
Aidan MacDonald
ddb2dfa267 stm32h7: simplify bootloader linker scripts
Remove ifdefs for load to RAM, it won't be usable once
the bootloader is able to load Rockbox.

Change-Id: Ia0c9261d2073261f4089ce1804d7a3483c959d6e
2026-01-01 11:15:14 -05:00
Aidan MacDonald
5137ef49e3 stm32h7: support setting bus frequency in SPI driver
Change-Id: I71edf28fdc24d8a00d27aa727815f99e788b675a
2026-01-01 09:17:17 -05:00
Aidan MacDonald
a4b0af2a44 stm32h7: add function to get frequency of a clock
Change-Id: Ice60bc0e443a134ebb8ec03015fef98991ef9b05
2026-01-01 09:17:17 -05:00
Aidan MacDonald
a9b75fc4c4 stm32h7: support clock enable/disable in SPI driver
Change-Id: Id4baa340e1b67fb265628add9191acb08e3a0615
2026-01-01 09:17:17 -05:00
Aidan MacDonald
ddb3bb354c stm32h7: add clock enable/disable callbacks
Change-Id: I4c135ba9cbed2c8e607c5f191bb9d82638f9b6b3
2026-01-01 09:15:56 -05:00