Commit graph

39003 commits

Author SHA1 Message Date
Aidan MacDonald
cf1e3fd5a3 misc: remove leftover pnx0101 support code
Remove now-unused stuff related to the PNX0101 processor,
which was missed during the removal of the IFP-7xx port.

Change-Id: I5ff248b3e83cb67a357743130c3e51ed84a720e5
2026-03-05 15:41:06 +00:00
Aidan MacDonald
58ffe7bc34 plugins: remove default value of DRAMORIG
Change-Id: Ia5efdbef207890682bfd8aa8cacce32d7e79c2b2
2026-03-05 10:31:35 -05:00
Solomon Peachy
d76c9c992c FS#13746: open_plugin_run() doesn't handle "not found" properly
If the specified key wasn't found, we would fall back to trying to launch
a plugin with the LANG_* key.  This will fail, resulting in an error
that spells out the (inappropriate) LANG_* text.

Instead, fail out with a more appropriate error.

Change-Id: I046878f87a2ef2bc994d0b7d037359695a18d392
2026-03-05 08:40:12 -05:00
Solomon Peachy
ba69fb9bbf doom: Rework audio init to properly respect pcm_sink capabilities
Try to use 11KHz if possible, if that's not an option, fall
back to 44KHz which is always available.  Simulators always use
44KHz.

Change-Id: I7547e7c1bddf7ce4634f7fd7bc64d4a5c9b62c29
2026-03-05 07:51:27 -05:00
mojyack
f81126bcf0 plugins: test_sampr: remove hw_freq_sampr usage
Change-Id: Iaf9f7f495364fd87db8e25f4ce147540b370f82b
2026-03-05 07:43:25 -05:00
William Wilgus
086c29267c [bugfix, AS] zxbox keyboard input overflows text variable
int zx_kbd_input(char* text/*, int buflen*/)
is supplied with a single char by all callers
thats fine till we get to here in the decode routine
while (*utf8)

since it just reads till it hits a 0 its probably fine
but Address Sanitizer caught it

make c a char array of 8 bytes to ensure a NULL

Change-Id: Iad3284df34cb7451422fc96ae0bb8e159ee440b0
2026-03-05 01:14:17 -05:00
Solomon Peachy
cef29a1986 fat: fsinfo structure references _clusters_ not sectors
These fields are defined by FAT32 itself, and are specified as 32-bit
values.  So switch them from sector_t to simple uint32_t.

Change-Id: I98afecfbe1f8a1b83fbdd4ec3fea016b8e0b985d
2026-03-04 13:10:46 -05:00
Aidan MacDonald
87f2024631 echoplayer: clock FMC from PLL1Q
Unlinking the FMC from the bus clock should make it
simpler to do CPU frequency scaling later on.

Change-Id: Ia87bbe3dd01ff25ea1520309680017b400471bfe
2026-03-04 10:23:23 -05:00
Aidan MacDonald
b155e2c35a echoplayer: modify LCD timings to disable PLL3 fractional mode
According to the datasheet, the PLL fractional mode is
apparently not supported in the medium VCO range.

The LCD isn't picky about front/back porch settings so
modify these to get a dot clock close to 6 MHz (within
~0.1% error).

Change-Id: I51647534db8c2b261391864db9262a0b04548e6d
2026-03-04 10:23:17 -05:00
Solomon Peachy
fe0c404db1 FS#13810 - Updated Italian Translation (Alessio Lenzi)
Change-Id: I8143e6fcb78dba6d5aabf9bf227862c1e025b6a9
2026-03-04 08:25:37 -05:00
Solomon Peachy
3a99ef21cd build-info: Add a newline before the [status] section
Marginal improvement in readability

Change-Id: Ic962ec2bb9ad09e5151cd4f712a9f5768da282bc
2026-03-04 08:17:12 -05:00
Solomon Peachy
5d1185774c plugins: Remove audio_master_sampr_list from the plugin API
From what I can tell it has _never_ been used.

Change-Id: I08f3860f04add35859e82b8e94abfa9789a45026
2026-03-03 21:31:58 -05:00
mojyack
f343168051 settings_list: apply playback freq changes only when current sink is builtin
Change-Id: I1410b9fef621be31676f10269fdb07d31d827acb
2026-03-03 20:02:52 -05:00
mojyack
38d978a512 plugins: sdl: remove hw_freq_sampr usage
Change-Id: I78311f63f04a68b968a584dd485e795813876fc3
2026-03-03 20:00:46 -05:00
mojyack
f87ff3a9b2 playback: support non-builtin sinks in audio_guess_frequency
Change-Id: I87b1b489ffc5b9ae05c3233bc091cd7be3da406e
2026-03-03 18:19:07 -05:00
mojyack
76d63246c5 playback: do not hardcode pcm sink in audio_set_playback_frequency
make audio_set_playback_frequency() can be used for non-builtin pcm
sinks.

Change-Id: I9d1110f28753e912b84515594a1361cd17fa5e74
2026-03-03 18:17:16 -05:00
Solomon Peachy
ea570c5728 pcm: Make more of the low-level PCM API private
* pcm_play_data
 * pcm_play_stop
 * pcm_play_stop_int
 * pcm_is_playing
 * pcm_set_frequency
 * pcm_get_frequency
 * pcm_apply_settings

Now, the only user of these functions are the mixer and recording layers
that provide a higher-level API to plugins and the main [playback]
application.

Outside of the PCM core, pcm_apply_settings() was only used immediately
following a call to mixer_set_frequency(), so the latter function
now always calls the former.

Change-Id: I61c3144dc156b9de9b7963160b525c6d10c6ad4b
2026-03-03 13:09:21 -05:00
Solomon Peachy
be1e074800 doom: minor code cleanup (replace magic constant with an existing define)
Change-Id: I39dd9accb0bb116c0c23035b75b7be141a236c01
2026-03-03 12:42:09 -05:00
Aidan MacDonald
84fa538979 echoplayer: add PCM debug menu
Display DMA error counters and the SAI underrun counter
in the debug menu.

Change-Id: I235bfcb0fa965d87c30deeb300535141eda5f974
2026-03-03 09:24:01 -05:00
Aidan MacDonald
5c1ae51193 echoplayer: implement audio playback
Playback is implemented using a target-specific PCM layer,
using the STM32H7 SAI & DMA registers directly. There are
a number of pop/click issues:

1. Slight click when powering up the amplifiers
2. Click when starting and stopping playback
3. Popping when changing playback frequency
4. Popping when shutting down

It should be possible to eliminate or at least mitigate
(2) to (4) in software, but (1) happens as a result of
powering on the amplifiers while everything is muted so
might be unavoidable.

Change-Id: I398b66596176fb2341beb7deba7bf6f4f3fb82b3
2026-03-03 09:23:23 -05:00
Vencislav Atanasov
b782f15eaa Update Bulgarian translation
Change-Id: Iac4ef4b9ae6e5778dc37fb423297336480f9b8a0
2026-03-03 14:20:49 +02:00
Solomon Peachy
c9417e24c1 FS#13807 - Updated German translation (Wilfried Winkler)
Change-Id: I01f4ba343de72386cf07efe9afdf1535659cb19f
2026-03-03 06:59:40 -05:00
Aidan MacDonald
a1b7e7b134 sdmmc_host: mark tCardInfo initialized at end of card init
This is needed to display card info in the debug menu.

Change-Id: I2e45edd9a9e26834efac48cea892157588c546a7
2026-03-02 17:11:33 -05:00
Aidan MacDonald
eafcbd3fd6 debug_menu: show 2nd SD/MMC card info only if NUM_DRIVES > 1
Toggling to the second card was allowed if HAVE_HOTSWAP
was defined, but on targets with a single hotswappable
SD card -- for example many JZ47xx/X1000 targets -- this
ends up calling card_get_info() on a non-existent drive.

A slightly better option is to check if NUM_DRIVES is
greater than 1. This is still just guessing the number
of SD/MMC slots, but it should be wrong in fewer cases.

Change-Id: Ifca29323f1c7091d9cce55c73147d0d1decae9a5
2026-03-02 17:10:55 -05:00
Solomon Peachy
c9c6fde6eb Translation updates:
- Korean (Hoseok Seo)
 - Polish (Adam Rak)
 - Slovak (Matej Golian)

Change-Id: I5c6920c93ed7c9dd92eea2a076b763e5ff86f20e
2026-03-02 07:50:32 -05:00
Solomon Peachy
ebfba622b6 fix yellow in dfa33c246b
(Today I learned that the Cowon D2 is fixed at 44.1KHz)

Change-Id: I8d50c6b81b144e32a79a2728c9cad2ffdc7b03ca
2026-03-01 22:58:33 -05:00
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