Commit graph

38977 commits

Author SHA1 Message Date
Solomon Peachy
e15451815a tagcache: Prevent a infinite tagcache scan/commit loop
If no new entries were committed, there's no need to kick
off a new scan/autoupdate.

Change-Id: I3e8e497e4fe04d46612401e1ec6b72f30a8b77a4
2026-03-01 21:11:36 -05:00
mojyack
dfa33c246b pcm: introduce pcm_sink
move target-specific pcm operations into builtin_pcm_sink.
in subsequent commits, another pcm_sink is added, and it becomes
possible to switch between them.

Change-Id: I8f8b9661e01d6e6472f34224ddc3760856778457
2026-03-02 10:09:11 +09:00
Solomon Peachy
9931781185 Translation updates
- Polish (Adam Rak)
 - Slovak (Matej Golian)
 - US English (myself)

Change-Id: I68eb6405709ce8e964b8cd749377a5df4a7d8f5a
2026-03-01 17:48:25 -05:00
Solomon Peachy
b93f3d0589 updatelang: Update validation check for LANG_VOICED_DATE_FORMAT
Missed this in the previous commit

Change-Id: Ia85a8017abfeca369b0e12723468cbe8018def8f
2026-03-01 16:42:32 -05:00
Solomon Peachy
17edcbd42a talk: Improvements in voicing "years"
* Enhance LANG_VOICED_DATE_FORMAT to distinguish between "numeric year"
   and "grouped year"  (2020 -> "two thousand twenty" vs "twenty twenty",
   respectively)
 * Metadata year voicing will now use "numeric year" if specified in
   LANG_VOICED_DATE_FORMAT instead of always using grouped year.
 * Datetime year voicing respects the format instead of always using
   "numeric year"

Change-Id: Icc25da7c36107d3e4e8c70291f87a915e2bcabd3
2026-03-01 16:31:27 -05:00
yegor chernyshov
c86fd2318d added setting to retain file browser directory on reboots WIP
I added the setting keep_directory which automatically updates
the last directory visited and restores it on next boot

--added manual entry

Change-Id: I0ffe6531d591d693806ce0bf56fe22b99e3315e9
2026-03-01 15:05:09 -05:00
Solomon Peachy
380b7b3e32 FS#13794 - Slovak Translation improvements (Matej Golian)
ImageViewer & the Playback Control Menu

Change-Id: Ia39ad381e2e9560add3d45b9ce6396f0cb24f76e
2026-03-01 08:46:36 -05:00
Solomon Peachy
4209170cb7 utf8proc: Add utf8proc for normalizing UTF-8 strings
Due to the unicode data tables, this is a pretty large library,
adding ~340K to the binary size (ie a 50% increase on some targets)

Note that nothing in-tree actually _uses_ utf8proc yet.  The plan:

 1) In the metadata parser, fully normalize+compose all strings.
 2) When looking up font glyphs, if we do not find an exact
    match for the codepoint, try to decompose and render the result.
 3) Normalize all filenames as we read them, ie before we store them
    in lists or compare filenames/pathnames.
 4) Use utf8proc for casefolding-aware sorting (on native devices)

Change-Id: I2252cee3e7891d12ff37867231aa2c20353f857b
2026-03-01 08:26:00 -05:00
Aidan MacDonald
ad45b2910a echoplayer: disable recording
Though the rev1 hardware is capable of recording from a
headset mic, this feature seems likely to be dropped on
future hardware revisions, and I don't see much point to
implementing it now.

Change-Id: I77e403bdd1ca53f9018835d3c3042dc86ee0f8f3
2026-02-27 20:11:27 +00:00
Aidan MacDonald
3a70003d23 echoplayer: fix STD_CONTEXT action being masked by STD_OK in keymap
Change-Id: I4e7546c0817b027d04ac12ba151dfca764915c6f
2026-02-26 18:15:24 -05:00
Aidan MacDonald
df89a47c11 drivers: add TLV320AIC3104 codec driver
Change-Id: Ic8825fc8f057c28316e9f7cb6af3dd34e8200d48
2026-02-26 15:00:13 +00:00
Aidan MacDonald
33cdbf87d7 echoplayer: add echoplayer-specific codec header
Remove the generic TLV320AIC3104 codec header. The codec
is sufficiently complex that a one-size-fits-all driver
isn't really feasible, eg. due to different clocking and
output configurations.

It's easier for targets to have their own audio headers
tailored to their use case than a generic header with
lots of ifdefs.

Change-Id: I63d92d57c28ddd7da7aa3174bd583d8afb1aa56d
2026-02-26 15:00:13 +00:00
William Wilgus
9a6e3799e1 validate global_settings.start_directory on startup
check for an ending slash and verify paths other than root
exist

Change-Id: I4e1b3d51d99e5f5b66bcc0d66866ae35a554f84d
2026-02-26 09:50:34 -05:00
Petr Mikhalicin
246bf4af75 backlight: Fix dimmed display doesn't go to sleep
Firmware didn't start sleep countdown if
1. Display was already dimmed
2. Fade out timer was set

You can reproduce this by:
1. Set fade out timer. For example, 500ms
2. Wait till display will be dimmed and go to sleep
3. Switch hold ON or plug headphones

Change-Id: I27ca857aa8db4551bd9caad4815cd73a64bf6185
2026-02-25 13:07:38 -05:00
Solomon Peachy
ad10ed806b FS#13791 - Slovak Translation improvements (Matej Golian)
'Single Mode', 'USB-DAC' & 'Sharp' filter type

Change-Id: I6e6fb7f55acaf00cc30088cb61fc4fb00de7f766
2026-02-25 09:11:49 -05:00
Aidan MacDonald
55183c0b2a stm32h7: sdmmc: write DCTRL after DTIMER/DLENR for non-data commands
According to RM0433 the DCTRL register needs to be written
after DLENR and DTIMER. This is respected for data transfer
commands but not for non-data commands. Nothing bad seems
to be happening because of this, but it seems wise to rectify
the issue.

Change-Id: I55d8f2c1994bff747e5978847fda57445f001b02
2026-02-24 20:18:22 -05:00
Aidan MacDonald
65bf8d4192 stm32h7: sdmmc: ensure minimum time between CLKCR/CMDR writes
According to RM0433 consecutive writes to the CLKCR and CMDR
registers must be separated by at least 7 AHB clock cycles.

The initialization code didn't respect this and it seemed to
be causing a nasty bug, where the SDMMC bus clock got stuck
at 400 KHz in hardware. Despite the CLKCR register reading
back the correct value, it could not be written with a new
value even in the debugger; resetting the peripheral was the
only way out of this state.

Adding some dummy register reads after any access to CLKCR
should insert the necessary number of wait states. Without
the fix, the SDMMC clock gets stuck about 12% of the time.
With this fix, the clock always initializes correctly.

Change-Id: Iba85b8e1e3c60992ddc42fb4c1e66c37941ed617
2026-02-24 20:18:15 -05:00
Alexander Polakov
7fdba68524 Add Shanling M0 Pro to jztool
Register the M0 Pro as an X1000 device in jztool for USB boot loading.
Uses Shanling USB IDs (0x0525/0xa4a5) for mass storage identification.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Change-Id: I5ab71d6e7dcce925a2c91c2779964b4302ef777e
2026-02-24 18:03:33 -05:00
Solomon Peachy
3d37de4d01 FS#13790 - Update ro translations (Mihai Alexandru Vasiliu)
Change-Id: I4ed1399c006342887db0ac0393ca641d111cb117
2026-02-24 08:52:09 -05:00
Solomon Peachy
d1fa956079 talk: Voice discnum/tracknum as a generic number, not "year".
Only applies to "string" values, numeric values were already
voiced correctly.

Change-Id: If66991ced6e04834a8b210cbbf45cbf3741da06e
2026-02-24 08:07:21 -05:00
Paul Sauro
914760b54e config: USB_CHARGING_FORCE must be enabled for all iPods
If not, these devices will charge very slowly (0.07A) when plugged into a wall plug, and will all discharge slowly when docked & playing music.

Enabling this option (that is already enabled by default on some other devices like erosq and fiio m3k) make them pull between 0.20 and 0.30. They charge faster, just as fast as on Stock OS, and won't discharge when playing music while docked.

Change-Id: I90a59caaca463354772b1869f7333d8efce4f117
2026-02-23 16:11:38 -05:00
Solomon Peachy
022db8214c fix red in 5b5cd252d0: Don't compile ALSA driver for hosted bootloaders
Change-Id: Ied255fb215a2b56ac827f509e949abff5819d3a0
2026-02-23 11:10:20 -05:00
Aidan MacDonald
5b5cd252d0 pcm: improve 32-bit software volume scaling
Replace the factor calculation from pcm-alsa.c, which
is based on signal *power* ratios, with the fp_factor()
calculation that is based on amplitude ratios. Because
power changes with the square of amplitude, this means
1 dB of power equals 2 dB of amplitude.

Rockbox's volume controls are amplitude-based, so the
smallest step size for pcm-alsa was effectively 2 dB.
The fp_factor() method supports 0.1 dB steps and is a
bit more accurate besides, so it's simply superior in
all respects (aside from taking a few more CPU cycles
to calculate the factor).

Change-Id: I34d143c225d8b5e085cde299fc405f83c13314bf
2026-02-23 15:44:42 +00:00
Solomon Peachy
bcdec75f94 FS#13789 - Slovak: Fix Bitrate Translation in Recording Menu (Matej Golian)
Change-Id: Id0557dd64cfeb8ac4ee214c78afc76839354f7fe
2026-02-23 09:26:46 -05:00
Solomon Peachy
922b5e9a4b vx767: Bring config in line with its siblings
* Single storage device type (SD) that can be hotswapped
 * Fix bootloader build

Change-Id: I494a46ccf0f7f70cfa149a0727977aa421891d6c
2026-02-23 08:32:44 -05:00
Solomon Peachy
e81dd7c709 xduoox3: Disable CONFIG_STORAGE_MULTI
This is only necessary for targets that have more than
one storage *type* (==SD/ATA/NAND).

Change-Id: I004e597440e76252c4ffa0591b7632254c159431
2026-02-23 08:23:47 -05:00
Aidan MacDonald
4af1768795 echoplayer: initialize I2C bus
Change-Id: I159d1a2c97b02b5e7aa61452098b05d9d854dc89
2026-02-23 08:19:35 -05:00
Aidan MacDonald
9c5017ea98 stm32h743: implement I2C controller interface
Change-Id: I1d4af5ba8a42d4d2a6a3b1d50059e699b016431b
2026-02-23 08:19:29 -05:00
Aidan MacDonald
c9d468d924 stm32h7: use nvic_disable_irq_sync for usb interrupt
Change-Id: I583b860f4b1696d4be84b0bf858a8b857d891aea
2026-02-22 20:54:06 -05:00
Aidan MacDonald
02d317a3f4 arm: add nvic_disable_irq_sync()
Disabling an IRQ in the NVIC may not take effect right away;
if the IRQ is being disabled to implement a critical section
it's necessary to follow up with dsb + isb to serialize the
NVIC update. Add a helper function for doing this.

Change-Id: Iaaa238ad39997cc3c6d62867d265cf9e9e0e5c4b
2026-02-22 20:53:53 -05:00
Solomon Peachy
7c2800beb4 FS#13788 - Updated Slovak Translation (Matej Golian)
Change-Id: I3baa9eee462f1960ccd0d6374983c44d4132d392
2026-02-22 14:35:43 -05:00
Aidan MacDonald
9d6dfe2245 Fix yellow in 017dd72ff3
Change-Id: Ib228acef524b0527b9bc0de3cf2104efda350e73
2026-02-22 15:15:10 +00:00
Solomon Peachy
017dd72ff3 plugins: Convert all plugins to using mixer API for playback
pcm_play_data -> mixer_channel_play_data
pcm_set_frequeny -> mixer_set_frequency
pcm_play_stop -> audio_stop at startup / mixer_channel_stop at shutdown
pcm_is_playing -> mixer_channel_status

All of these have been removed from the plugin API.  Updated API docs to
clarify role of audio_stop() vs mixer_channel_stop()

Todo:  get rid of pcm_play_[un]lock().

Change-Id: I8800c131b51f064ee923a4c6e42aa405d33851fc
2026-02-22 08:15:14 -05:00
Aidan MacDonald
f6dfa5144d stm32h743: break out SAI and DMA interrupt handlers
Change-Id: I6a8eba6211eab34915d99000426aacd6ea396769
2026-02-22 12:45:56 +00:00
Aidan MacDonald
0cc6f070dd stm32h743: add DMAMUX registers and request IDs
Change-Id: I3819c6535a224d73cfa98b1d8ba78c6927b55c9e
2026-02-22 12:45:56 +00:00
Aidan MacDonald
90bd32dc38 stm32h743: add DMA1/2 registers
Change-Id: I24487fd7a889ea7ae3627ecf1c800c8edffaea42
2026-02-22 12:45:56 +00:00
Aidan MacDonald
0d7f240d81 stm32h743: add SAI registers
Change-Id: I2d669005372daae537c41df68a32043ff96b8e76
2026-02-22 12:45:56 +00:00
Christian Soffke
ac3999d5ab plugins: stopwatch: fix missing or wrong SBS title
Change-Id: Iecdb7a3a142ee3754f25d374e71dae62dc4d5a17
2026-02-21 12:34:41 -05:00
Christian Soffke
a70436fe8e plugins: lrcplayer: fix non-UI font info vp w/ SBS enabled
With the statusbar enabled, the UI viewport's
font may be different from the UI font, which
breaks stringsize calculations in LRC Player
that are currently all based on the UI font.

Change-Id: Ib53de62134b250fa50353074959843278f38478f
2026-02-21 14:34:45 +01:00
Aidan MacDonald
59cc0282ec plugins: remove never-released beatbox plugin
It was added back in 2007 (commit 8b6d28790e) apparently
in a half-baked state, and has never been enabled since.

Change-Id: I728b5730fe05262bae292cd7fcdcfe4b53c4b315
2026-02-19 19:27:17 -05:00
Lourenço Soares
0b3a5ab1e6 plugin lrcplayer: Added manual scrolling feature
lrcplayer currently automatically scrolls the lyrics for you, as it assumes that there is sync information in the lyrics. In the case where there aren't (like for ID3V2 USLT tags), the plugin will automatically assume timestamps and will scroll automatically.
This commit adds an option in the Display Menu to allow automatic scrolling to be disabled. When disabled, you can scroll the lyrics using the volume keys (like you would on the iPod's OS).

Change-Id: I87ef27fd2b84c97374bdfd0e47f4c00ddb4bc85e
2026-02-19 16:10:14 -05:00
Aidan MacDonald
8013aa2370 audio: remove pcm_sw_volume include from sound.c
Drop the include because nothing here needs it.

Change-Id: Iad7ada127589c649359b3eea8bf2a21f5f00a344
2026-02-19 14:16:26 -05:00
Roman Artiukhin
3373ed6744 playback: fix single mode handling with auto frequency switch enabled
Fix single mode fails to pause between tracks with different sample rates with auto frequency switch enabled.

Fixup for c199d9a3

Change-Id: I51bbd33a15be16b711b3a8e46c0cab1b15a93705
2026-02-19 11:59:10 -05:00
Roman Artiukhin
5cf3c6bf9a Add ability to specify autostart plugin path and argument
Extend AUTOROCK define functionality to allow specifying both the
autostart plugin path and its argument.

Example:
#define AUTOROCK VIEWERS_DATA_DIR "/imageviewer.rock"
#define AUTOROCK_ARG "/jpegs/sample.jpg"

Change-Id: Icc41bceac676e8db17d3a63baefdf96e3023c181
2026-02-19 10:28:35 -05:00
Solomon Peachy
6f302083b5 cleanup: Get rid of erroneous execututable bit on various source files
Change-Id: I6382ba56dc6d99189c8647b010208c33fc2da7ca
2026-02-19 07:54:35 -05:00
Aidan MacDonald
af9a9bd9d4 echoplayer: increase LCD RGB & SPI output speed to medium
At low speed there's some occasional corrupted pixels,
most visible on album art and such; this goes away at
medium speed.

Change-Id: Ice4eaec4284023d2d3f5c571b242cb27ebc26da9
2026-02-18 18:14:24 -05:00
Aidan MacDonald
e5e82820f6 echoplayer: re-enable 50 MHZ SDMMC bus
The problem with drive strength and things not working reliably
at 50 MHz turned out to be entirely caused by the ESD diodes on
the data/command/clock lines, which have a whopping 200-300 pF
junction capacitance -- 6-10x higher than the 30 pF limit given
by the MMC spec.

After desoldering the diodes the bus seems stable at 50 MHz and
with any drive strength (note MEDIUM is still fast enough even
for 50 MHz, so the drive strength is unchanged).

Change-Id: If9847ee4145f5ed2f7e172cfa89acad0737a897f
2026-02-18 18:14:11 -05:00
Roman Artiukhin
c199d9a369 playback: fix single mode briefly plays audio from the next track before pausing
Change-Id: Iab82427d5429210701e65103325f72c7919685e1
2026-02-18 17:04:31 +02:00
Solomon Peachy
41567532a1 jz47xx: Further SD driver improvements
* Get rid of the SD_CIM_RESET meta-command and put all
   reset/init logic into one place
 * Don't double-issue the SD_GO_IDLE_STATE command
 * Explicitly set lowest speed upon reset

Change-Id: I5abfe9f64997e39087b8a77d525f90c77733a1a8
2026-02-17 17:34:59 -05:00
Solomon Peachy
e8b75a52ab sansafuzeplus: Support up to 96KHz playback.
It was limited to 48KHz due to insufficient IRAM but at some point in
the last five years or so that must have changed.

Change-Id: Ia893ed5e1f3026158daad77991c3d9cca2fed97c
2026-02-17 14:37:38 -05:00