Commit graph

38828 commits

Author SHA1 Message Date
Roman Artiukhin
58ace97a4e hiby: r1_patcher: embed hiby_player.sh
Make it a single-file, self-contained script.

Change-Id: Idb3e375f1f9774c9328288765c7d1c7c1e01e2d3
2026-01-24 20:20:01 -05:00
Roman Artiukhin
db8494d4e0 hiby: r1_patcher: quote path variables
Change-Id: I5d03b4ecec1847c404a2f2400b648469023942e2
2026-01-24 20:20:01 -05:00
Solomon Peachy
b056191e89 Translation updates:
* German (Wilfried Winkler)
 * Korean (Hoseok Seo)
 * Polish (Adam Rak)
 * Slovak (Matej Golian)
 * US English (Myself)

Change-Id: Ief4de3c8f6aa88aba6ffae9969d22763a1969743
2026-01-24 17:44:36 -05:00
Aidan MacDonald
721bfac475 echoplayer: don't wake LCD automatically in bootloader
Normally the bootloader won't enable the LCD, but we
still want to call lcd_init() at startup to keep the
code simple.

Change-Id: I866ecd7c81b6c5e6acdd57f5d7680400df3f54f4
2026-01-24 14:05:21 -05:00
Aidan MacDonald
1afa2ca50d echoplayer: implement LCD enable and shutdown
This also gets rid of the long startup delays which were
leftovers from debugging.

Change-Id: Iee9fec1fb210a006a1af53bf47535d7ba2ffa904
2026-01-24 14:02:57 -05:00
Aidan MacDonald
025d641d1f echoplayer: detect boot reason during system_init
Change-Id: I6fdc16e7476044b43e11d3f63d971bd8de860c58
2026-01-24 14:02:26 -05:00
Aidan MacDonald
86c975ee88 echoplayer: set cpu_power_on pin high as early as possible
Change-Id: I6b7343cc81973c4c0a14396b2ecd622fc1c65d30
2026-01-24 13:02:03 -05:00
Aidan MacDonald
319fdcc506 echoplayer: implement reboot using RTC_OUT pin
Change-Id: Ibeda362030c2885abe1366fb3256e925ea27538c
2026-01-24 13:01:56 -05:00
William Wilgus
6035b1fc1b [lua][BUGFIX] splash_scroller FS#13753, 13754 unicode + default font/fg/bg
FS#13753 - Rocklua error splash don't display part or full filename when
it is non-ASCII
FS#13754 - Rocklua error splash don't reset gui settings (bg, fg and font)

when using signed char unicode codepoints can show up as < '0'
code was looking to remove control chars < ' ' which also removed
unicode code points in the process

Change-Id: I48074a7854f2bee195ca554e1f86505fe5567db6
2026-01-24 09:19:19 -05:00
Solomon Peachy
4e4d5ac25b Fix yellow in echoplayer bootloader
Regression introduced in 7f0bc4bd95

Change-Id: I1341319d23a2813b8473e3fceb3370bf6371ef86
2026-01-24 09:13:49 -05:00
Aidan MacDonald
65b97917ca echoplayer: replace stm32 clock init with target specific init
Change-Id: Ib858f95b4cedba261ea669d3339ea1497e970982
2026-01-24 08:09:42 -05:00
Aidan MacDonald
eea0c128f4 echoplayer: move system_init() out of generic stm32 code
With only one target, it doesn't make sense to have a
common system_init() yet.

Change-Id: I0f6d37709d60bb309fb16ecb9b0870297a189cc4
2026-01-24 08:08:40 -05:00
Aidan MacDonald
386be9dfcc stm32h7: refactor and simplify clock helper functions
The clock helpers are only used for leaf clocks of single
peripherals, which don't benefit from reference counting.

Change-Id: Ica5685e7bc0fce621ae46f758f0ad0b1dcfb2789
2026-01-24 08:07:25 -05:00
Aidan MacDonald
9471cec2ab stm32h7: make cache initialization function public
Change-Id: I460887977f18bfb411d33b6d4efc24ac04cb4050
2026-01-24 08:04:34 -05:00
Aidan MacDonald
62332841cf stm32h7: refactor systick code
Make systick setup less hardcoded, and create a public API
for use by targets, in preparation for moving system_init()
into target-specific code.

Improve the implementation of udelay to make it more robust
against timer wraparound.

Change-Id: I21bb8821cfd1d7e4049fac6e6a4548d80a4276f7
2026-01-24 08:03:50 -05:00
Solomon Peachy
b76cb3bf62 xduoox3: A couple of minor cleanups in the bootloader
* When SHOW_LOGO is not defined, print the version at the
   same time as the logo would have been displayed
 * Don't re-init the display after every message in USB mode

Change-Id: Ida0f5643b1d57004877ec5c42fc14028f53b1c89
2026-01-24 07:55:56 -05:00
Solomon Peachy
7f0bc4bd95 bootloader: Share definition of show_logo via common.h
For some reason it was locally defined everywhere.  Move a single
definition into common.h instead.

Change-Id: Ie2fad74acccd89e40fcbb0f47258d2e14e0f8285
2026-01-24 07:54:24 -05:00
mojyack
5af0a50031 arm: pp: usb-fw-pp502x: remove hack in usb_attach()
not only is this unnecessary, but it causes a bus reset on certain iPod
docks.

Change-Id: I2c2cbf3e5660d0cf25fc6ff4367c23396c521a3f
2026-01-24 07:25:59 -05:00
William Wilgus
2b6029ae8d rliimg add flip image example (#FS13745) Try #2
FS#13745 - Add transpose (like in python pillow module) and smooth resizing in rocklua

most of this is supplied 'require image'

flipping an image is built-in to the image generator function

add image flip example to rliimg

pushed the wrong script

Change-Id: I2c512a70ed26b0457e46f2f2a187d3365783af67
2026-01-24 01:43:58 -05:00
William Wilgus
b3683c84d8 [FIX Yellow] kbd_helper.c unsigned / signed
Change-Id: I10382b5ad930d350945da950a5d829c000e18f31
2026-01-23 23:00:12 -05:00
William Wilgus
a0bd28a408 rliimg add flip image example (#FS13745)
FS#13745 - Add transpose (like in python pillow module) and smooth resizing in rocklua

most of this is supplied 'require image'

flipping an image is built-in to the image generator function

add image flip example to rliimg

Change-Id: Ia53933c9ad09d2a5b92af45eb7a1140b64b6ae01
2026-01-23 22:43:08 -05:00
William Wilgus
1194a968bd [BUGFIX] pluginlib kbd_helper.c buffer ovfl
sizeof is in bytes len counts as a ucschar
should also be added to total_len

yep buffer ovfl

Change-Id: Ibebb8574e6dbab0ca78d1cdfeb04cbbda38f05e9
2026-01-23 21:58:32 -05:00
William Wilgus
163c3723bc announce_status re-fix splashf voice prompts, add missing lang entry
%s thru an ID2P() won't be voiced

Change-Id: Ibce1e818a6ae35c388f75182c3a8226371b420b3
2026-01-23 21:05:44 -05:00
Aidan MacDonald
d7a2aa7208 arm: add more Cortex-M SCB registers
Fix a typo in the CCR register while here.

Change-Id: I9b41ca48f466557683c4b678831f3e5eccec5587
2026-01-23 23:29:47 +00:00
Aidan MacDonald
72dd8bc4d0 sdmmc_host: implement sd_enable()
This is mainly useful for bootloaders that want to safely
disable the SD/MMC controller before booting. Disabling a
controller will reset and power down the bus; all attempts
to read or write to a disabled controller will fail.

Change-Id: I4a7ec4287f2b8510a35d964cc806c74be8c86406
2026-01-23 17:48:08 -05:00
Aidan MacDonald
80fec463df stm32h7: panic on sdmmc FIFO or DMA errors
FIFO errors shouldn't be possible with hardware flow
control enabled. DMA errors shouldn't occur unless a
bad memory address was passed.

Don't bother checking for ITCM/DTCM in the transfer
setup and instead just wait for the IDMATE error; if
the RM0433 reference manual is to be believed then
SDMMC1 _only_ has access to AXI bus memories, and
checking for all invalid destinations would be very
verbose.

Change-Id: I2b22b56009933e16c5adde4d36b7a906cee57791
2026-01-23 17:47:46 -05:00
Aidan MacDonald
a74ee4c04f sdm32h7: enable sdmmc hardware flow control
Hardware flow control prevents FIFO underruns/overruns
by stopping the bus clock if one would occur. This can
slow down transfers, but that's better than having data
transfer fail due to AXI/AHB bus contention.

Change-Id: I8696d3aff78c17dbbe85907160fa37fd4ee11e85
2026-01-23 17:47:27 -05:00
Aidan MacDonald
5442622d88 arm: fix Cortex-M IRQ masking
The following inline assembly in set_irq_level() turned out
to have incorrect constraints:

    int newvalue = /* input parameter */;
    int oldvalue;

    asm volatile ("mrs %0, primask\n"
                  "msr primask, %1\n"
                  : "=r"(oldvalue) : "r"(newvalue));

leading to incorrect code generation for common cases like
disable_irq_save(), which compiles to:

    mov r5, #1
    mrs r5, primask
    msr primask, r5

...which doesn't disable IRQs at all, since both of the
operands got assigned to the same register; the write of
'oldvalue' clobbers the 'newvalue' input before it's used.

Apparently GCC assumes that input operands are read before
output operands are written. One way to fix this is adding
the '&' constraint: "=&r"(oldvalue), but it's better to
break things down into separate, simpler asm statements
which GCC can figure out itself.

Also add compiler memory barriers where primask is modified
to ensure loads/stores aren't incorrectly moved outside of
critical sections.

While here, optimize disable_irq_save() a bit by using the
cpsid instruction, which avoids the extra "mov" and register
allocation needed by "msr primask".

Change-Id: Iac94a76db5bac399a1cf028da4241a0473259a46
2026-01-23 16:47:46 -05:00
Aidan MacDonald
0474dca7c3 x1000: add XT26G01CWSIGA flash chip
Recently seen in Hifi Walker H2 units. Links:

- https://datasheet.lcsc.com/lcsc/2108141930_XTX-XT26G01CWSIGA_C2833378.pdf
- https://www.xtxtech.com/en/Products/info.aspx?productModel=XT26G01CWSIGA

Change-Id: Ieef9974d2b13723047b020ff0ab2498bf18ca00d
2026-01-23 16:26:28 -05:00
Aidan MacDonald
17faa6abc7 stm32h743: fix 'make zip' error caused by config header
Change-Id: I12521cbfdab3c768015f4eafdfe95adf81ba520a
2026-01-23 16:21:57 +00:00
William Wilgus
c80723b539 announce_status plugin command line arguments + force_enque_next
I had commented out 'talk_force_enqueue_next()' in the voice prompts
pretty sure it was because really long prompts just keep droning on
problem being as soon as the plugin returns in some cases the prompt
gets cut off by the parent calling shutup on us

so it is now a setting (on by default)

Now allows command line arguments
so you can announce whatever prompt you want whenever / wherever you want
(checkout open plugins for a way to create a plugin with command line arguments)
you can then add this .opx shortcut to your shortcuts or quick screen

and as before you can use a hotkey which also will allow command line args..

Change-Id: Id8883c0a4e85e1cb813959ab72e89817f388a397
2026-01-23 11:02:36 -05:00
William Wilgus
3c6b9bb458 FS#13748 - The imageviewer plugin decodes the file infinitely when opening a empty JPEG file.
Couldn't reproduce this on most of my devices or the sims
turns out the bug depends on uninitialized memory being FF
and the file empty

Uninitialized memory fixed what I saw at least..

Change-Id: Ie267af0a20685003ee28ff42d008dd7942a7c6fc
2026-01-22 23:59:00 -05:00
William Wilgus
1c3e9c181e [Fix Red] openplugins -- import and export thru settings save / restore settings
Change-Id: Ief990b282459637a2f5974b46a6250a52b444cc0
2026-01-22 11:19:44 -05:00
William Wilgus
045d148697 openplugins -- import and export thru settings save / restore settings
saves openplugin entries to the config file for later import to the database

lang_english_to_id() allows entries to be transfered between builds

Change-Id: I47e01c5f75f8b0e69c203828e21759ef24bf125d
2026-01-22 10:41:50 -05:00
William Wilgus
e75ffe5f72 lua add rb_poly.lua vector drawing and memoization demo
just playing around with using lots of ram (and processing power)
in lua threw this together vector draws Rb logo and flips rotates and zoom

Change-Id: Ie1fe16a9a50271657f2ab7b9a39bf71e6db90d2c
2026-01-21 08:54:16 -05:00
William Wilgus
530cad0c7a FS#13718 - The image_save library (rocklua) can't correctly save an image with an odd resolution.
the image save script apparently does not like odd numbers for width

local bytesleft = linebytes - (bytesperpixel * w )

this should actually be pxleft since the image loop below returns pixels not bytes

tested on 1 bit 2 bit, 16 bit and 32 bit images in sim

Change-Id: Ic186c095c29d318dcfb7d76b83e07c75f1460584
2026-01-21 08:15:56 -05:00
Roman Artiukhin
86f35f1b53 hiby: r1_patcher: use generic bootloader name
Rename bootloader.r1 to bootloader.rb for use across multiple devices (Hiby R1, HiBy R3 Pro II and others).

Change-Id: Ib509d37d605391012a792a69b11a557b0319d2ce
2026-01-21 08:41:08 +02:00
Roman Artiukhin
da5d6f8bf3 hiby: r1_patcher: add hotplug support
Change-Id: I8b82842f26ac6444b32e166308b7c5deb17fab7a
2026-01-20 09:27:03 +02:00
Roman Artiukhin
b25f59a98a hiby: r1_patcher: fix possible boot hang and flash failures
- Sort image parts for deterministic results.
- Ensure bootloader.r1 is correctly named and has +x permissions.

Change-Id: I391c935d75e5079010fc91d3614d9221d34e4c6b
2026-01-20 09:27:02 +02:00
Roman Artiukhin
7bc856046b hiby: backlight: use framebuffer blanking instead of PWM on hosted targets
This enables deeper sleep. On touchscreen devices (HiBy R1) it shuts down both screen and touch (touchscreen needs few seconds before it's actually disabled)

Change-Id: I5e8a7dae840227ddf4433daa461cc7124db7676a
2026-01-19 14:23:07 -05:00
Solomon Peachy
476d23ac3a Fix red in 7e31f2a6d5
While the binary firmware build succeeded, the 'make zip' process failed
because the script that put the default wps image together runs the
device config header through CPP while only looking into the
configuration header directory.

So move the imx233-config.h header out of the target/arm/imx233 and into
export/config where everything is copacetic.

Change-Id: I9914558a892f8ff7ad839818f0a5ef687cc7b997
2026-01-19 13:49:51 -05:00
Aidan MacDonald
7e31f2a6d5 imx233: move SoC-specific config symbols to separate header
Change-Id: Id044c59045712f1b96b93b5a93b07ddaa46bab7c
2026-01-19 12:47:57 -05:00
Marc Aarts
ef31aae6f4 Remove wrong define for HiBy R3 Pro II BATTERY_DEV_NAME resulting in the device shutting down almost instantly.
Battery device name is 'battery' which is defaulted in hibylinux.h.

Should fix FS#13760.

Change-Id: I0aa3dc2c025fad94d70b37603ea42f93b442866e
2026-01-19 16:58:02 +01:00
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