Commit graph

38577 commits

Author SHA1 Message Date
Aidan MacDonald
94468f693f touchscreen: Port yes/no screen to gesture API
Use the gesture API in the yes/no screen to suppress bogus
touches and generally improve reliability.

Change-Id: I44adf95255f07d81188fd249dc00a91519ca7b99
2025-12-04 17:29:54 -05:00
Aidan MacDonald
67233114f7 touchscreen: Port list code to gesture API
Make use of the new gesture API to overhaul list touch support.
This should fix most of the annoyances with touch navigation in
menus and make the touchscreen easier to use.

Change-Id: Ied300947fcf755e2810e9348496ed86eaf620669
2025-12-04 16:22:26 -05:00
Aidan MacDonald
e2363b0e2c plugins: Add touch API to plugin API and revamp touchscreen test
Change-Id: Iefb658693b03e0cda43e2a9fc93086485e790b4e
2025-12-04 09:01:51 -05:00
Aidan MacDonald
8aae723853 touchscreen: Integrate gesture API with action system
Provide a default gesture object in the action system which will
be kept up to date with touch events automatically. This reduces
the boilerplate needed to handle touch input.

Change-Id: I76f51ac2c3e3a0da204707d62e91a175c5f8c76a
2025-12-04 08:14:28 -05:00
Aidan MacDonald
bb1e0b48a0 touchscreen: Add gesture velocity helper
Add a helper for computing the motion velocity during a touchscreen press.

Change-Id: I1ef7452ba9815897fd3ec01f8980c89aeef5418f
2025-12-04 08:14:28 -05:00
Aidan MacDonald
7aa823215b touchscreen: Add gesture recognition API
Add a basic gesture API which can detect taps, long presses,
and dragging gestures.

Change-Id: Id10bf8d46b9195330ce951f9f108c81e87a8dad4
2025-12-04 08:14:28 -05:00
Aidan MacDonald
0f4cc33d26 touchscreen: Increase report rate to 25fps
The touchscreen repeat interval effectively controls the report
rate of the touchscreen to the action code. Touch interactions
are smoother with a faster refresh rate, but the CPU needs to be
fast enough to keep up, or we risk queue overflows.

25fps is the minimum required to appear smooth, and probably all
targets will be able to handle the extra CPU load.

Change-Id: I96dcc80ea2ce8b915ff5682360c2e719b835388d
2025-12-04 07:10:17 -05:00
Aidan MacDonald
9e254acab3 touchscreen: Update action system touch event reporting
Add a cleaner API for reporting touch events and deprecate the old
action_get_touchscreen_press() API. The old API is now emulated by
using the new one internally.

Change-Id: I001378e66f9c81806f134f011420d671954fcde2
2025-12-04 07:10:17 -05:00
Solomon Peachy
fa164f89e0 tools: Detect A-profile ARM cores for hosted and sim builds
The only v7-a targets we have are built using the androidndk (with gcc
4.9) but it is possible to perform "self-hosted" builds for eg the
simulator or the sdlapp.

Where this gets messy is the considerable amount of inline arm
asm we have.

Native builds will need considerably more work to support
v7-a processors, but we have to start somewhere.

(Note that this contains parts of commit 508bfabe8, which had to
 be reverted due to breakage)

Change-Id: Ia1c8e10d21a976c68fdaae58e4d776854b63186c
2025-12-03 22:49:25 -05:00
Solomon Peachy
c26981a9c6 samsungypr0: Fix red in bbcf210c94 due to a merge error
Change-Id: I78b69e67a0f0cd786c79da78245d93838a9142b9
2025-12-03 22:39:33 -05:00
Solomon Peachy
bbcf210c94 Nuke maemo (nokian800/nokian900) and [open]pandora targets
They haven't seen any work since 2013, and likely hasn't compiled in at
least a couple of releases -- not that we ever "released" anything for
these targets.

Futhermore, upstream for both has been effectively dead for about as
long, and there's been no user reports of these being used since 2017
(and even then only in passing).

It isn't worth the effort to triage their current state, much less
uplift into something supportable, while the maintenance burden of
keeping these things in-tree can be demonstrated by the diffstat.

Change-Id: Id93bd450679d1b75e2c74295b3ae1548cd241b24
2025-12-03 20:42:02 -05:00
Aidan MacDonald
c47c075bd3 touchscreen: Fix event reporting in button driver
The way the button driver reported touch events was problematic
and made it impossible to detect if a touch started or if it was
a continuation of an existing touch.

Now, the first detected touch event gets BUTTON_TOUCHSCREEN and
all subsequent touch events while the screen is pressed will get
the BUTTON_REPEAT bit set. When the screen is released the final
event will have the BUTTON_REL bit set.

Change-Id: Ia456a22b2180031555a82231c2af32576bc5f2cb
2025-12-03 20:34:52 -05:00
Aidan MacDonald
9f613fd981 touchscreen: Default to putting the scrollbar on the right
For touch targets and right-handed use it makes most sense to
put the scrollbar on the right so your finger doesn't get in
the way of the touchscreen. Sorry left-handed people!

Change-Id: I35cfd8aa3bee6eb638572c9ca592942c53188a50
2025-12-03 20:34:52 -05:00
Solomon Peachy
9290a484e4 Revert "Disable Thumb code generation in codecs for ARM profile 65"
This reverts commit 508bfabe83.

Reason for revert: Completely breaks builds made using Android toolchains.  A different approach is necessary.

Change-Id: Ie8767f1f304c1313e8a539179bc33d1cc7032a3c
2025-12-03 20:31:30 -05:00
Vencislav Atanasov
508bfabe83 Disable Thumb code generation in codecs for ARM profile 65
It seems that there are a couple of codecs that use assembly optimizations. Some of their instruction sequences are not valid Thumb code. To be able to compile them successfully on TI OMAP4430, ARM mode is forced on the codecs.

Change-Id: I932186177b540985e37cb3a5333943572da1c60a
2025-12-04 00:03:40 +02:00
Solomon Peachy
11163721d6 audio: Fix up final red from a79bdaf462
Change-Id: I8de562516e54e2101746ea54d91461661439bcf5
2025-12-02 22:16:34 -05:00
Solomon Peachy
6bdd3de554 Move hosted codec header files back under firmware/export
This is a partial revert of a79bdaf46

It caused all sorts of build breakages for misc stuff like the dbtool,
which doesn't include any per-target build directories

Change-Id: I493a33c1859706679972e47c96196223415985d9
2025-12-02 20:35:18 -05:00
Solomon Peachy
c2952136c6 audio: Fix up more red from a79bdaf462
Change-Id: Ie6a68f2a14489bc84ddc57b73b37ddb94b7dc0ac
2025-12-02 20:35:18 -05:00
Solomon Peachy
fd6d6c48b4 audio: Fix up most of the red from a79bdaf462
The rest involves some wrangling.

Change-Id: I5459c255677cbacf8cc8b0c28492d27c58971cb1
2025-12-02 20:09:47 -05:00
Solomon Peachy
a79bdaf462 audio: Move hosted audio "codec" drivers into their respective target dirs
They are nearly entirely generic wrappers around ALSA controls, unique
per target, and are ripe for further consolidation.

Change-Id: I05e4a450e3e89e03616906601c4f8fa46200dff5
2025-12-02 18:59:50 -05:00
Solomon Peachy
d376e0afb7 configure: Fix numeric entries for ihifi 770/770c
Regression from d65bfff876

Change-Id: I0cf3536968368e7a96ada40ebaf6c0c772e6880b
2025-12-02 08:31:54 -05:00
Aidan MacDonald
806b71b2ed hosted: consolidate sysfs-based battery measurement code
Several hosted targets read their battery state from a fixed
sysfs path. Get rid of the duplicated code by handling this
common case in power-linux.c.

Some targets use non-standard units in sysfs instead of the
typical microvolts / microamps, so allow the scale factors
to be overridden by the target.

Change-Id: I31dc4ffc7a2d2c066d00a74070f9f9849c1663d0
2025-12-01 13:39:04 +00:00
Solomon Peachy
7ffdf50ba5 ibasso: Use generic hosted sysfs accessors
This keeps the enumerated list of sysfs parameters.

Change-Id: Ia63549809490eba02b3f75b3d2f95745636e01a9
2025-11-30 19:21:06 -05:00
Solomon Peachy
d65bfff876 configure: Rearrange and renumber target listing to clean it up a bit
I didn't change the number of anything that would be consider "popular"
but the longnames are all unchanged so it's only muscle memory that will
be affected.

Change-Id: Ic34a2e01801b14e81d4f7c84633bf10fdcbc43c9
2025-11-29 17:27:52 -05:00
Solomon Peachy
9a9b4d089e FS#13708: Corrections to Russian translation (Ivan Romaniuk-Mikhailovsky)
Change-Id: I7c40dba2654c50b9c5f5770e09f415d56b26d1cd
2025-11-29 16:10:43 -05:00
Solomon Peachy
23d0886f29 FS#13701: Updated Russian translation (Ivan Romaniuk-Mikhailovsky)
Change-Id: I1cc454dce50651d95b611178cc986b7fa626f55f
2025-11-29 10:40:21 -05:00
Solomon Peachy
9020360f66 hosted: Pull tinyalsa out of ibasso tree so other targets can use it
Change-Id: I85e31a0d0993d3494568abbc05ff9b114d493d75
2025-11-28 19:33:48 -05:00
Solomon Peachy
26d22a64c9 mkzenboot: Add support for 1.21.03 (US) firmware on the ZEN
The EU variant was already listed, but the US was not.

Change-Id: I8445a9e906ecd891f1ca571a4a3d7aa146e69698
2025-11-28 16:38:23 -05:00
Solomon Peachy
6314eae268 Fix build regression for Creative ZEN V
Introduced in 297af3a483

Change-Id: I9cf37e27ecdf84b6f0a8b6c8d15b1eae987cedbe
2025-11-28 07:38:40 -05:00
Solomon Peachy
a6538abd16 rk27xx: Use slower memory timings at startup
Our decade+old defaults are reported to trigger a failure on
one user's IHIFI770c and IHIFI960, but work on their HM-603.
Backing CAS latency off from 2 to 3 appears to be sufficient.

What's interesting is that on paper, CL=2 should be easily attainable
due to our max RAM clock of 100MHz, well within the worst-case timings
of the EM639165 SDRAM.

So as an experiment, this code can go back to CL=2 when we change the
CPU+RAM clock speeds.  IF this still proves problematic, it will be
removed.

Change-Id: I4a8cfa0563c076e7f25d9599a19b454f590861cd
2025-11-28 07:18:22 -05:00
Christian Soffke
3307b04eed usb: Shorten debounce interval for USB status by event
The introduction of a debounce interval for USB
status by event (see e75a3fb), often resulted in the
FiiO M3K crashing after disconnecting from USB.
Shortening the interval to 10ms appears to fix this,
or make a crash much less likely at the very least.

Change-Id: Ibf1f02779ab1704d9b1c86d39b21648a3e2c4e9d
2025-11-27 20:55:00 -05:00
Sebastian Leonhardt
297af3a483 Creative ZEN: fix RTC regression
Creative ZEN lost it's time when shutting down.
The bug was introduced with commit 7f282b9280 (g#2601),
followed by e3f6e9d9f6 (g#2616).

I guarded all persistent register writes with wait loops,
as described in the datasheet.

TODO:
test SONY_NWZE360 and SONY_NWZE370 targets

Change-Id: Ib38ab8691fd1c6e8d0771c1e2eca20dfeb6fc87f
2025-11-27 15:04:14 -05:00
Sebastian Leonhardt
69bc230e7d imx233: add HW_RTC_CTRL and HW_RTC_STAT registers to debug screen
Change-Id: Id52f86b26ee039781f44fde639fb8f184c7dc438
2025-11-27 12:36:28 +01:00
Solomon Peachy
c43919352d FS#13707: Updated Simplified Chinese Translation (王吉)
Change-Id: I07bbe6f1415eea14fc3405f4030311437a976943
2025-11-26 20:31:05 -05:00
William Wilgus
76ee238d48 FS#13704 - Rockpaint fonts memory troubles -- Disable font rendering in font selection
Displaying the fonts as you select them is nice but IMO pretty wasteful
I think a few static bitmaps would probably suffice
I however don't feel like addressing this so lets just disable it, for now?

Change-Id: I882cc0c4129e99d8b2f4ac135301dc3906340bb7
2025-11-26 01:24:13 -05:00
William Wilgus
4e4af2fe96 Bugfix FS#13696 - ID3 year with substring cause panic
The issue was the false case returning NULL for children elements
instead just ignore the false branch for everything but
SKIN_TOKEN_SUBLINE_TIMEOUT_HIDE

Change-Id: Ie0f4f51646faf116e563ab7e60d52d18759f4220
2025-11-25 17:00:50 -05:00
Solomon Peachy
936482abb5 bootloaders: Correct formatting of 'no parition found' table dump
Change-Id: I0eb48a0a40d317f9b47b181e0a31bef7ffde1e15
2025-11-24 21:17:09 -05:00
Solomon Peachy
7511d7e514 ipod6g: Correct inverted sector shift for CE-ATA operations.
(sector needs to be scaled UP, not DOWN)

Change-Id: I350c6c371b29c5e152d8d35852e55e3eda0d1090
2025-11-24 21:08:01 -05:00
Christian Soffke
f2be592215 plugins: Oscilloscope: Fix outdated mixer frequency
When Waveform mode was active, frequency changes during playback
(if set to "auto", or with USB audio active) weren't picked
up

Change-Id: Iebec7db951312b7dacff850e9554e1d06762ab3a
2025-11-24 21:26:42 +01:00
Christian Soffke
10808f5dfe plugins: Oscilloscope fiiom3k keymap: Add graphmode support
- Allows switching between peaks and waveform
- Adds some missing keys to manual entry

Change-Id: I0b4f2cee3c4da071bf3bf43487c6f445e0f7f61c
2025-11-24 19:35:05 +01:00
Christian Soffke
4095b13d52 plugins: Oscilloscope & VU Meter: Support USB audio
Also show current mixer frequency in title of VU meter,
and adjust the menu title from "VU Meter Menu" to just
"VU Meter"

Change-Id: I5bf8f55a3c9874618cac939fe32a611ac96f52ff
2025-11-24 19:35:05 +01:00
Solomon Peachy
0551c4a780 ipod6g: Scale CE-ATA READ/WRITE sector/counts correctly
Despite the fact that CE-ATA specifies a minimum logical sector size of
4096 bytes, the low-level tranfer command arguments are specified in
units of 512 bytes. So scale the sector count up and the LBA down.

On CE-ATA devies, the partition table and filesytem is formatted with 4K
logical sectors, so this will be safe.

Change-Id: I959f21f9c72a68ac28aa611d06f8517ca77f0a8c
2025-11-23 20:21:06 -05:00
Solomon Peachy
e3dc4bf2d3 FS#13701: Updated Russian translation (Ivan Romaniuk-Mikhailovsky)
Most changes are for consistent capitalization

Change-Id: I5ebc3656450ee8ddf07c5a7fed0c1463b9825b9b
2025-11-23 20:21:06 -05:00
Solomon Peachy
ad6cc2f099 ipod6g: Prevent booting into OF if it does not support LBA48 and drive needs it
Early 6th gen ipods (80GB and 160GB "fat") are limited to LBA28
which results in a hard upper limit of 128GiB on the storage size.
The later 120GB model also shares this limitation.  These are identified
by HwVr of 0x00130000 and 0x00130100, respectively.

The final revision of the iPod Classic series (160GB "thin") does not
have this limitation, and can be identified by a HwVr of 0x00130200 or
0x00130300.

This is strictly an issue with Apple's stock firmware, and not the
hardware, and Rockbox will happily utilize the full capabiltiies of any
installed storage device.  Unfortunately, if you boot into the stock
Apple firmware, said firmware will destructively trash the partition
table and filesystem.

Consequently, the Rockbox bootloader will now check if the installed
drive requires LBA48, making sure the flashed firmware also supports
LBA48.  If not, we will disallow booting into the OF (including disk mode)
altogether.  This check can be overridden by holding down LEFT, at which
point you get to keep all the pieces.

Note: While Apple never released firmware without these limitaitons on
the older models, there is a way to update to update these to the newer
firmware.  This requires altering the stored HwVr, so it is safe to use
the HwVr as a proxy for the installe firmware capabilities.

Change-Id: Icdd5754f2a3d38c6de67fc7565fabc7aa20f19b3
2025-11-23 13:41:32 -05:00
Solomon Peachy
eeb8a893f1 talk: Rework utf8-awareness in talk_spell()
* Eliminates warning on 16-bit unicode devices
 * More efficient
 * Still correct

Change-Id: I8d29f5560bc6f34b935e867d184a62a280b33596
2025-11-23 12:08:51 -05:00
Solomon Peachy
ebaa78542d FS#13424: When spelling out a string, decode it into utf8 codepoints first
We still can't spell out non-ascii letters but this is a first step towards
doing it correctly.

Change-Id: Ic981af7d4e351084ff53264589df3f7662763af4
2025-11-23 08:56:31 -05:00
Solomon Peachy
c208b84585 FS#13695: Fix crash in on-screen keyboard with codepoints > 0x7f
We were passing a utf8 byte sequence into a function expecting
the actual codepoint value.

...This bug has been around approximately forever.

Change-Id: I3f1d8b2508e7fc830ad9ed10bca3c3329c96851c
2025-11-23 08:36:39 -05:00
William Wilgus
1bc6b450b9 FS#13700 - Fiio M3k Left/right buttons are mixed up in the calendar plugin
Change-Id: I0e8016ffe65bf5cc47c3a5cec6a12b42022839c7
2025-11-22 10:16:11 -05:00
William Wilgus
7bd04ad89a FS#13698 - Rockblox don't accept control commands
FiiO M3K - you have to hold up or down before the pieces will rotate

AFAICT the scrollpad on the m3k is being presented as a scrollwheel
and it waits for 3 events before enabling rotation.

This behavior is blocking the user presses till you get a repeat event
Fix:
 Enable the scrollwheel at start for the m3k (and m3k linux)

Change-Id: Ic36048dae6f691e9085ab37ffbf67be07c2035ac
2025-11-22 09:53:59 -05:00
Sebastian Leonhardt
5e7a4290b2 rockboy: fix wrong colors on some targets
This bug was found and located by a forum user, see
https://forums.rockbox.org/index.php/topic,54776.0.html

The old code used the FB_SCALARPACK macro which doesn't
respect swapped byte order.
Using FB_RGBPACK fixes it and furthermore makes the
fb.cc[] array superfluous.
I added a small optimization for 16 bit targets, since
the gameboy colors almost fit perfectly (5 bit per color).

Change-Id: If96b3943cb4ab902b880ff3d471add25e138fe8e
2025-11-21 12:09:09 -05:00