Commit graph

39740 commits

Author SHA1 Message Date
Michael Giacomelli
5d016a2c04 Fix building Warble when configured as the iPod Video
Change-Id: If229f29d31a0a0d012d5ba210c16d1f1ea74a217
2026-08-25 08:01:09 -04:00
Michael Giacomelli
7fef95dc08 warble: fix build on targets with HAVE_RECORDING
Change-Id: Ic04392da41177f51dd5f392b288e078a76298839
2026-08-25 08:01:09 -04:00
Solomon Peachy
c04c2c3e0b FS13892: Voice feedback in Cuesheet browser
Voices the index, performer, and title of each cuesheet entry.  Uses
talkclips if any are available.

Change-Id: If54931cb5bbeb698f23146479192c1d6fe387657
2026-08-25 07:54:03 -04:00
Solomon Peachy
aeaee5da45 voice.pl: Extract PERFORMER and TITLE from cuesheets
Change-Id: Ib83b0c7bc74777ce6d78a6c9507c3d0732552334
2026-08-25 07:54:03 -04:00
Aidan MacDonald
69a36026f8 sdmmc_poll: add edge triggered polling support
Change-Id: I958a09efc055d474da5e03a06d80719dbb2f5b14
2026-08-25 07:51:14 -04:00
Aidan MacDonald
5e71adddf9 sdmmc_host: add generic SDMMC polling helper
Pull this out of the echoplayer target so it can be reused
easily by other targets.

Change-Id: If14e23a90c133d8435f7944d7b1607630baaf3bb
2026-08-25 07:51:14 -04:00
Aidan MacDonald
94a0fe608a sdmmc_host: trigger LED on disk activity
Change-Id: Ic7c43de01f381b7d87ed6b234fa63d5276ae31a5
2026-08-25 07:51:14 -04:00
Aidan MacDonald
cdad8cde64 sdmmc_host: add support for SET_BLOCK_COUNT (CMD23)
According to commit 7327d9fb6c ("Implement set block count
(CMD23) for x1000 target") some cards may experience data
corruption with certain controllers when CMD12 is used to
terminate multiblock writes. Using set block count (CMD23)
is reported to fix this issue.

Following the approach in that patch, use the SCR register
to probe support for CMD23, but disable use at runtime if
CMD23 generates an illegal command error.

Change-Id: I3ee1e48939b79b848fbda12c6737f2f974f47fa0
2026-08-25 07:49:05 -04:00
Aidan MacDonald
bafcb38ec9 sdmmc_host: read card SCR register to fill cardinfo struct
Change-Id: I2ef8f823d93001f15ea4e794a50f7fc115a55ce6
2026-08-25 07:49:05 -04:00
Aidan MacDonald
afe5e7191d sdmmc_host: add helper for allocating disk cache buffer
Change-Id: I918a34a92e2e0f53c19ba44fb2b42396719b92e1
2026-08-25 07:49:05 -04:00
Aidan MacDonald
1f1db58d44 sdmmc: add optional SCR register to tCardInfo struct
The SCR register is needed for detecting if the card
supports certain commands like SET_BLOCK_COUNT.

Change-Id: I48cbf8fff497b71fb831ba546a462b27bb30851f
2026-08-25 07:49:05 -04:00
Christian Soffke
789d796120 quickscreen: make %QT hide built-in UI
When an SBS uses the new %QT tag (added in 96f42a5)
to retrieve the name of the top Quickscreen setting
(thus likely wants to draw its own QS UI), we disable
the built-in interface until a new SBS file is applied.

Fixes lag encountered in Themify 2 due to invisible
built-in Quickscreen UI that kept being re-drawn.

Change-Id: Id4f295f959c2d16d1650f6fc066c3ceca6685405
2026-08-22 20:23:07 +02:00
Christian Soffke
50b13493d2 skin_engine: make skin file type available to parser
Keep track of the type of skin file being parsed,
in case a tag needs this info.

E.g. %Lt should be ignored in any skin other than
SBS files.

Change-Id: Ib7e52c3e6810196cb566adb65619a1b847cf20ef
2026-08-22 19:52:43 +02:00
Christian Soffke
9cd4352256 quickscreen: fix missing redraw for QS_VOL action
If volume was set as one of the Quickscreen items,
the value wasn't updated when pressing ACTION_QS_VOLUP
or -DOWN.

Change-Id: Ie6531535745592d7b53006560f1db8c5b7dbfb97
2026-08-22 13:30:54 -04:00
Christian Soffke
30a5f1d858 quickscreen: redraw only the relevant viewports
For each setting adjustment, the whole QS was
redrawn, including icons that never change at
all. Only redraw the viewports that contain a
setting that has been adjusted.

Change-Id: I74188fbf382a92c6e8bf517d9518c3a96bdd21ef
2026-08-22 13:14:29 -04:00
Christian Soffke
3d44fe94f3 skin_display: simplify skin_wait_for_action
Reduces GNU Complexity score from 6 to 2.

Slightly adjusts behavior:

1) With TIMEOUT_NOBLOCK and peak meters enabled,
   skin_wait_for_action always returned BUTTON_NONE,
   and did nothing else. Presumably unintentional.

   WPS was not affected, since it always uses HZ/5 for the
   timeout. The FM screen uses TIMEOUT_NOBLOCK only when
   fms_do_button_loop is called with update_screen == true.

   skin_wait_for_action now returns the result of get_action
   in any given scenario.

2) fixes incorrect next_refresh calculation when peak_meters
   are enabled on multiple screens

3) button loop now refreshes peak meters when
   current_tick >= next_refresh, instead of when
   current_tick > next_refresh

Change-Id: Iaca37dbdde6057f593659b2feb97b61ac4cc4b02
2026-08-22 15:35:10 +02:00
Aidan MacDonald
9039355bf8 timeout: include <stdint.h> for intptr_t
Change-Id: I5c5bd4e68d970f344b99e318f7818e4773bdda40
2026-08-22 06:42:02 -04:00
Aidan MacDonald
11817f99f8 stm32h7: sdmmc: handle CMD12 before second cache discard
Because DMA is still running until CMD12 is issued the second
cache discard must occur after CMD12, otherwise the cache may
contain a stale copy of data. While the buffer is garbage at
this point it's probably not a good idea to leave the buffer
in a weird state where the cache doesn't match what's in RAM.

Change-Id: I7caf91d17631c92686ef0ad6f148e6c1d1bcbfa0
2026-08-20 19:22:43 +01:00
Aidan MacDonald
f69ee23fa1 stm32h7: sdmmc: use sdmmc_host bus frequency helper
Change-Id: I6d58a95b08b8edb8a32088b3903403d84537ac12
2026-08-20 19:22:43 +01:00
Aidan MacDonald
b621a519e2 sdmmc_host: add helper to get bus frequency from enum
Change-Id: I5796d19a4c28986bbb3674a39cc93f3fa473ae3c
2026-08-20 19:22:43 +01:00
Aidan MacDonald
e3f622a851 Fix red in 2c5482cab9
The error is caused by grayscale >1bpp targets which do not
define LCD_RGBPACK().

Change-Id: Ifc995d720f11fe3df8ac534bd0777e162541dc54
2026-08-20 14:34:59 +01:00
neofright
2c5482cab9 splash: make iPod reFresh colour workaround pixel-format independent
The splash contrast workaround for the iPod reFresh themes compares
foreground and background colours against hard-coded RGB565 values.

This prevents the workaround from being applied on targets using other
pixel formats, such as XRGB8888 hosted targets.

Use LCD_RGBPACK() and SCREEN_COLOR_TO_NATIVE() to obtain the equivalent
colours for the active screen instead.

Code change and commit message generated by GPT-5.6 Sol. Compiled on
my hosted Eros Q build and confirmed working correctly.

Change-Id: Id15669bc7b8cec11bd4ee645c0b671db4499d2cd
2026-08-19 18:30:48 +01:00
Aidan MacDonald
0b52c28933 dircache: use alloca to avoid VLA in struct extension
Clang does not support VLA-in-struct so use alloca to
do the same thing by hand.

Change-Id: Ib135d1a90b00aac3098e4c64f9f5f5e397fe771c
2026-08-18 16:55:09 +01:00
Christian Soffke
8cfa4bfd8c quickscreen: update SBS after each button press
Quickscreen will ignore update_delay so that the SBS
is updated after each button press, without any lag.

The SBS may display settings that are adjusted by the
Quickscreen (e.g. cabbiev2's Shuffle and Repeat icons,
or the brightness slider included in themes like
Adwaitapod and Themify).

Change-Id: I28716e81cb77e235eb009bff91c96f510365f435
2026-08-16 16:33:38 +02:00
Christian Soffke
be62759005 quickscreen: fix MIN_LINES off-by-one
Appears to be a regression introduced in e454a39, where
MIN_LINES was increased from 4 to 5, along with changing
nb_lines <= MIN_LINES to nb_lines < MIN_LINES

The top and bottom sections are supposed to switch
from 2 to 1 lines if there are fewer available lines
than MIN_LINES.

Each of the three vertical section uses two lines,
resulting in overlapping viewports, if there are exactly
5 available lines.

Icons mentioned in the comment don't really play into
that.

Change-Id: I3a0e921d9f53a490fece0ce59457feaf84a80d3b
2026-08-16 16:33:37 +02:00
Christian Soffke
cacbd9aad2 skin_engine/quickscreen: get rid of unused code, update comment, naming
- remove quickscreen_set_option prototype left
  behind from commit a22749b
- make skin_load internal to the skin_engine
- remove skin_load's isfile parameter, since
  it's always true
- update comment for skin_data_load
- slight naming adjustments
- replace MAX_PATH with sizeof

Change-Id: I6fcbcf0d3e36730c5096f38d31f8e44b92498068
2026-08-16 14:39:43 +02:00
Aidan MacDonald
b616047311 usb-designware: fix ISO frame scheduling
The frame-scheduling logic cherry picked from the 'rockpod'
fork [1] was not correct for high-speed hosts and broke USB
Audio output.

The DWC seems to schedule based on the DWC_DSTS.SOFFN field,
which is a 14-bit microframe number for high-speed hosts. For
full speed hosts SOFFN is the LSB-aligned 11-bit frame number.

For high-speed hosts, USB Audio and iAP use a bInterval of 4
for the ISO endpoint which means the host sends a packet every
8 microframes. Thus, we only receive data on even microframes,
which is why adding frame scheduling broke things (and why we
got away with not doing it before).

For full speed the bInterval is 1, we get a packet each frame
and we do need to tell the core to receive on odd frames.

This code is still not completely correct for arbitrary ISO
endpoints -- for that we would need the function drivers to
provide the (micro)frame number on which they want to send or
receive.

Tested by forcing full speed at the device side by setting
USB_DW_DCFG_SPEED=3. USB Audio works fine in both high and
full speed modes now.

[1] c390dfdbdf

Change-Id: I17d283821cd0861e414c48208ca67f6e98464d7c
2026-08-15 20:41:56 +01:00
Solomon Peachy
459c5e7937 Move Hidizs AP80MAX to the 'unstable' list
This means it will end up in nightlies, get voice builds, etc.

Next up is to add it to the themesite..

Change-Id: I78dc77addebceb49773adaa3b70e9a457585fe62
2026-08-15 07:36:10 -04:00
Solomon Peachy
83d6948301 Fix yellow introduced in 9a80f5af55
(Back-to-back series of comment blocks had a missing closure in the middle)

Change-Id: I11f36687c6d35bea7cadd0e7975e3c897f68fd93
2026-08-15 07:33:31 -04:00
Solomon Peachy
8f8a0e5230 swvol: Switch to using WANT_SWVOL_32 in pcm_sw_volume.c
Change-Id: Id28c4f50144e60bc13fc834641b1a0a7491a36b8
2026-08-14 22:45:14 -04:00
Solomon Peachy
9a80f5af55 erosqnative: Updated documentation about an odd quirk of hw3/hw4 platforms
The ES9018K2M DAC used on hw3/hw4 defaults to 32-bit audio frames but
when configuring it to match the SoC I2S settings (ie 16 or 24-bit)
it results in garbled output for unexplained reasons.

Change-Id: If3074f38178b19520ca6222a1e020ea210069a6d
2026-08-14 22:42:07 -04:00
Skye
df85814e74
erosqnative: use hwvol at runtime on es9018k2m
Change-Id: I0ea89ff44a7d7c7c4aeb65ec2b56287324533bcc
2026-08-14 22:39:35 +09:00
Skye
9a7ffac2e4
pcm_sink: allow per-sink swvol/hwvol selection
Change-Id: I5b0a66f2e41ca32a2d6c88bda3ffe0db0df08ce0
2026-08-14 22:39:13 +09:00
Jerry Shen
51d7d56803 ap80max: New hosted port
HibyOS-based target: keymaps, LED, powermgmt, bootloader and sim support,
plus cabbiev2 for the new 360x640x16 screen. Opus 5 helped w/ debugging
and the initial scaffolding.

Updated name to FB_STRIDE_MISMATCH, added simulator bmp and specs.

Change-Id: If797ac6581cf75d9d1fcf36e615ee03cf6f905d6
2026-08-13 17:55:06 -07:00
Solomon Peachy
eded05f0cb FS13980: Updated rbutil Italian Translation (Alessio Lenzi)
Change-Id: Ic996de7db4a197858a7115627136d10a2f72be24
2026-08-13 12:36:50 -04:00
Solomon Peachy
0db3308e43 FS#13981 - Updated Russian Translation (Ivan Romaniuk-Mikhailovsky)
Change-Id: Ife14860048062922ac7b4eaffc42f9debe5a6ea2
2026-08-13 12:35:55 -04:00
Solomon Peachy
9641d54fee Fix remaining red from c93c7bfdcb -- dbtool and warble builds
Change-Id: I164aac856b821b9e7a96d807521912cb791e2152
2026-08-13 09:59:52 -04:00
Solomon Peachy
7e53e85cb2 Fix red in c93c7bfdcb -- Checkwps builds were failing
Change-Id: I5d81c35d4d31036954e094d6430ef31daa34642b
2026-08-13 09:36:46 -04:00
Aidan MacDonald
0e0982cb29 touchscreen: Kinetic scrolling v3
Tune accel/decel/press coefficients and add a braking force which
kicks in when swiping in the opposite direction of scrolling. This
is instead of the usual acceleration force.

Change-Id: I2b220c98674933a6957d6982020406342cd019bd
2026-08-13 08:24:51 -04:00
Aidan MacDonald
c93c7bfdcb touchscreen: Kinetic scrolling v2
Add configurable acceleration settings. There are 3 settings which
are applied at different times during scrolling. "accel" is used to
calculate the acceleration applied to the list based on the swipe
speed. "decel" determines the deceleration force applied based on
the list scroll speed, and "press" is an additional deceleration
force applied if you are pressing on the screen.

All settings have the general form:

    kinetic scroll accel: <a0> <a1> <delay>
    kinetic scroll decel: <a0> <a1> <delay>
    kinetic scroll press: <a0> <a1> <delay>

where the formula for the acceleration is "accel = a0 + a1*vel" and
"vel" is the input velocity (swipe speed for accel, list scroll speed
for decel/press).

The delay parameter is a value in milliseconds which acts as a grace
period where the acceleration will *not* be applied. For example, if
you specify 250ms for decel, then deceleration will not kick in until
250ms after scrolling starts. For press, the delay is based on the
duration of the touchscreen press.

All settings have sane default values and don't need to be configured
to enable kinetic scrolling; it is always enabled. But the settings are
there for those who want to tweak the behavior.

Change-Id: I9723b496b2b5d3fb3643af60b169754fdba497f0
2026-08-13 08:24:28 -04:00
Aidan MacDonald
a89e1f999d touchscreen: Add flick detector to touchscreen test
Change-Id: I9b41881e3e9a271f0532cc9c500e0511c606e895
2026-08-13 08:04:01 -04:00
Aidan MacDonald
814747492c touchscreen: Add flick gesture detector
Add a low-overhead detector for flick gestures, which are quick
swiping motions from the screen edges.

Change-Id: I3ef2dad328fdf566923575d437376e100a2ab8df
2026-08-13 08:03:37 -04:00
Aidan MacDonald
0ca22b9a71 touchscreen: Improved kinetic scrolling in lists
Kinetic scrolling now accelerates when repeatedly swiping over
the screen, so you can scroll through large lists easily without
using the scrollbar. Press & hold to slow down and stop.

Menu items can no longer be selected during a kinetic scroll
event, to reduce the chance of accidental selections.

Change-Id: I05b7d5fe6681a9edf53096b1fa265442fb31bf33
2026-08-13 08:02:29 -04:00
Roman Artiukhin
842492d77b hiby: r1_patcher: add macOS support
Change-Id: If9f11fc7fbac87275325f0f892c2546184714d0b
2026-08-12 11:21:10 +03:00
Solomon Peachy
fd8d6f10a1 synopsys-dwmac: Bugfixes
* Dedicated FIFO mode requires a non-zero multi-count for periodic INs
 * Add ISO frame polarity
 * Correct max packet size for high-speed ISOC operation

Change-Id: I2c0d40b5f8d0e1e4cf43369631f17c7f80c6fab2
2026-08-11 13:43:24 -04:00
Aidan MacDonald
444c9ce4bd manual: add touchscreen settings section
Change-Id: I5b9196fb79e7b67a4ac013fe10b8ad462cb8bfa8
2026-08-11 12:22:19 +01:00
Michael McAllister
ef20bc4c78 usb: keep the USB Serial setting across connects
Debug -> USB Serial calls usb_core_enable_driver(USB_DRIVER_SERIAL, ...), which sets a flag inside usb_core. usb_core_init() clears every driver's enabled flag on each connect and runs after the toggle, so the choice is gone before any descriptor is built: the menu reports the new state and nothing changes.

Hold the setting in firmware/usb.c and reapply it from usb_configure_drivers() on each connect, which is where the other drivers are already configured. usb_set_serial()/usb_get_serial() sit alongside usb_set_hid(), which works this way for the same reason.

toggle_usb_core_driver() goes with it: toggle_usb_serial() was its only
caller, and a generic wrapper around a call that cannot persist is not worth keeping.

Affects any target building USB_ENABLE_SERIAL.

Change-Id: I171a532d23cc9cf0efe0a01c2836b69846333a4d
Co-Authored-By: Claude Opus 4.8
2026-08-10 15:32:36 -04:00
Michael McAllister
6ad1fd074a usb: acknowledge SET_LINE_CODING in the serial driver
usb_serial_control_request() copies the line coding and returns handled = true without calling usb_core_control_response(). usb_core only answers requests a driver declines, so returning handled makes the status stage the driver's responsibility and nothing sends it. The host sees the request accepted and then times out waiting for status.

Every other branch in this function already responds but this one was missed.

Affects any target building USB_ENABLE_SERIAL. The symptom is a CDC console that enumerates and then stalls when a terminal opens it and sets the line rate.

Change-Id: Icd97805971c68ce3a599cf01e9f6aa103c61c2ec
Co-Authored-By: Claude Opus 4.8
2026-08-10 15:30:53 -04:00
Michael McAllister
233ea05ea2 x1000: set the NAND driver's init guard so setup runs once
nand_init() guards its one-time setup with a static `inited` flag that
nothing ever assigns, so every call re-runs the initialiser. That resets
refcount to 0 on a driver another caller may already hold open, and the next nand_close() then decrements from zero and tears the driver down underneath its user.

Assign the flag, and fix the caller that reaches this. On a failed open the installer's updater_cleanup() would call nand_close() against a driver nand_open() never took a reference on, because nand_open() only takes one once it has identified the chip; release the lock and drop the pointer instead.

Change-Id: I88d54ac5bca9bcebb62fd9c6f50f1acf982a9a3b
Co-Authored-By: Claude Opus 4.8
2026-08-10 15:26:23 -04:00
Michael McAllister
fae5c8d067 x1000: don't close fd 0 when a bootloader backup fails early
backup_bootloader() and restore_bootloader() initialise `fd = 0` and their error paths close it unconditionally. Any failure before the file is opened updater_init(), or the size check between them therefore reaches close(0) and closes whatever fd 0 happens to be. On a native target that is whatever the filesystem layer handed out first, so an unrelated open file is closed and the damage surfaces somewhere else entirely.

Initialise to -1 instead, which is the value close() ignores.

Found by inspection while bringing up another Ingenic target. Not run on
X1000 hardware.

Change-Id: Ib043f79f0b7edc7c70ccd77cbff54e264ed2b2de
Co-Authored-By: Claude Opus 4.8
2026-08-10 15:20:49 -04:00