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
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
Add a low-overhead detector for flick gestures, which are quick
swiping motions from the screen edges.
Change-Id: I3ef2dad328fdf566923575d437376e100a2ab8df
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
* 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
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
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
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
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
The enable check read
if(r & (1 << info->en_bit) == 0)
`==` binds tighter than `&`, so this evaluates as `r & ((1 << bit) == 0)`,
i.e. `r & 0`, which is always false. The check never fired, and a supply
that was switched off reported the voltage it would have had if enabled.
Callers cannot tell "off" from "on at this voltage", so anything reading a rail back to confirm it came up gets a false confirmation.
Found by inspection while bringing up another Ingenic target. Not run on
X1000 hardware as I do not have one of these devices.
Change-Id: I19fc89ff33cce047160d826ce2344cc34b26e224
Co-Authored-By: Claude Opus 4.8
1. The "Ignore files" checkbox was saved in the settings but not
consulted when starting generation. Patterns from the text field were
therefore applied even when the checkbox was unchecked. The pattern list
is now passed to TalkFileCreator only when the option is enabled.
2. Ignore patterns were converted to regular expressions by replacing only
'*' and '?'. Other regular-expression characters were left unescaped and
matches were not properly bounded. The patch uses Qt's
wildcardToRegularExpression() conversion instead.
3. The Talk generation dialog initially focused "Strip Extensions" because of
widget creation order. It now explicitly focuses the folder tree, matching
the task flow and making keyboard and screen-reader use more predictable.
4. The handling of talkclips.ignore is also corrected so that files below a
marked directory are skipped recursively. Previously Rockbox Utility could
generate talkclips.ignore.talk and clips for files below .rockbox even though
.rockbox/talkclips.ignore was present.
Change-Id: I1f9f14ed7fc057bc254f62148a7ef8ffb69425ed
Voice file and Talk clip generation currently run synchronously in the
GUI thread. During long TTS operations this prevents the progress window
from processing input and accessibility events. On Windows this makes
the progress list unavailable to screen readers such as NVDA and can
make Rockbox Utility appear to be hung.
The attached patch moves VoiceFileCreator and TalkFileCreator to
low-priority QThreads while keeping ProgressLoggerGui in the GUI thread.
Progress and log signals are delivered through queued Qt connections.
Cancellation remains available while a synchronous TTS request is
running. The abort flags used across threads are atomic and the abort
signal is sent through a direct connection. Worker objects and threads
are deleted through the standard finished / deleteLater lifecycle.
Talk generation now passes all selected folders to one worker and
processes them sequentially, emitting the final done signal only once.
This preserves multiple-folder selection without starting work in the
GUI thread.
Change-Id: I58aa66333d43e1be249c84e0cf46c17c119a8360
- makes SOURCE_DATE_EPOCH affect BUILDDATE and version string
- makes wpsbuild.pl output deterministic
- omits unnecessary extended metadata from zip files
- runs strip-nondeterminism on zip files if REPRODUCIBLE_ZIP is set
Change-Id: I1617e3f5233b2bc356fcfa6457be1a7785c303f9
After the SAPI5 error handling added for FS#13972, the Test TTS button
can fail with SAPI error 5 even though the engine and voice are
configured correctly. The test also destroys its QSoundEffect and
temporary file before asynchronous playback can complete.
Config::testTts() used a QTemporaryFile with no .wav extension.
TTSSapi::voice() removes the requested output before synthesis so that a
stale file cannot be mistaken for successful output. SAPI SpFileStream
was therefore asked to create an extensionless output file and returned
error 5 (invalid procedure call or argument).
After successful synthesis, QSoundEffect was allocated on the stack, its
loop count was set to zero, and the temporary file was removed when
testTts() returned. This does not allow asynchronous playback to
complete reliably.
* create a temporary directory and requests an initially
nonexistent tts-test.wav inside it;
* keep the directory and generated wave file alive for playback;
* keep QSoundEffect alive until playback finishes or fails;
* request one playback and clean up all temporary data afterward.
Change-Id: I8e482ab846e6445889118e121025ec48d3776d6b
iap-serial was hardcoded to return "ROCKBOX", and it was
not implemented at all in iap-usb.
Extend the iap-serial implementation to return the contents of
<ROCKBOX_DIR>/playername.txt, or "Rockbox" if there is an error
opening/reading that file.
And cut-n-paste this into the iap-usb side of things
Change-Id: I9d328be390b4cc8bd92237f996c41ef1e5e19724
This covers the rockbox binary (or bootloader), which increases the zip
file by 60-80k depending on the target.
It currently *excludes* codecs and plugins, which can add over 1MB to
the zip file. We can revisit this when/if we move to distributing 7zip
files instead.
Change-Id: Iec72dd3aa634ceca716975c13b7fa8707a485d30
Both Ubuntu and Windows fail to report the proper sample rate on my machines, causing crackling sound on my hiby r1. Since we explicitly specify the only supported sample rate (48 kHz), just ignore the reported value.
Change-Id: Ie6e85bf94f9e15fca0c968441d5a8ce5a0088b77
Last patch didn't swap both x and y so was wrong and messed up the coord pair
I didn't want to add more swapping due to extra overhead
ultimately the issue is that you have 1/2 pixel error (-1 0 1)
and when doing the reverse line the error is on the wrong side
so instead get the first point from the opposite dinc
Change-Id: I141c4af36a601314f2b509a9ebfcfab3b5213bcd
Decode the jack remote's play/pause and volume buttons via the
"Mikey" controller (I2C 0x72) and report them as multimedia keys so
they work on every screen, like the OF. Protocol reverse engineered
on-device, notes in mikey-6g.c.
Change-Id: If5f3d3abf043c0ce0d8ca7beb0f4b591e41c5c43
The existing code treated any ready-read notification from cscript as
proof that synthesis had completed. The SAPI script can emit other
output, so the Utility could check for the wave file before the explicit
SYNC reply and report that the output file did not exist.
The script also used global "On Error Resume Next" without reporting
errors from SpFileStream.Open(), SpVoice.Speak(), or
SpFileStream.Close(). Several waits had no timeout, allowing the GUI
thread to remain blocked indefinitely.
The changes:
* reports SAPI COM errors to Rockbox Utility;
* verifies that SAPI actually created the requested wave file;
* waits for the explicit SYNC reply instead of any process output;
* applies finite timeouts to vendor queries, synthesis, and shutdown;
* terminates a stuck private cscript process safely;
* restarts cscript and retries the current string up to three times when a
third-party SAPI engine stops responding during a long generation run.
Change-Id: I2cf2aefb704353c648bef0c4312f35282ac4e25d
VoiceFileCreator::createVoiceFile() stored corrFile as the address of a
local QTemporaryFile (or a local QFile used as fallback). Both objects
were destroyed before VoiceFileCreator::create() called
TalkGenerator::setLang(), leaving a dangling pointer.
On Windows this produced an access violation in RockboxUtility.exe
immediately after the voice strings had been read. Windows reported
exception 0xc0000005.
The change gives the corrections file QObject lifetime under
VoiceFileCreator, uses the built-in corrections file as a persistent
default, and replaces it with a persistent extracted QTemporaryFile when
extraction succeeds.
Change-Id: I29a371d2431021833676dec2b875186a3c021b13
* Moldavian (Mihai Alexandru Vasiliu)
* Romanian (Mihai Alexandru Vasiliu)
* Simplified Chinese (Wang Ji)
Change-Id: I586102fc47999667dec959f9f846ddd10061ad5f
iAP accessories that query the track information via mode3/mode4 result
in a call to get_metatada(). This routinely overlows the current 6KB
thread stack into the iAP RX buffer, possibly corrupting the current iAP
packet being received/processed. Bumping this to 8K should yield over
1K of headroom.
(The tagcache scanning thread uses a 16KB stack in comparison)
Inspired by commit 99b21cd6c on the rockpod fork. (Nux Li)
Change-Id: Ibe997f3ae9dab2dcc2d9947f0b49d206a5b006b6
Without this we'd need 6.7 or newer, which isn't that big of a deal except
we want to support producing RHEL9-based AppImages.
Change-Id: I931be94400d0d19af7fba498f46f174f51a4cd8b
Holding HOLD on the remote while powering on was incorrectly
detected as a bootloader mode entry request because remote_type()
was not yet initialized. Add sleep(HZ/8) after lcd_remote_init()
and re-check remote_button_hold() only if a remote is detected.
Fixes erratic bootloader entry on remote-connected H300.
Change-Id: Ic042cf5ff40713e93b2096d4ee48d7e1001ce4a5
Allows any EQ band to be set to any of Low Shelf, Peak, or High Shelf, instead of hardcoding the types per band.
Change-Id: I470ab916359092ba465e7b6331baed3bf11b2fc9
use require "audio_status" to use the new AUDIO_STATUS_ defines
use require "file_attrs" to use the new FILE_ATTR_ defines
Change-Id: If0b3b612e92e9e5b361a9487ccca2d40f79a953e
Fixes possible crash during playback with
'Auto-Change Directory' setting enabled.
When the currently playing directory changes, the
skin may be updated on the main thread while the
playback thread is executing create_and_play_dir
and has yet to add any indices to the newly created
playlist.
Introduced in commit 41d5ca3.
Change-Id: I6e930f2db546c7690b362ba8c1a4907d0348ff52