1
0
Fork 0
forked from len0rd/rockbox
Commit graph

17578 commits

Author SHA1 Message Date
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
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
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
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
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
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
7912bf3bee Fix prev/next folder action leads to immediate ff/rewind
Removed check that was introduced in 54e6bafa. This check doesn't work in WPS as BUTTON_NONE actions come while you still have button pressed. I believe the proper fix for this is already commited in c354e0bd.

Fixes FS#13370

Change-Id: I86e92c296c0bfa42caaed9cb3540e311630daf9c
2024-10-22 16:28:22 +03:00
Roman Artiukhin
c354e0bd1f buttons: Don't set wait_for_release for release action
Fixes ignored button press in yes/no screen.
It depends on keymapping - this issue happens if action before wait_for_release is mapped on release action. Something like:
{ ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }

Change-Id: Idc6a57ef7a7daf75c21c9887e07fbefc814b6ae3
2024-10-22 06:52:28 -04:00
Solomon Peachy
5a3d62dabb Translation updates
- chinese-simp: 王吉
 - deustch:      Wilfried Winkler
 - english-us:   Solomon Peachy
 - korean:       Hoseok Seo
 - polish:       Adam Rak

Change-Id: I116ec67161d59293824aa579eba8a6912c06d45a
2024-10-22 06:48:35 -04:00
Christian Soffke
8c1c8597ac plugins: playing time: OBOE
Change-Id: I1c6b73e06ac615db6e764aa54f042ec4e2dee3a2
2024-10-18 06:55:15 +02:00
Solomon Peachy
ac46684d7f janitorial: Use ATTRIBUTE_PRINTF(X,Y) instead of __attribute__((format(printf,X,Y)))
Change-Id: Ia66e7647bdd9e8e1c28b9d8636cae8db82825841
2024-10-17 21:39:41 -04:00
Hinrik Örn Sigurðsson
5c2de0b89c FS#11361: Add string "Disc" for multidisc albums in WPS (Hinrik Örn Sigurðsson)
Change-Id: I8fb6b107242558aadf0fda32f4ad42b16a893b43
2024-10-17 20:35:49 -04:00
Solomon Peachy
563da70139 ipod6g: Reworking the bespoke ATA driver
ipod6g was configured with SECTOR_SIZE of 4096, but this ATA driver
unconditionally translated these to 512B operations on the actual
storage device.

Rockbox's storage layer already has robust support for "logical sectors
larger than physical storage sectors" through use of
MAX_LOG_SECTOR_SIZE.  So switch to that mechanism, allowing the ipod6g
ATA driver to be simplified.

If we want to support drives with physical sector sizes > 512B, then
we need to port the MAX_PHYS_SECTOR_SIZE logic from the primary ATA driver.

Additional changes:

 * Simplify MWDMA/UDMA selection logic
 * Report CE-ATA mode in debug menu
 * Use LBA48 commands only if drive is over 128GiB.
 * Drop default sleep/poweroff time from 20s to 7s (matching main ATA driver)

Finally, the bulk of the changes are the first phase of a badly needed
style cleanup that made reading this driver a lot harder than it should
be. I intend to split this into a separate patch.

Change-Id: I2feca9fd319c8d6cfb3c2610208970428d2fa947
2024-10-17 20:30:37 -04:00
neofright
9efed5542e Add reset EQ menu option
Change-Id: Ia555359263a42545abe3f1039d7933204be02f6d
2024-10-16 17:20:27 +01:00
Solomon Peachy
9b1a92fe36 Fix up a pile of bad format strings passed into simplelist_addline()
Change-Id: Ic45ea8633a1752b2e01cba2aace55309bcb7480d
2024-10-15 19:13:17 -04:00
Solomon Peachy
a2efbf0589 list: Flag simplelist_addline() as accepting format specifiers
And fix up all the problems I've found so far.

...This will undoubtedly introduce a pile of new warnings.

Change-Id: I868de507a0e9790f289676c198e2977c26755f22
2024-10-15 18:50:35 -04:00
Solomon Peachy
d3b7eba405 debug: Correct formatting when displaying drive size.
Change-Id: I95e9a257dcad548ec4378d01c0f9b4370ebf5318
2024-10-15 18:25:28 -04:00
Solomon Peachy
1ece63d054 debug: Log our logical sector multiplier, if enabled.
Change-Id: I077c0a88d8a51d909ff1df1ca79d95c884ba324a
2024-10-15 11:59:35 -04:00
Roman Artiukhin
37652c5e2b imageviewer: jpeg: Fix grayscsale mode with no dithering show black screen
Change-Id: Ib29e3577c59db8e98db1dd5b8e28874a4fbef20f
2024-10-15 17:46:47 +03:00
Christian Soffke
ef19fa4408 plugin load / tagtree retrieval: eliminate storage_disk_is_active check
Since commit e0df995 storage_disk_is_active may be 0
even if there is no disk that needs to be spun up or
device to power on, so it doesn't really make sense
to check for it, anymore, in order to decide whether
to display the loading indicator.

For remaining devices with spinning disks, the noise
or vibration of the disk spinning up may serve as a
sufficient signal when loading a plugin, that the
device isn't frozen. Plus, for the tagtree, search
progress is displayed after 0.5s anyway.

Change-Id: I5791725e2388d7113818a358204968d8a4e6f843
2024-10-14 09:27:26 -04:00
Roman Artiukhin
b8238f7b20 imageviewer: Initial support for JPEG progressive images. Add decoder
Added jpeg decoder jpegp.c using RAINBOW lib. Currently enabled only for pictures not supported by old decoder (as old decoder more optimized for low mem targets)

Someone TODO:
 * Old decoder has optimized downscale logic which new decoder doesn't have (it gives big difference in required memory and time for decoding). This logic should be ported/adapted if possible.

 * Add smooth downscaling.

 * Grayscale support

Change-Id: Ie96bc62848b51cc6a3942f8e069ec6ab02dc1c56
2024-10-14 09:19:34 -04:00
Roman Artiukhin
64ad7354b6 imageviewer: Initial support for JPEG progressive images. Add lib sources
Added unmodified files from RAINBOW library by Attila Tarpai
Full sources:
https://github.com/Halicery/vc_rainbow

Change-Id: I356486b6a332aa3f610ddcae57f8a2044653b051
2024-10-14 09:19:34 -04:00
Solomon Peachy
62d6c7ecaa pdbox: Silence a spurious warning with GCC9 on hosted ARM
(pdbox seems to trigger a lot of false warnings...)

Change-Id: Ia24aa7ece4d6389dbdb36b30729a9372f872b034
2024-10-12 12:26:22 -04:00
Solomon Peachy
41abd8e32f sdlapp: Fix build with SDL2
Not sure why this didn't break in my earlier tests.

Change-Id: Idf643c7ace638d928d41606cec1b90762bc4909e
2024-10-07 12:36:44 -04:00
Christian Soffke
8808c42d6d Fix FS#13494
Change-Id: Ie306418431eb412dac00907eb2f59999d8b4dfb0
2024-10-03 14:03:29 +02:00
Christian Soffke
0cb0cb486f tagtree: remove superfluous code from insert_all_playlist
Code has no effect since commit a0e95c8.
Functionality is now handled by the playlist_insert_context_add function

Change-Id: Ie91f605bd7a7d03556fa70d195a06bc55866741d
2024-09-29 17:37:18 +02:00
William Wilgus
f09693b0be [Feature/BugFix] Dirplay never gets the file I selected
If you have say 1000 playlist entries and select the 1001 song in the directory
dirplay loads tracks 1-1000 shuffles them and track 1001 is never heard from again

Instead start at the file and loop through the directory mod dir len

Change-Id: Ieded5decdc1f7c44b1be8491dbd4f359ae21f79a
Hint: this is a good way to not wait on dirplay to load a ton of tracks
2024-09-26 03:29:15 -04:00
William Wilgus
f55cb77f89 [Bugfix] FS#13492 - Playback resume fails after USB insert
On usb plug system_flush() gets called before the other
threads get a chance to ACK the insert

system_flush() calls playlist_shutdown() (amongst other things)
playlist_shutdown closes the control file

the audio thread acks USB insert
audio_stop_playback is called which now can't look up the
filename from the now closed handle for control the control file

I left the guard for checking for USB insert but it appears to be
fine without it

Change-Id: I935dbf7aed38d4a57413c0063ad953f427e9b3bb
2024-09-26 01:34:56 -04:00
William Wilgus
e6313e4b8e tree.c remove strlcat in favor of strmemccpy
moved a conditional for reload_dir vs strcmp

Change-Id: I1635014fbbc6b9b0905abc3f9c60bbd2a1d08762
2024-09-26 00:38:54 -04:00
Solomon Peachy
9ebfb3fa5c FS#13493: Updated German translation (Wilfried Winkler)
Change-Id: Ib048b82438e81b9cd0a3bcab7f60b5c0556ad13e
2024-09-25 18:08:06 -04:00
William Wilgus
9af325a541 [BugFix] tagcache_search() must be closed with tagcache_search_finish()
fix a couple of places where this could be left open

Change-Id: I43ac7d6b26d728c11f96e5415710341d60f07ab8
2024-09-25 01:33:47 -04:00
William Wilgus
a0e95c888d [Feature/Bugfix] Tagtree use insert context to speed up adding tracks to playlist
I forgot we had duplicated code between playlist.c and tagtree.c this saves
a bit of space and should speed up adding tracks a bit

further I noticed a buf here where there was the potential to return without closing
the opened track search

Change-Id: I15ed8447fc4fe13de5bfeb9fbb59b151e2fbf36a
2024-09-25 01:03:11 -04:00
William Wilgus
ffebb9e244 [Bugfix] Enable Progressive loading for talk clips on devices <= 8MB
our voiceclips are getting in the way of allocs for the tree
on these devices

Change-Id: I556400359df22a2643e6ee3f9a161bc364841002
2024-09-25 00:54:10 -04:00
William Wilgus
f0c208554c [BugFix] Playback.c OOM with large voice file
with our large voice file being loaded in its entirety to the buffer
there isn't enough room to allocate the required pcm buffer
well prior to this patch we looked for 1k free to allow the talk buffer
to be given away
well the pcm buffer expects something like 5-600 kb on the clipzip
and there is 1k allocatable but not 300 more

so instead get the required pcm buffer size and check against that

Change-Id: I40a056e4170c37bc3429f0cb37af221ae7f812e5
2024-09-24 10:47:34 -04:00
Solomon Peachy
77ff799502 lang: Delete two completely redundant strings
Change-Id: Icedae2687688b8d042c9d9ca232b566ff8f65531
2024-09-22 16:44:08 -04:00
Solomon Peachy
6ed8b9091c Misc: Compiling under SDL2 uncovered a few issues unrelated to SDL itself
Change-Id: I625d5dd02d3f70bc6484a8641eafdaf13812f4a7
2024-09-21 16:32:58 -04:00
Solomon Peachy
9a714939e8 features: Add 'sd_storage' if the device uses SD cards
Change-Id: Ied3ca34ef497cf0eeb7db6d0f948e43ebd25359e
2024-09-21 10:48:24 -04:00
Solomon Peachy
c71b6265b0 Fix a mechanical error in the Simplified Chinese translation
Change-Id: Ibdd4b948ec8e2e6d761362e465a7117ef74e1520
2024-09-17 11:09:41 -04:00
Solomon Peachy
e09c055a41 lang: Replace all <...> with [...]
<..> gets interpreted as a drive/volume ID, which has special voicing rules.

(this is especially visible in the DB browser)

Change-Id: I7c2598004a4e58451267d77f786eb52f7c09bd3f
2024-09-17 10:21:46 -04:00
Solomon Peachy
7d9fbae749 Minor mechanical updates to the Russian translation
...This should be sufficient to push it to 100%

Change-Id: I6b884725a7d3823c66742856cd7e581880d0830e
2024-09-16 08:27:42 -04:00