Commit graph

36725 commits

Author SHA1 Message Date
Christian Soffke
028eafaeef Onplay: Fix items from Queue submenu appearing at top level
If "Show Queue Options" was set to "in Submenu",
the queue options would incorrectly appear at
the top level after you had queued a track, at
least until you entered and exited the submenu
again without selecting an option.

Change-Id: I59abd73de7e3634bc8701aa2288b56bde7552513
2023-05-26 19:13:29 +02:00
Christian Soffke
31b8cd8f73 PictureFlow: Remove menu items for "Return" and "Clear Playlist"
On all players, it should be possible to return from the Main Menu
by pressing the Back or Menu key. Unless I'm missing something...

"Clear Playlist" has hopefully become superfluous after the "Playing Next"
context menu was added, which offers similar functionality.

Change-Id: I741544978fb7936b8d5a34dfc656472e20c1737e
2023-05-26 13:08:12 -04:00
Solomon Peachy
6e192dc28d hiby: the second drive for these is "USB" not "HD1"
Change-Id: I6a703265398db14ac9c83a51091184492123e1fb
2023-05-26 12:48:23 -04:00
Christian Soffke
49b877470d PictureFlow: Add ability to go to last album
After launch, PictureFlow always goes to the currently playing
album, or to a selected album, if applicable. Which is probably
a useful default, but not always wanted. You can now get back
to the album you were looking at when PictureFlow was last
closed, or when the sorting was last changed.

Change-Id: Iba3e0d5388f6b49534d09fe0224b0dbfa65d5f1d
2023-05-26 18:29:07 +02:00
Christian Soffke
bbef598817 PictureFlow: Scroll through albums from track list
This lets players that can't spare any keys scroll through
albums without leaving the track listing first, which was
only possible on the M3K before.

Enter mode from Main Menu. While active, the gradient
highlighting an album's selected track will not appear,
and context menu options apply to the whole album
instead of to a single track.

Exit mode by pressing buttons for Select/Back, or by
quitting PictureFlow.

NB: Be sure to enable "Database in RAM" for a good
experience, as the loading time for each album can
become quite annoying otherwise.

Change-Id: Id6c9a8cc49e4cfb2aea958610b95a19887f496b6
2023-05-26 12:26:06 -04:00
Solomon Peachy
0f941488af dbtool: Fix red.
Apparently _most_ targets have a dbtool built as a simulator variant,
but _some_ are built as an application target.  This commit fixes
simulator-based targets, which weren't ever broken.

(Prior commits fixed things for _app_ targets, which haven't worked
 since at least 2020, maybe never..)

Change-Id: I7fef2b10e5128059b293118617701630bf3dc1fb
2023-05-25 16:27:10 -04:00
Solomon Peachy
8bc7ba5d22 dbtool: More fixes to dbtool operation
Now properly treats current directory as "/"

Change-Id: I54357a65f2fda7d2cfb56ff18a044ae10b87bbce
2023-05-25 16:05:59 -04:00
Solomon Peachy
e803daae0a dbtool: Fix it up so that it runs from the CURRENT working directory
This makes it far more useful, as before it insisted on scanning from
the root directory and putting the generated db files in /.rockbox

Change-Id: I0d0e3c6c6c7ee1fc5473185482fbfb9a2a2be29f
2023-05-25 15:43:15 -04:00
Solomon Peachy
11e858b209 fix yellow introduced in previous commit
Change-Id: I794f6423853cf5d2c368de55f4be2ce54e3076c9
2023-05-25 12:47:04 -04:00
Solomon Peachy
220fb04250 hosted: Fix the disk storage display in the rockbox info page
This was introduced by adding multivolume support to the hibyplayer units,
and might affect other things, if so a more general fix might be needed.

Change-Id: Ia9c1b6b1eb50e67221ce440d30d6770daaeac74e
2023-05-25 12:13:37 -04:00
roman.artiukhin
f2a5b78b51 Sansa Clip keymap: Playlist on short Down press and Hotkey on long Down press in WPS
Change-Id: I39a01df90b658d76b9cf2f94d9a81a4f7ff076cf
2023-05-24 13:23:26 -04:00
Solomon Peachy
3acd5f86e5 build: Fix problems compiling old glibc with gmake >= 4.4
Three separate problems:

1) Make 4.4 defaults to a named pipe for jobserver control, this
   was incompatible with how glibc did recursive makes
2) Make 4.4 passed long arguments ( --foo ) into MAKEFLAGS and this
   broke stuff that wasn't expecting it
3) Circular dependency in a header generation due do make 4.4 being
   stricter/more consistent in how it orders rules vs which makefiles
   they came from.  This one was the real !@#!@ to deal with.

This patch set fixes the hosted arm (glibc 2.19) and mips (glibc 2.25)
toolchains.

Change-Id: Ie6d6a0ab7e1b36f24c43e524fee4afc0bd3a14d6
2023-05-23 15:57:00 -04:00
Solomon Peachy
56fe1129da configure: Deal with more variations of the 'ld' version output
eg, our current toolchian generates this:

   GNU ld (GNU Binutils) 2.26.1

But the system toolchain on the buildserver generates this:

   GNU ld version 2.37-37.fc36

Change-Id: I0166f12d660654c1456289954fb256db98213618
2023-05-22 15:58:29 -04:00
Aidan MacDonald
e7cc77e5b8 configure: Detect linker's NO_CROSSREFS_TO() support
NO_CROSSREFS_TO() was first introduced in binutils 2.27.
It is used to have the linker report errors when symbols
from a list of sections refer to a specified section,
which is useful for verifying that normal code does not
refer to INIT_ATTR code.

Note this doesn't actually start using NO_CROSSREFS_TO()
for builds -- that will have to wait until the toolchain
upgrade when we'll have a new enough binutils -- it just
detects support for the feature so it can be conditionally
enabled in linker scripts.

Change-Id: If1553eaa671fcbbdfe6af357a6331931e7c4f997
2023-05-22 14:48:07 -04:00
Solomon Peachy
6e05fcf4d0 FS#13551: Correct the native name for the Slovak language (in rbutil)
Change-Id: I01281b2ac8c8112e44d5fb6da208b18f703ba92e
2023-05-22 10:53:22 -04:00
Solomon Peachy
92b80bdba5 lang: Support languages that speak the units before a numerical value
Previously, it was hardcoded to the english convention of units-last, so
"100%" would be voiced as "one hundred percent".  This adds a new
language flag that makes the units be voiced first, ie "100%" will be
voiced as "percent one hundred".

So far only the Chinese-traditional and Chinese-simplified languages
utilize this feature (taken from an old ticket, FS#10340) but I'm sure
others would want this feature too.

Change-Id: Idf825ec9299dc0ed09921cf67aec61b1ab262fc6
2023-05-22 10:30:13 -04:00
Solomon Peachy
ab0ba139f5 pdbox: Gate the warning suppression to apply only to GCC 13 and newer.
Change-Id: Ie0f39fde5e682f3995ed852417b61ae383c5e23b
2023-05-22 10:28:38 -04:00
Solomon Peachy
3a8d5525ae pdbox: Fix warning with GCC13
Change-Id: I7814e7894b315d06c962fdaedf1a9f9cd59daf5c
2023-05-21 20:58:29 -04:00
Solomon Peachy
5dc0e4e0bc disk: Support GUID Partition Tables (GPT)
Notes:

 * Currently limited to 32-bit sector addresses due to internal Rockbox
   APIs. So this means a practical limit of 2TiB per drive.
 * Only 'General Data' GPT partition type is recognised, as that's
   what SD cards seem to use for exFAT/FAT32.

Note that _booting_ off GPT-partitioned drive will require rebuilding
the various rockbox bootloaders, and even then there may be platform
limitations that preclude this.

Change-Id: Ibfaae1960adcb1e81976d4b60dd596c6d16318e4
2023-05-21 20:34:03 -04:00
William Wilgus
8fbd44a3d3 [BugFix] Last Fm Scrobbler corrupted entries
I couldn't seem to reproduce the issue here:
https://forums.rockbox.org/index.php/topic,54165.msg252081.html#msg252081

but I figure its probably a threading issue

so we now have a mutex on the cache

and to top it all off each cached entry has a crc and length that are
checked before writing the entry to the file otherwise it is prepended
with # FAILED - so hopefully scrobbler 'parsers?' don't barf on the log

Other changes:
there is now a MRU table for tracks this should help prevent duplicates
it is configurable..

the cache buffer now no longer uses fixed chunks allowing more tracks
to be written between flushes

Change-Id: Iaab7e3f6a76abfc61130f3233379a51c9a6d12e5
2023-05-20 22:41:34 -04:00
Franklin Wei
4554b90859 sdl: fix two bugs in ROCKBOXAUD_PlayAudio()
First was an off-by-one bug in the loop over buffers. The condition was
`i < this->hidden->n_buffers', but should have been <=, not <. This wasn't
a critical issue, because the last iteration would check the currently
playing buffer - an unlikely situation.

The second logic bug would make the code always think it had found an empty
buffer, even when it had not, since `idx' was being unconditionally set
every loop, rendering it unusable for a sentinel value. Fix that.

Change-Id: I137330965d699acf827e59b6aa5c5f9ddf2ca617
2023-05-17 13:23:14 -04:00
Nikita Burnashev
e232f69214 atjboottool: gzipped fw files, option for big-endian fw, clarify ECIES in fwu
Added fw modifications required to unpack real world player dumps.


Documented more fwu header fields, magic numbers and finite field arithmetics (extended Euclidean for inverse, long division for reducing modulo field_poly).

v3 encryption used is standard RC4 with the key additionally ciphered by the Elliptic Curve Integrated Encryption Scheme.

Either sect233k1 (NIST K-233) or sect163r2 (NIST B-163) curves can be used, with the former overwhelmingly prevailing, being hardwired in SDK's maker.exe. Using a private/public key scheme is superfluous because both are stored in the firmware, with the added level of complexity likely serving the purpose of obfuscation. The private key is generated at random with each invokation.

None of KDF or MAC from ECIES are used, RC4 key is directly xored with the shared secret. The random number r used to calculate rG isn't stored, but that's unimportant since only krG == rkG is actually used in the encryption.

Change-Id: Ieacf8cc744bc90c7c5582dd724b2c10a41bfc191
2023-05-17 13:19:31 -04:00
Solomon Peachy
72c0e49b41 scroll: Fix red from previous commit.
Targets with remote LCDs need to have the lcd scroll driver instantiated,
even in the bootloader.

This is because lcd_remote_scroll_stop() is called, in addition to
lcd_scroll_stop().  This could probably be excised.

Change-Id: I475269f9361eb469c62ad0f74abc1eb3baa4c134
2023-05-17 11:55:58 -04:00
Solomon Peachy
9134c688d9 scroll: Eliminate a warning when building a bootloader
Bootloaders don't support scrolling, so don't even try to compile
the scroll_thread stuff

Change-Id: I6bd4f901a2c3e9b79654d27c0349be7e7aa3fa1a
2023-05-17 11:03:02 -04:00
Solomon Peachy
fdf661606c FS#13992: Update Serbian translation (Ivan Pesic)
Change-Id: If0a7b2202a77b1482b3d4a819cff070b45b4fa4a
2023-05-09 16:37:07 -04:00
William Wilgus
f4c95c70f9 [Bugfix] diacritic.c MRU discards an entry when slot available
a new slot gets added but it is set to 0 and an entry gets discarded
instead set it to the last entry read

Change-Id: I3d6f9b73030c8a5083d299c99314f9c40052689a
2023-04-24 23:13:10 -04:00
roman.artiukhin
67b98292a3 Temp quick fix for broken bookmarks
Mark playlist as not modified in playlist_resume

Change-Id: I8a9769a1fc1265f024da230e496eac9a10186097
2023-04-22 12:58:18 -04:00
Solomon Peachy
8ff0fb6075 toolchain: Globally use '-fno-strict-overflow'
This turns on -fwrapv and -fwrapv-pointers.

As per GCC docs:

  "This option instructs the compiler to assume that signed arithmetic
   overflow of addition, subtraction and multiplication wraps around
   using twos-complement representation. This flag enables some
   optimizations and disables others."

All of our targets fall under this category.

For some time now we've been using -Wall which implies
-Wstrict-overflow=2, which only warns when the compiler actually
implements a possibly questionable optimization, so I'd expect this to
not affect our code size at all.

Change-Id: I8e1c10183e390c6d0897e81f84a5df4590b02d84
2023-04-18 10:51:24 -04:00
William Wilgus
100e9ac137 Fix Red lastfm_scrobbler_viewer.c
plugins need rb-> for things like strlen

Change-Id: Ia3b52423d3f7f91c2996aa9b9b194f39af44468f
2023-04-17 00:36:04 -04:00
William Wilgus
dfe12252bb [Feature, Plugin] lastfm_scrobbler_viewer
a plugin to view lastfm scrobbler logs

uses print cell to give a spreadsheet view of scrobbler logs

buffers the whole file if possible otherwise it reads entries from disk

rudimentary text searching for columns
include / exclude; all/any and case sensitive

Change-Id: Id9616e5796658952fba4ea747f596cb77d6f34c0
2023-04-16 23:50:24 -04:00
Christian Soffke
43b0fba75d Track Info: Show number of tracks being inspected
Applies to the database and PictureFlow

+ fix red 6ca57ec

Change-Id: If708851ebdfe075e9d6ea3f2e2dd790cc9deac94
2023-04-13 03:55:21 +02:00
Christian Soffke
6ca57ec389 Track Info: Display larger file size and length values
When displaying Track Info for multiple tracks,
the value for combined file sizes or length was
capped at 2 GiB / ~596h.
Limit has been raised by a factor of 1000.

Change-Id: I942c64e81864cba3f719c83a24912883fafeb70e
2023-04-13 02:31:32 +02:00
William Wilgus
78c92c5ca8 [Feature] Supress voice during sleep timer shutdown
if show_shutdown_message == false and sleep timer is active
talk will be disabled on shutdown

Change-Id: Ia660e753700f3e283691f41797ef7a77a2d9a8d9
2023-04-08 17:13:07 -04:00
Christian Soffke
3554306617 PictureFlow: Minor fixes/refactoring
- get_albumart_for_index_from_db:
slide_index not allowed to be -1

- Fix visual glitch changing scroll direction:
An errant frame was displayed when switching
from one scroll direction immediately to the other

- Rename/combine functions and replace
magic numbers for zoom animation

- iPods: Fix inability to skip or reverse zoom animation
using Back button

Change-Id: I888c3c437bb123325813bf79be56b320cfbfda0c
2023-04-05 11:42:31 -04:00
Christian Soffke
8b95f2e758 plugins lib: use existing mp3info function
Change-Id: I88d3c04db5cbc0905153b0e616adb7a64afee707
2023-04-05 11:27:25 -04:00
roman.artiukhin
1e678977f2 Hotkey: Add List Bookmarks action
Change-Id: I8cc775d2403b682d6d91069e26947fc08d379258
2023-04-05 09:06:28 -04:00
Christian Soffke
31d56d4a59 Database: Disable delete hotkey unless audio file is selected
Fixes behavior where Rockbox would offer to
delete nonexistent directories.

Change-Id: I219da382b181372023b9408ac9a85189bffdcb74
2023-04-05 07:16:18 -04:00
Dana Conrad
b31127db7d [bugfix] x1000: Wait for FIFO to be empty rather than flushing
When data is not in packed-16-bit mode, flushing the fifo
may result in swapping left and right channels if there
happens to be an odd number of entries in the FIFO.
This is especially likely when switching sample frequencies
for some reason.

When stopping PCM DMA, disable DMA and Underrun Interrupts
and then wait for FIFO to be empty before stopping AIC's playback.

Change-Id: I45b6b022c9e3889627842663cd9b7d2e0affb7c6
2023-04-02 11:34:39 -04:00
Christian Soffke
287747591e plugins: vbrfix: Fix fd leak & error handling
- mp3info returns true for error
- fd wasn't closed for non-vbr files

Change-Id: I5432025d3384ddf92ed0a478587dcc1715fcf524
2023-04-01 08:19:22 -04:00
William Wilgus
2456d28e21 [BugFix] open_plugin didn't recognize opx shortcuts
opx shortcuts allow an easy way to add parameters to plugins
you should be able to set them as shortcuts now

the plugin hd a use after free bug on the dat file file descriptor

Change-Id: I5fe3b0628e7da003c03b9b54f5788b0d0dbfea74
2023-03-30 01:04:51 -04:00
William Wilgus
a2e5d9563f [Feature] resume TSR plugins after interruption WIP
save tsr plugin path for later

resume tsr plugin when user stops the interrupting plugin

expand return of tsr_exit function to allow
continue, suspend, terminate

tsr plugins check parameter at start to determine if
the plugin is being resumed

Change-Id: I6fc70de664c7771e7dbc9a1af7a831e7b50b1d15
2023-03-25 10:02:43 -04:00
Aidan MacDonald
2e99e2175b playlist: Remove control file cache
Control cache entries cost 24 bytes per command, but cacheable
commands are always less than that when written out to the file.
We can actually cache *more* data by writing commands directly
to the fd (native Rockbox has a 512-byte cache per fd) and it's
much simpler.

Change-Id: Ibb1b9ffa56ef17431b281419a04082e14d0cbd85
2023-03-24 19:02:56 +00:00
Aidan MacDonald
a4cfa8ae6a playlist: Unconditionally strip bogus dirs in playlist_peek()
The intent behind the check is to only do this if the filename
comes from an on-disk file. With the RAM buffer is gone this is
now "always" the case.

Change-Id: I4c26e32c482dde176b69a6071e9562e9955d7171
2023-03-24 19:02:56 +00:00
Aidan MacDonald
aab6a44fc5 filetree: Remove dead code in ft_build_playlist()
This checks for an out of memory condition when the filenames
were buffered in RAM. The playlist no longer buffers anything
in RAM so the code is unreachable.

Change-Id: I4c2d0b2ac4ba3b7e7c94fe554a0cf7cb1a798e09
2023-03-24 19:02:56 +00:00
Aidan MacDonald
1f1893f520 playlist: Remove in-ram filename storage
Use the playlist control file for directory playback instead of
storing filenames in RAM. The implementation of that feature is
very iffy and probably responsible for random crashes that may
occur when skipping through directories rapidly.

Change-Id: I3863940cd4542410d8046a3ca47508b5d97309a1
2023-03-24 11:10:12 +00:00
Aidan MacDonald
ac1cbd5dd0 playlist: Clean up close_playlist_control_file()
Move locking outside the function since most callers already
hold the lock.

Change-Id: I4b6774e2322c86962b4cc7a5f33d13cd4ffb1c7b
2023-03-24 11:10:12 +00:00
Aidan MacDonald
e6534b051e playlist: Add helpers for opening/closing .m3u playlist
This helps maintainability and ensures the opening is done
consistently.

Change-Id: I7805716182dfa93f917d54d40f8e420e87da16b0
2023-03-24 06:36:23 -04:00
Aidan MacDonald
5eb24a9582 playlist: Cleanup get_next_dir()
Pass the direction as a signed integer to avoid jumping through
unnecessary hoops.

Change-Id: I1a36c3804b5f7103464f0d2ee69d060505261274
2023-03-24 06:12:01 -04:00
Aidan MacDonald
58b2e45782 Fix unified syntax in ARM inline assembly
GCC 4.9 always emits assembly with divided syntax. Setting unified
syntax in inline assembly causes the assembler to complain about
GCC's generated code, because the directive extends past the scope
of the inline asm. Fix this by setting divided mode at the end of
the inline assembly block.

The assembler directives are hidden behind macros because later
versions of GCC won't need this workaround: they can be told to
use the unified syntax with -masm-syntax-unified.

Change-Id: Ic09e729e5bbb6fd44d08dac348daf6f55c75d7d8
2023-03-23 18:16:33 +00:00
Chris Chua
86429dbf1e Using ARM Unified Assembler Language
Change-Id: Iae32a8ba8eff6087330e458fafc912a12fee4509
2023-03-23 13:28:22 -04:00