1
0
Fork 0
forked from len0rd/rockbox
Commit graph

38236 commits

Author SHA1 Message Date
Solomon Peachy
f58fad943e diskcache: Size the buffers for MAX_LOG_SECTOR_SIZE
Because if we get a logical sector size > min sector size
we'll trigger buffer overflows.

Change-Id: Ibd24f91a0f8601fbd8c5a5dfeef4ebe5c081f664
2024-11-07 07:49:17 -05:00
Solomon Peachy
e29ddfb6be ata: Support for ATA logical sector sizes > 512B
Basically this requires un-hardcoding SECTOR_SIZE everywhere, in
favor of using a variable containing what was reported in IDENTIFY INFO.

Note that the rest of the storage subsystem still needs to be fixed up!

Change-Id: I7f2dbd54ff2bc16b15010721e011949cbf308e12
2024-11-07 07:48:17 -05:00
Solomon Peachy
c3d06d21df mikmod: Properly render with fonts larger than 6x8 pixels.
Change-Id: Ib3f8c2cf84e7b6565bb8a00b74e8a662b9980824
2024-11-06 20:18:45 -05:00
Solomon Peachy
10abb34e54 mikmod: Use current theme fonts, not the cut-down SYSFONT
Change-Id: Ia5fff04b22fbad1081fcca6c66bbb7ea7f82fef8
2024-11-06 15:18:33 -05:00
Solomon Peachy
d1ffaa8949 convbdf: Properly support a compiled sysfont of over 64K.
The 'struct font' definition says:

    const void *offset;           /* offsets into bitmap data,
                                     uint16_t if bits_size < 0xFFDB else uint32_t*/

However convbdf was unconditionally using 'unsigned short' without
checking bits_size. This generated a bogus table if used with an
uncapped SYSFONT due to offeset overflows.  And a pile of complier
warnings.

That said, we're still capping SYSFONT at 255 chars due to space
constraints -- 14-Rockbox-mix jumps from 2.6K to 1022K if left
uncapped.  Yowza.

Change-Id: I4577da08ab1633ab7abbc167523196f38c8a348a
2024-11-06 09:40:06 -05:00
Solomon Peachy
000a575d13 storage: Make ramdisk use the global SECTOR_SIZE definition
Change-Id: I0c2fe75ea425107f1cd64acf42ff8c00cee07456
2024-11-04 21:10:51 -05:00
Solomon Peachy
2824bd5f16 ipod6g: Support MAX_PHYS_SECTOR_SIZE of 4K
This lets us *natively* handle varying physical sector sizes
without playing games and lying about the logical sector size.

(The original drives use 4K _physical_ sectors with 512B logical
 sectors, but you have to access everything in 4K blocks...)

Achieve this by splitting the MAX_PHYS_SECTOR_SIZE code out
of the main ATA driver and re-using it.

Change-Id: I0bc615ab4562f1e3e83171a8633c74fb60c7da1f
2024-11-04 07:33:26 -05:00
William Wilgus
d60dee6188 tagtree cleanup first letter menu code
no functional difference just some code shared and trimming of
unnecessary format strings

Change-Id: Ia6165508556790ea825e630a79946fbd2dafd9c1
2024-11-03 13:59:29 -05:00
Solomon Peachy
f3026cd072 xduoox3: Try to distinguish between "USB Plugged in" and "Charging"
Change-Id: I1879dbe6a95df215afa32012a72e1431c03a8653
2024-11-02 20:54:17 -04:00
William Wilgus
06986d27f0 Generate A-Z menus in the tagtree
this adds a new command %byfirstletter

%byfirstletter "custom_track" "Track A to Z" "title"
^ command       ^menu name     ^menu title   ^subitem

need a better name for subitem btw..

this patch also allows us to tell when we are in the BFL menu
by checking customaction == ONPLAY_CUSTOMACTION_FIRSTLETTER
we then enable spelling of the letters in the menu
it spells Numeric too but that shouldn't matter with the upcoming voice patch

Change-Id: I59815f697a4ef84a8cb540783b620d15f6670e00
2024-11-02 17:27:22 -04:00
Solomon Peachy
67ad6589fb Fix additional red introduced in 04dc052a96
Change-Id: Ie553673c5899d8399fa1cb1d7029f0d48075a420
2024-11-02 14:58:49 -04:00
Solomon Peachy
4be6285444 disk: MAX_LOG_SECTOR_SIZE also applies to a few non-ATA targets
Fuze+, native Sonys, and some of the Zens use 2K sectoring from
 the partition/filesystem perspective, even though the underlying
 storage used 512-byte sectoring.

Change-Id: I247d8cae2582c63ec1d4dda0fb225b1a25c8e16a
2024-11-02 14:48:54 -04:00
Solomon Peachy
04dc052a96 Fix (most of) the red in a8c52b1bfb
HAVE_STORAGE_INFO needs to be defined for all non-sim/hostfs targets

Change-Id: Id0d6f88306776cfc286fc0d852b77b70ba389efc
2024-11-02 14:46:23 -04:00
Solomon Peachy
a8c52b1bfb disk: Support a non-fixed (logical) SECTOR_SIZE
This allows a single build to support ATA drives with (eg) 512B and 4K
 logical sector sizes.  This is needed because ATA drives are user-
 replaceable and we don't know what could get plugged in.

 * Add disk_get_log_sector_size() API  (no-op for non-ATA storage)
 * Mostly a no-op if MAX_LOG_SECTOR_SIZE is not enabled
 * Sanity-check that storage's logical sector size is not larger
   than what we're built for

NOTE:  Other layers (eg ATA, FAT, etc) still need to be made aware of this.

Change-Id: Id6183ef0573cb0778fa9a91302e600c3e710eebd
2024-11-02 13:50:53 -04:00
Solomon Peachy
209aeff5b1 usb: Multiple improvements:
* Support varying-sized logical sectors in a single build, instead
   of a hardcoded SECTOR_SIZE.
 * Properly truncate READ CAPACITY(10) if drive has over 2^32 sectors
   And fix potential alignment issues
 * Properly truncate READ_FORMAT_CAPACITY if drive has over 2^32 sectors
 * Support READ CAPACITY(16)

Change-Id: I744b8629131f9ede31e1a972a6700b2244f2e798
2024-11-02 13:03:40 -04:00
Solomon Peachy
fa4bdf5744 Revert "Add desktop file for RockboxUtility"
This reverts commit f5d31fc1c4.
2024-11-02 11:23:07 -04:00
Solomon Peachy
f91604cf0e ata: Comments, function/variable renames, and stylistic cleanups
No functional change.  Goal is to share common code between the
ATA drivers.

Change-Id: I0532c43123e422219cea95834ce44ebb23a8b5db
2024-11-01 20:26:09 -04:00
Solomon Peachy
51ba8b3eee erosqhosted: Support HW volume control on rev2+ hardware
This also adds hwrev info to the debug output.

Change-Id: Ia75218cacb8f756a23a77334ea6ab69ac3b20d10
2024-11-01 14:12:31 -04:00
Solomon Peachy
1c28cb439b Translation updates:
- Chinese Simplified (王吉)
 - Turkish (Mustafa YILDIZ)

Change-Id: I4499ecdbc2a96078870a74f8a56bd25fa4181a2f
2024-11-01 11:59:26 -04:00
Solomon Peachy
ca4529e4e3 voice: Correct "no." -> "number" voice correction
Change-Id: I71bafce327b8297767705f3132ae65288a08d439
2024-11-01 11:55:42 -04:00
Solomon Peachy
0a11b06d93 ata: Correct parsing of the logical sector size in the IDENTIFY DEVICE
....It's specified in 16-bit words, not bytes.  So multiply it by 2.

(This hasn't been a problem in practice as everything uses 512B logical
 sectors so far..)

Change-Id: I0b1abd0f6184330f0b7f5c000c5ad547038f7c95
2024-10-31 21:51:42 -04:00
Solomon Peachy
d401501fda disk: Clean up identing (no funcitonal change)
Change-Id: I7a689132b155579ab3938231330f5bde7566809b
2024-10-31 21:51:42 -04:00
Solomon Peachy
bf2a929f4e main: Include the version string in "no partitions found" error
Change-Id: I63ddecebb9d0e27eff27eedf5ec4b6e30508152f
2024-10-31 19:57:31 -04:00
Solomon Peachy
b30f05badc Revert "plugin load / tagtree retrieval: eliminate storage_disk_is_active check"
ata_disk_is_active() behavior with SSDs has reverted, so we want to keep this.

This reverts commit ef19fa4408.

Change-Id: I29f08617285747c17a52352bd7bba4069e71cde6
2024-10-31 12:52:00 -04:00
Solomon Peachy
e829ea9a5e ata: Rework how flushing, sleeping, and power off interacts
* FLUSH_EXT is used if featureflag is set and we are using LBA48
   (unconditionally used for CE-ATA on ipod6g)
 * FLUSH is used if featureflag is set (ATA6+) or if device claims to be ATA5+

 * Rename ata_disk_can_power_off() to ata_disk_can_sleep() as that is
   what it actually tests for.  Only use it to gate issuing the
   STANDBY IMMEDIATE command.
 * Restore behavior of ata_disk_is_active() to return 1 if drive is
   "spinning" or powered up.
 * Allow poweroff if drive claims PM support OR we are able to issue
   FLUSH/FLUSH_EXT commands.

 * Added ata_flush() to explicitly trigger a flush operation, and hook it
   up to storage_flush() in the device shutdown path. (Flushes were
   only previously used in the storage device power management path)

 * After issuing all settings, re-issue IDENTIFY_DEVICE to make sure
   it reflects everything we've enabled.

 * Update manual section on Flash/SSD mods.

Change-Id: I6770a54ef3a87f4c47120bcb96c944a6652f1bf4
2024-10-31 12:51:54 -04:00
Solomon Peachy
825e406965 configure: Parameterize the neame of the "sdl config" executable
We moved to SDL2 but still had the SDL1 'sdl-config' executable
used in one place.  Additionally, all comments and the help text
referenced the wrong executable name.

Change-Id: Ie2efa80d27be5f6391fc84e49e207aa2aac26e72
2024-10-31 08:35:12 -04:00
Solomon Peachy
65241f5a32 Minor mechanical corrections to the Turkish translation
(The rest need to be made by someone who knows the language)

Change-Id: I3393291ccb3d18fd79012a6cc83556ed79e42437
2024-10-31 08:23:48 -04:00
Solomon Peachy
85330eb5fe Update multiple translations:
- English-US (Solomon Peachy)
 - German (Wilfried Winkler)
 - Italian (Alessio Lenzi)
 - Korean (Hoseok Seo)
 - Polish (Adam Rak)
 - Turkish (Mustafa YILDIZ)

Change-Id: I8ca5d6acb46bb86004e2d393cfce058dc85dc426
2024-10-31 08:08:22 -04:00
Roman Artiukhin
914a56f34c imageviewer: fix segfault when album art fails to load
Attempt to change file fails due to access to uninitialized memory with negative index

Fixup for 55a5bfe7

Change-Id: I9c42f66c856c1d4b7261da5e4996efbe9597bcd4
2024-10-29 09:44:06 +02:00
Solomon Peachy
bd02af3413 SD: Fix typo in debug menu
Change-Id: I55530ca7b3e735fef0ac6d4151e66ca11e571aa0
2024-10-28 13:53:30 -04:00
Roman Artiukhin
55a5bfe740 View Album Art from WPS context menu
Add ability to imageviewer to view current track embedded/folder album art
Add "View Album Art" WPS context menu item

Change-Id: I49caebd38e5e3e2910d418bbeaa5e51da0e6bd93
2024-10-28 12:46:51 -04:00
Solomon Peachy
c1bcebd998 FS#9059: Add WenQangYi Unibt font (William Poetra Yoga Hadisoeseno)
Change-Id: I8411349fdfdddf67f0d4a692d35176925498a7f6
2024-10-27 22:04:54 -04:00
Uwe Kleine-König
bf90197717 rk27xx-utils: fix compiler warning on amd64
sizeof(...) has type size_t which is long unsigned int on amd64, and so
the conversion specifier d without length modifier isn't suitable. There
is the length modifier 'z' for size_t arguments, but this is only
available on Linux. So casting to unsigned long and using 'lu' is the
portable fix.

This fixes:
	rkboottool.c:215: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’
2024-10-27 11:25:51 -04:00
Franklin Wei
5f4e0b6578 quake: Bail out of out-of-bounds draws
With this Quake should hopefully be able to run at native resolution
on smaller screens.

Change-Id: Ic30c8356eb2fd030a4cf84c54b63c9b688a9c14a
2024-10-27 10:49:23 -04:00
Amaury Pouly
9bd13865b7 imx233: make clkctrl code aware of hbus fractional divider
This is just to display the frequency correctly in the debug menu and prepare
for future use of said divider

Change-Id: Ib4c80ec71b3300bdf17edf6cc590229f7640d0f5
2024-10-27 10:46:28 -04:00
Franklin Wei
655d201cf3 quake: add a bunch more yield calls
Probably a bit too many, but good for making sound not skip.

Change-Id: I6657dcb4e8e7bb32c6550e2c5e3cee74d79b9ebe
2024-10-27 10:23:57 -04:00
Franklin Wei
54b3b6f797 quake: migrate to SDL_mixer and add background music
Kind of skippy and only supports WAV. MP3 would be nice, especially if
using Rockbox's codec.

Change-Id: I0bba195603da32da1e4d1dcf2ee821fa5696824a
2024-10-27 10:23:57 -04:00
Maxime Gauduin
f5d31fc1c4 Add desktop file for RockboxUtility
I am maintaining rbutil in the Arch Linux [community] repo.
There is an on-going effort to remove desktop files from our
PKGBUILD tarballs by either pushing them upstream or creating
them at build time. Relevant bug report:
https://bugs.archlinux.org/task/23387

Change-Id: Ic40cbfe92cf81e33b566ee39e0afea9c6c5d2754
2024-10-27 09:25:55 -04:00
Jean-Louis Biasini
fb93c99ce8 Fuze+: add pdbox plugin
1) Set the compiler to include pdbox
2) Set the keymaps

Change-Id: I75cf9b57ac977f7c727a28a3ed6883f65c5bbb20
2024-10-27 09:24:57 -04:00
Amaury Pouly
b8d35c042d rknanotools: fix rknano stages processing
Change-Id: Ia88f5aa2a6c56b312f80b31afab41d1dc68b871b
2024-10-27 09:12:31 -04:00
Amaury Pouly
d22bb548b2 rda5802: document some registers
This information is available in the RDA5802N or RDA5807 datasheet. I suspect
that register SYSCONFIG6 is not actually used by the tuner. Based on an
obscure statement in the datasheet, I guess SYSCONFIG5 is a frequency in Khz
called freq_direct that offsets the lower band frequency (56/67 MHz) but
1) it is not enabled (FREQ_MODE=0) and 2) it is not clear if this offset is
really just to avoid interference (ie the RF and IF are simply shifted by this
amount) or an actual offset.

Change-Id: Ia469f5370aee7c8c3390324d0cef1193c64df755
2024-10-27 09:10:15 -04:00
Amaury Pouly
977308c95c rda5802: rewrite detection routine
The current code relies on the initial value of some RDS register(which is
documented) but this assumption will be broken when we start enabling RDS.
This commit changes the code to really read the chip ID, although it is more
involved.

Change-Id: I0ed630322a94523612d2f0297dbcbea5f869eb6d
2024-10-27 09:10:08 -04:00
Amaury Pouly
d2dbd36db4 Add atj generator to headergen_v2
This requires a small change to support headers without supports macros. This
generates much simpler macros but disable more advanced macros such as BF_SET,
BF_WR and friends.

Change-Id: Icb5470c3f3e816e83335b4ecfa465be6c26be007
2024-10-27 09:07:59 -04:00
Solomon Peachy
9281ec2e42 Fix red in 3951fbf9d2
...Toshiba Gigabeat S is the only user of the ATA driver with UDMA>2

Change-Id: Ifb854da1c6a8ff1f696b908cc7c1f11d7d10be3f
2024-10-26 17:13:38 -04:00
Solomon Peachy
3951fbf9d2 ATA: Restrict to UDMA2 if we don't detect an "80-pin" cable
Change-Id: I55861065741f3365491445f1f3f5b0041f33e1c6
2024-10-26 15:09:10 -04:00
Solomon Peachy
aea4974b88 FS#13052: Update Italian translation (Alessio Lenzi)
Change-Id: Ica28186177e82b92f4d0f8f395161a16da9c7411
2024-10-26 13:00:43 -04:00
Christian Soffke
04a796fd15 playlist: create_control_unlocked: back up current playlist
When creating a new control file for the current playlist,
the existing file will now be renamed to serve as a backup,
until the next time the control file is replaced again,
allowing you to restore the previous state of the playlist,
in case you accidentally cleared it.

This also means that an entirely new file is created each
time, instead of truncating the existing one.

Change-Id: I2fd96eb8c3940b85df807fd7646dc0359a036351
2024-10-26 11:28:22 -04:00
Christian Soffke
7592d2ca5e playlist: deprecate PLAYLIST_COMMAND_CLEAR
In the following scenario, a garbage file name would
be written to the control file for the playing track
(resulting in a failure to resume correctly):

- "Keep Current Track When Replacing Playlist" option is set
- A track is playing that was not inserted but instead comes
  from a playlist file on disk
- User performs "Playing Next..." -> "Play" on some tracks, so
  that the current playlist is replaced (but leaving the playing
  track queued)
- User saves the playlist while queued track is still playing
  (the offer to remove queued tracks is declined)

The failure occurs because the pl_save_update_control function
assumes that the seek offset for queued files always points into
the control file. Meanwhile, the remove_all_tracks_unlocked
function adds the PLAYLIST_QUEUED flag indiscriminately, even if
a track comes from a playlist file instead of having been inserted.

Theoretically, this could be addressed by adding the playing
track's file name as a parameter to PLAYLIST_COMMAND_CLEAR,
which the track is then updated to point to, unless it
was already inserted (alternatively, we could seek within
the playlist file for such tracks).

Unless I'm missing something, it may be preferable, though, to
get rid of PLAYLIST_COMMAND_CLEAR completely, and instead have the
remove_all_tracks_unlocked function start over with a fresh
control file, into which we insert a single ('P' and) 'Q' command.

This seems to have several advantages:

- When resuming, we eliminate the need to parse and handle all of
  the outdated entries again that end up being cleared anyway
- It is ensured that the control file doesn't rely on the existence
  of a playlist file anymore after the playlist has been cleared
- We can reset the playlist's file name, which should make it less
  likely for the user to overwrite their previous (now unconnected)
  playlist that was still displayed in the Save dialog
- Unrelated bookmarks for the previous playlist aren't displayed
  anymore
- Improved consistency with existing behavior when the "Keep
  Current Track When Replacing Playlist" was disabled.

Change-Id: I41a89295bbac878807d65db9cf67b8a485daf0e5
2024-10-26 11:28:01 -04:00
Roman Artiukhin
cb1346b640 Ignore zero bytes between markers in built-in jpeg decoder
For consistency between built-in and imageviewer jpeg decoders.

Change-Id: I2aab5923ee096b99a7def49dcdc436b872823971
2024-10-23 21:17:35 -04:00
Roman Artiukhin
063b917f69 Codecs: wma: fix parsing album art
We can't assume that album art file starts right after album art type (apparently it can contain also additional info like filename).

Related to FS#12576 (album art is now shown)

Change-Id: I68c7a1dc536ff13a47fb73ea84539b2f7a44265b
2024-10-23 09:10:18 +03:00