Commit graph

38785 commits

Author SHA1 Message Date
Solomon Peachy
e13619b888 usb_audio: Fix compile failure with a (debug && !logf) build
Change-Id: Ie571020b0187c791d02b00c82af2d0dbc2237227
2026-01-19 09:24:41 -05:00
Solomon Peachy
8d15aff38a devinput: Fix regression on Hiby R1
3a4da9381e change an underdocumented definition that turns
out to be important, yet not documented in the linux uapi definitions.

Revert that change, and document the magic values so this doesn't happen again.

Change-Id: I0fac4a9d68170920bb5db1018d765e8a2994a95f
2026-01-18 07:45:39 -05:00
Solomon Peachy
b9ce049876 debug: show touchscreen info in the hw debug screen on hibylinux targets
Also add this debug screen to the hiby r1 / r3proii targets.

Change-Id: Ia255571838baef9900f6b6a3c395c10b872f5f5a
2026-01-17 22:48:29 -05:00
Solomon Peachy
a9e4c80878 hibylinux: Button code should be displayed in hex.
Change-Id: I3581098f632ba8fe0146b677f575ec6159c7c2db
2026-01-17 20:10:51 -05:00
Solomon Peachy
3a4da9381e surfansf28: Correct touchscreen operation
Based on what's committed I don't see how it could have ever worked.

Change-Id: I3c28e2c8791e75c494474183d1347426de9804fc
2026-01-17 19:58:21 -05:00
Christian Soffke
f0d99391de plugins: random folder advance: misc improvements
fixes:
- traverse_dir was called recursively using two
  MAX_PATH local buffers => possible stack overflow
- The import function inserted additional, incorrect,
  entries when the whole line buffer was filled
- "Dirs not found" message overlapped number
  of folders when generating folder list
- Final number of scanned folders wasn't displayed
- Wouldn't stop inserting when maximum number
  of files in playlist was already reached
- Prevent buffer overflow when importing
- Don't write to fd after opening failed
- Use whole buffer with read_line, instead
  of subtracting 1. Remove hard coded sizes
- CRs don't need to be removed in import function
  (already handled by read_line)

features:
- Use insert context for *much* faster insertion
  of large # of folders, and nicer progress display
- Use UI viewport
- Add progress indicator when saving or loading
- Display number of folders in edit list title
- Go back to plugin's main menu from edit list
- Only ask to save changes if list is dirty
- Warn before erasing modified playlist
- Flag successfully created playlist as modified
- Make folder scan wait for dircache
- Shorten menu item names
- Put "Play Shuffled" menu item first
- Remember selection when returning from submenus
- Go to WPS after ACTION_TREE_WPS
- Exit menu when pressing Back
- Perform an initial scan, if no data file exists
  yet, when "Play Shuffled" or "Edit" is selected

Change-Id: I7df76f8fb8387888ce491d8b74b01b481e9997d3
2026-01-16 16:49:38 +01:00
Solomon Peachy
fcb2289274 voice: when building from vstrings targetid needs to come from within
Change-Id: I2a1c6a249523ec7a1d339e7b08f1686dad1d0270
2026-01-15 09:20:06 -05:00
Solomon Peachy
dd0d9549ab Fix red in 75edff7880 due to various bootloaders
Bootloaders don't have support for queue_peek or other advanced
queue functionality, so USB-enabled bootloaders can't play these games.

Change-Id: Ib807b57b84433e7a2ad019648a6c588ab424c6cd
2026-01-14 16:56:51 -05:00
mojyack
75edff7880 usb: fix random "null ctrl req" panic when switching usb config
Change-Id: I7839edb99461abfbff03460d63343691085ef34f
2026-01-14 16:23:07 -05:00
Christian Soffke
d395520cd0 fix yellow 2e9c2da
Eliminate static pointer

Change-Id: Id26363771439dbd1f08c661ae2ff4277e0e8f288
2026-01-14 17:49:42 +01:00
Christian Soffke
2e9c2dafb2 fix use of out-of-scope stack memory in 18dfd8f691
when calling do_menu recursively

Change-Id: I949cf1cedd80746a7e29b67804470365987046f3
2026-01-14 17:11:50 +01:00
Christian Soffke
c296c2781a fix regression 18dfd8f691
The WPS, or certain screens accessed directly from it,
may have displayed a title when they shouldn't have.

Change-Id: I655f58aa7c4ff3ff996d9798fdbe06c14f09c27b
2026-01-14 15:33:56 +01:00
Christian Soffke
4541c94292 metadata: vorbis: fix warning when building sim on aarch64 linux
b64_codes is unsigned on some systems unless explicitly
declared as signed.

"b64_codes[index] < 0 comparison is always false due
to limited range of data type [-Werror=type-limits]"

Introduced in 849e8ab

Change-Id: I6a86e898c2ed8995f7346060f9b9b58ea6ab1e95
2026-01-14 15:11:34 +01:00
Christian Soffke
58616e685d gui: yesno: don't force redraw when leaving screen
Change-Id: Ic37ee29318535952e9420c2f58e24bbb27183120
2026-01-13 20:07:03 -05:00
Christian Soffke
18dfd8f691 Reduce list title glitches when switching between menus
Each time viewportmanager_theme_enable (or _undo) is called,
the SBS title is reset, even if the theme remains enabled.
Thus switching from one menu to another, if do_menu is called
again, briefly results in an empty title before the correct
one is displayed. Even unchanged titles will unnecessarily
flash for a moment. Other theme elements that are drawn using
conditions based on the title, may also appear glitchy.

This patch adds a way to make the status bar title persist by
copying it to a static buffer. Persistent titles are not reset
by toggle_theme (although scrolling will be stopped in
viewportmanager_theme_undo), so that the theme can immediately
display the appropriate title in do_menu, simplelist_show_list,
the yesno screen, or plugins that want to keep the theme enabled.

Change-Id: I1ec8f233b730321793eb7d3cad51496ee1b35440
2026-01-13 20:06:33 -05:00
Christian Soffke
399230e9ec Use SBS title in delete confirmation screens
When deleting files or directories, you will now see
the path's basename in the previously empty title of
an SBS, making it a bit easier to immediately know
whether you've selected the correct item.

Matching titles were also added everywhere else that
confirm_delete_yesno is used.

The full path of the item is still displayed below,
and continues to scroll, so that themes without a
title, such as the default cabbiev2, will look the
same.

Change-Id: I32422cfbbf6e680f58456237380176617789cac3
2026-01-13 20:05:43 -05:00
Solomon Peachy
d1c3e3b08b Partial revert of 04c45933e
mmc_sleepnow() was accidentally removed from the imx233 sdmmc code,
causing the sansa fuze+ build to fail.

Change-Id: I935f7f4fe99e7353a84dc26e81d85ee55afa0de3
2026-01-13 19:42:34 -05:00
Solomon Peachy
7518b8c309 debug: only show usb_charging_maxcurrent() if HAVE_USBSTACK is defined.
HAVE_USB_CHARGING_ENABLE isn't enough, as the ihp3xx targets have an odd
combination of USB charging but rely on an external ATA bridge.

Change-Id: I2cba5f218971ac23cde8dca34faa06bbb44a2448
2026-01-13 19:28:54 -05:00
Solomon Peachy
4850684149 Fix red introduced in 41d5ca3c48
Later GCC versions are apparently more permissive than older versions
when it comes to variable declarations not part of a block (ie {} that
immediately follows a case statement.

This resulted in every non-simulator device target failing to build,
along with sim build on older compilers.  I should have caught this in
the review; mea culpa.

Change-Id: Id32e085e34601cca7be273ed45711a4b8ee182a0
2026-01-13 17:28:36 -05:00
Aidan MacDonald
bc32d43c17 echoplayer: add charger detection and USB current limit setting
Note that USB current limiting is more or less wishful
thinking; only the charge current is limited, but the
system could easily draw more than 100 mA by itself.

Change-Id: I1083b015f0abea5a39a602ca8d7b142d3613b46b
2026-01-13 17:00:12 -05:00
Aidan MacDonald
cd20bc7d16 debug_menu: show USB charging current limit on battery screen
Change-Id: I5cbcdba5724616e85cde1cf9e422c8ccdb34592b
2026-01-13 17:00:00 -05:00
Aidan MacDonald
350e2b9b02 firmware: add missing 'void' in usb_charging_maxcurrent() definition
Change-Id: I5d1dbb9176160ae98a8ab20ac3436610cf8b805d
2026-01-13 16:59:49 -05:00
Aidan MacDonald
04c45933e8 firmware: get rid of unused "xxx_sleep()" storage driver function
storage_sleepnow() is the one that is actually implemented
by storage drivers. storage_sleep() sends a Q_STORAGE_SLEEP
event to the storage thread, which will normally end up
calling the driver's sleepnow() function.

Change-Id: Ib6523073348431dcc75c0f10ef99060c6960efd8
2026-01-13 16:59:39 -05:00
Arin Kim
41d5ca3c48 skin: add new %pP tag (playlist progress as percentage)
This new tag returns the position in the playlist as a percent. The main usecase for this is to use it as a bar tag, allowing themes to visually present playlist progress.

Change-Id: I0eb001e7458d97b8a0db39f3980d9c283bc8806b
2026-01-13 16:59:00 -05:00
Solomon Peachy
1c429e2209 settings: double internal size of "path list" from 80 to 160 bytes
* Autoresume path list
 * Database scan path list

Gives us a bit more headroom

Change-Id: Icb78d6f46dd39658334ddc3d8dc44863b0e138b4
2026-01-13 15:07:22 -05:00
Aidan MacDonald
450687bc3d stm32h743: fix incorrectly defined SRAM3 size
Change-Id: Ia31e22fb2c6e7becf380abf440b03a73ec383582
2026-01-13 13:42:51 -05:00
Aidan MacDonald
adb5e2e44f arm: handle unaligned addresses in Cortex-M cache ops
For commit-type operations it's useful to be able to pass
unaligned addresses, so round the address/size to ensure
all cache lines in the address range are hit.

Change-Id: Ibb23050ecf11b6ef6ab1dd517990a68ef62ecfa9
2026-01-13 16:20:45 +00:00
Solomon Peachy
74d86ab965 manual: Document the 'database scan paths' setting
Change-Id: I3a6505655461c13fac4f2246277b811757bdd180
2026-01-13 07:55:04 -05:00
Solomon Peachy
d9289e7f5c rbutil: Use lang-enum.txt in voicestrings.zip if present
With this change, the code that looks for the VOICE_INVALID_VOICE_FILE
and VOICE_LANG_NAME to produce standalone clips will finally work.

Change-Id: I65ec592a1d3a6c83f92efadec72657c42552b41a
2026-01-12 20:22:43 -05:00
Aidan MacDonald
55f2e2d5d5 echoplayer: fix incorrect loop bounds in lcd_update_rect()
Change-Id: I96b3d235db4a988374967131caba0344c655e5d3
2026-01-12 19:41:08 -05:00
mojyack
c41242615e usb: designware: allow maxpktsize >= 1024
Change-Id: I25a1bc2be8e5b4028a360d80411d4e0182a50c99
2026-01-12 17:00:23 -05:00
mojyack
3dff77460d usb: arc: fix unable to receive 64 bytes long control packet
by adding QH_ZLT_SEL to control endpoints

Change-Id: I27ccf6a6db302688f1df2e6fd1d3fe98c20323cf
2026-01-12 16:59:34 -05:00
mojyack
1319426749 usb: hid: move hid definitions to usb_hid_def.h
Change-Id: I5883d27b96dcedfc0d0149961228a170b8d8e744
2026-01-12 16:57:36 -05:00
Aidan MacDonald
97dce282b4 echoplayer: add USB support
Enable high speed USB for the Echo R1. Includes reasonably
complete support for full speed USB on the STM32H743 since
that was necessary to debug why it wasn't working at first
(which turned out to be a bug in memcpy, not a hardware or
driver issue).

Change-Id: Ie713195b22ba88c79b9b0d6eb289cb9ccd2763c2
2026-01-12 19:13:23 +00:00
Aidan MacDonald
671320b5d1 echoplayer: implement basic power-on / power-off logic
Use cpu_power_on as a GPIO to keep the main power supply
enabled when running from battery.

Change-Id: Ic79283a0cc640585a0297e11f9dcc2264ec9af26
2026-01-12 13:01:35 -05:00
Aidan MacDonald
e29780fe09 firmware: fix thread_exit handling on ARM Cortex-M
The "mov lr, pc" instruction doesn't link a proper return
address in Thumb mode: bit 0 will be unset, leading to a
UsageFault exception when returning from the thread's main
function.

Cortex-M has the "blx" instruction to automatically branch
and link the correct return address, so use that.

Change-Id: I4c0ca55b1b2204286343f906f0b53be0c0ddc392
2026-01-12 15:37:29 +00:00
Aidan MacDonald
af4ff3e270 firmware: split ARM classic & Cortex-M thread implementations
The implementations diverge enough that it is too confusing
to support them in the same source file; split them so it
is easier to understand.

Change-Id: Ic2f91c75e8a9bb605241441f2caed841585f5b87
2026-01-12 15:37:27 +00:00
Solomon Peachy
2db798ff6d FS#13755: Updated Moldavian and Romanian translations (Mihai Alexandru Vasiliu)
Change-Id: I631393e17de68ea80e5f9b7ccc8793d1273b07d5
2026-01-12 08:26:16 -05:00
Nyx Guan
b9089640a3 Add Nyx Guan to CREDITS
Change-Id: I23245e46c3ab0173da513a483724ce51819fdaca
2026-01-10 21:31:49 -05:00
Aidan MacDonald
d15ccd771d echoplayer: add function to enable 1V8 regulator
This supply is shared by the USB PHY and the audio codec,
so it needs to be reference counted to allow them to be
powered up & down independently (and not just leave the
1V8 regulator enabled all the time).

Change-Id: Ib99b41c2a94b9f0c378153b33c6f91b4370ee998
2026-01-10 21:29:23 +00:00
Aidan MacDonald
80e1c2b27e usb-designware: allow setting USB speed in DCFG register
This allows targets to select full speed operation instead
of the default high-speed mode, which is mainly interesting
for debugging USB communication.

Change-Id: I405ff63c6660ca03ea04282a12b59dac06ca46f5
2026-01-10 21:29:23 +00:00
Aidan MacDonald
5dd2756b14 usb-designware: allow setting FDMOD bit to force device mode
If the PHY doesn't correctly report the ID pin state,
then the DWC2 core may operate in host mode by default.

Defining USB_DW_FORCE_DEVICE_MODE in the target config
will set the FDMOD bit in the GUSBCFG register to force
the core into device mode regardless of what the PHY
reports.

Change-Id: If2391aaa4a7c65ba6c90dd56074faeb3ed1ac2ca
2026-01-10 21:29:10 +00:00
Aidan MacDonald
361cd46a08 usb-designware: fix incorrect cache discard with DMA disabled
Two cache discards for targets with POST_DMA_FLUSH were
not properly guarded by USB_DW_ARCH_SLAVE, which causes
data loss when DMA is disabled.

Change-Id: If14ffdc5662f77b3ff57a04c5b9f94d4cac7e514
2026-01-10 21:28:01 +00:00
Aidan MacDonald
047871c58a stm32h7: detect unsupported SDMMC transfers to ITCM
Change-Id: I4916829155d334148bf9683a9a66a125ef90a1f4
2026-01-10 10:06:57 -05:00
Christian Soffke
3da69af83c font: logf: fix pointer in buflibmove_callback
Buffer contents are only moved after the callback
returns, so we need to log the path before it has
been updated to prevent reading garbage.

Change-Id: I187fbd56484249c456155ffcbdde9e44e766dde8
2026-01-10 07:11:51 +01:00
Mauricio Garrido
752467dee4 3ds: Various fixes, optimizations.
This commit does the following changes:

- Fix mkdir implementation not reporting EEXIST error.
- Fix database build feature.
- Small speed-up when parsing directories and files.
- Fix buffering thread hogging cpu and preventing other threads to run.
- Fix sdl plugins not compiling by re-adding ctru specific cflags in sdl.make.

Change-Id: I507c0dcc85cdbcc607ab9c9c6d0b42e6a80caa5a
2026-01-09 20:54:44 -05:00
Solomon Peachy
0777add596 voice: Support generating voice files from contents of voicestrings.zip
Every build includes .rockbox/lang/voicestrings.zip, which contains
everything needed to build a voice file for that build.

This is already used by the rockbox utility, but now it is possible to
achieve the same using purely cmdline tools.

If the new voice-enum.txt file is present in the voicestrings.zip file,
this new flow produces bit-for-bit identical voice as the existing 'make
voice' flow.

Change-Id: Ieb24bc261a75b0e531c1889c49402217f7d14302
2026-01-09 20:50:09 -05:00
Solomon Peachy
0abfb3ff78 voice: Include a simple string enumeration in voicestrings.zip
This maps the numerical IDs contained within the binary .vstrings files
to their logical LANG_* and VOICE_* names.

While not strictly needed to produce voice files, it adds the final
piece to be able to use vstrings files to produce the same voice files
as the existing 'make voice' flow that directly parses the language files.

The 'make voice' flow intentionally divert a few of the generated clips
into standalone files:

 * "invalid voice file"
 * <spoken language name>
 * <short pause>

For this to be possible, we need to know which specific entries in
vstrings map to the ones we care about, and without this enumeration
(which can change on a per-target or even per-build basis) this is
effectively impossible.

The produced lang-enum.txt is simple, with one entry per line of the
format: number:name

Note that nothing uses this new file yet; that will come in subsequent
commits.

Change-Id: Iec3fccbb6d503dd7e2d529aad318009a489b1d77
2026-01-09 20:47:34 -05:00
William Wilgus
032a38df4e lua -- remove direct rb-> libc calls infavor of macro substitution WIP
there are no functional changes in this patch
it just makes it easier to build lua in core app
or plugin form

-Update moved some things around messing up compilation on Native targets
due to *errno

Change-Id: I0921df62d72a87516ad95c68e986b5931c35345e
2026-01-08 22:32:23 -05:00
William Wilgus
ded29fd751 lua plugin remove strfrtime in favor of strfrtm.lua
saves 2.2k on the bin

also supplies gmtime, and a test script to check the returned time/dates

Change-Id: Ib83b11d89bdf44a50830ff51c72ac6395b675603
2026-01-08 21:39:54 -05:00