Commit graph

38707 commits

Author SHA1 Message Date
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
Aidan MacDonald
23448a13d1 stm32h7: refactor clock init to target-specific callback
Given the myriad of clocking options the STM32H7 family
provides, it is easiest to let targets simply implement
what they need.

Change-Id: I9cceed40a2d638998e8b583651f73557d2ffbd46
2026-01-01 09:15:56 -05:00
Aidan MacDonald
37b90baa5f stm32h7: handle SPI transfers via interrupts
Change-Id: I6e60f4222f4d99019e72377de7c3b689a77ac548
2025-12-31 22:03:51 -05:00
Aidan MacDonald
7eed19dbaa stm32h743: add NVIC IRQ numbers
Change-Id: If50655268180f38ed4114c35779d32f25a3631b5
2025-12-31 22:03:51 -05:00
Aidan MacDonald
b0b4c6bf2f stm32h743: split SPI IRQ handlers
No sense in pessimizing this; each SPI instance has a dedicated
interrupt line.

Change-Id: I2243626c960873738e5d9cf4e60d2f9e635514e7
2025-12-31 22:03:51 -05:00
Aidan MacDonald
8d279aa48d stm32h7: simplify generic SPI driver
Supporting large transfers (>64k) isn't really needed;
the main use case right now is interfacing with an LCD
controller.

Change-Id: I901e5ddb1b4efa9aa650b3e5074537ba785c6d41
2025-12-31 21:15:43 -05:00
Mauricio Garrido
09a31fff91 3ds: Enable plugins for the 3ds platform.
This commit enables plugins for the 3ds platform.
And adds 3ds specific pad configurations for each plugin.

Change-Id: Ie28fef4da32ed4cd2caa6c9fa3b2fe312ee009ef
2025-12-31 21:13:34 -05:00
Roman Artiukhin
7d067ca798 imageviewer: jpegp: improve downscale quality
Use simple area-averaging for smoother images.

Change-Id: I7ac2db05262500041286404c97a615e4b3a43194
2025-12-31 21:11:51 -05:00
Hairo R. Carela
64e0ced696 rbutil: path suffix support for devices with non-standard paths
Only for themes, fonts and voice files, includes rgnano implementation to test (can be in its own commit if needed, with the required manual updates and changes to install rockbox itself with rbutil).

Change-Id: I2481e6a3224912a298cf4c86011226e466490e08
2025-12-31 21:11:10 -05:00
Aidan MacDonald
7418e65138 echoplayer: add 'debug' and 'flash' targets to makefile
This replaces the gdb & openocd config in utils/stm32tools
and is easier to use. Remove the srst workaround; it seems
this was caused by the D1/D3 domains not being powered up
while the CPU was in sleep mode.

Change-Id: I28cc0273b3004c6e3146bb2447f0655cad8bb1c2
2025-12-31 08:10:40 -05:00
Aidan MacDonald
025f3def04 stm32h743: make debugger attach more reliable
Add an optional sequence in the startup code to disable clock
gating when the CPU goes to sleep. Normally the D1 and D3 domain
clocks can be automatically gated when the CPU is asleep, and
because the debug infrastructure is clocked from these domains,
the debugger cannot attach when those clocks are stopped.

Setting some bits in DBGMCU_CR prevents this problem, but will
increase power consumption, hence it isn't enabled by default.

Change-Id: Iba87750371a493adf72655aab86a908ef2702cef
2025-12-31 08:10:20 -05:00
Aidan MacDonald
4b9b2c510e stm32h743: add DBGMCU registers
Change-Id: I47aecaad9a6c0fc0f8c4d2807585909b4bb5d7d6
2025-12-31 07:30:00 -05:00
Aidan MacDonald
8514c1c9a8 echoplayer: convert STM32H7 register access to RegGen
Change-Id: Ie16d7340a9f047e44cf510bc776030570edb3966
2025-12-31 07:30:00 -05:00
Aidan MacDonald
d8b0bc5797 firmware: convert ARM Cortex-M register access to RegGen
Change-Id: I225fb53da84946876d6c4af08af5f80197e71e95
2025-12-31 07:30:00 -05:00
Solomon Peachy
cc9ce232ab Translation updates:
* Latvian (Renalds Belaks)
 * Hungarian (Gyúróczki Norbert)

Change-Id: I85b15a925000ac5f8e63b368a7d0938224693a6c
2025-12-31 06:58:48 -05:00
Solomon Peachy
a8ff5597bd FS#13739: Updated Vietnamese Translation (Chu Khanh Hanh)
Change-Id: I5bc0086e9a6c144203456dcd5652e3dd1e9f8bda
2025-12-30 23:18:04 -05:00
Mauricio Garrido
0b3e0d1432 3ds: Small changes to port sources.
This commit does the following changes:

- Replace buffered io implementation with a simpler, lighter, slightly faster version.
- Turn off both screens when backlight goes off.
- Small change to enable plugins in the folling commit (s).

Change-Id: I45df30be037c3a1686bd85c16c87bcd248db456f
2025-12-30 16:30:34 -05:00
Aidan MacDonald
fcf67a2ea9 echoplayer: enable reggen
Change-Id: Iab8ffd231f226d2772201ad92f3920065b7b0736
2025-12-30 13:53:48 -05:00
Aidan MacDonald
44afcc8cbe firmware: add build rules for RegGen-generated headers
Change-Id: I86ff1a39aec1ee428abd6464483ae3732fdf9196
2025-12-30 13:53:48 -05:00
Aidan MacDonald
a8d792c248 firmware: add RegGen API header
Change-Id: Ifb79416f91a40d0a6538ba0b4a3c7b0496543a5f
2025-12-30 13:53:48 -05:00
Aidan MacDonald
1064aa8dab firmware: add RegGen description for Cortex-M
Change-Id: Iec8c8f1f962653cfa27c50b2bac8b2092eb7afce
2025-12-30 13:53:48 -05:00
Aidan MacDonald
e7b139b06a firmware: add RegGen description for STM32H743
Change-Id: I084c54bd1c2c2974e5fd0b1bfea68697b2b394ba
2025-12-30 13:53:48 -05:00
Marc Aarts
a3d16e34ec Update rockboxdev.sh:
- Change alsa-lib and libffi source to use https instead of ftp
- Change glib source to current path (avoids redirect)
- Change mpc source to GNU mirror because www.multiprecision.org seems down
- Change remaining http to https

Original reason for the change is that on WSL2 (Windows 11) for some reason ftp links do not appear to work.

Change-Id: Ib20470e39f625df790895452b6d6b4003cebae07
2025-12-30 07:11:11 -05:00
Aidan MacDonald
969a2b65c7 tools: add RegGen utility
This is a tool written in C which does basically the same job
as regtools' headergen_v2, but using a new input format which
is less verbose than XML. In the interests of simplicity it
omits some features that regtools does support, like variant
registers or the SoC selector stuff so it cannot completely
replace regtools on the i.MX platforms that use these features.

RegGen doesn't generate API macros like regtools does; instead
these are expected to be maintained by hand, since it's arguably
easier to do that way.

Since RegGen has no dependencies beyond a C compiler it can
be integrated with the build system without adding any new
build time dependencies. This will allow generating headers
automatically, which is a substantial improvement over running
headergen_v2 by hand and committing the generated output.

The RegGen tool itself is licensed as GPLv3+, but generated
headers can be licensed as the user chooses.

Change-Id: If18f9577f8f4df6e2c97c1665b725773dd5466f0
2025-12-29 18:51:56 -05:00
Sebastian Leonhardt
6552554939 Creative ZEN: split ZEN V keymaps off from other ZEN targets
The ZEN V target is the only one which has volume buttons,
but lacks the menu and shortcut buttons.
IMO an independant keymap will make maintenance easier.

Change-Id: Ide79fab629b13eae94946561d99052e570c0e4f2
2025-12-29 23:20:06 +01:00
Aidan MacDonald
cb9094dabb arm: fix start_thread() on Cortex-M targets
The layout of 'struct regs' is a bit different on Cortex-M
and start_thread() wasn't updated to match; it was loading
'sp' from the wrong offset.

Change-Id: I57dbef26809821d411dc86e2066a2f53e78a3f2d
2025-12-29 13:04:54 -05:00
Petr Mikhalicin
19a49220b1 plugin lrcplayer: Fix late rewinding at lrcplayer
If you try to rewind music at lrcplayer it
1. returns back to old time
2. play for some time (1-2 seconds)
3. only after that returns for new time

According to wps code audio_pre_ff_rewind function should be called
before any rewinding. It stops playback and automatically resumes it
after audio_ff_rewind call

Change-Id: Id3755bfe4deeb7cd5d889ad7d8e1dec45061fa5c
2025-12-29 12:58:47 -05:00
Solomon Peachy
716f45e291 Another correction for the Dutch translation
Change-Id: Ia20ba715264464be17516220933675eef2e825bd
2025-12-29 12:57:19 -05:00
Petr Mikhalicin
6f7d70797e plugin api: Add audio_pre_ff_rewind to plugin's API
According to wps code audio_pre_ff_rewind function should be called
before any rewinding. It stops playback and automatically resumes it
after audio_ff_rewind call

So, let's add audio_pre_ff_rewind to plugin's API

Lua scipts were tested:
```lua
-- has issue with rewinding
rb.audio("ff_rewind", 0)
```

```lua
-- no issue with rewinding
rb.audio("pre_ff_rewind")
rb.audio("ff_rewind", 0)
```

Change-Id: I2ad6b9c396760b2086bc0a28633a1c80c3512739
2025-12-29 19:58:26 +05:00