1
0
Fork 0
forked from len0rd/rockbox
Commit graph

36988 commits

Author SHA1 Message Date
Aidan MacDonald
9d585cbc05 Fix red in f026cc4e17
Change-Id: I9ea1e18a8658a51bf0c917bec372f7509569ede2
2024-04-01 18:21:37 +01:00
Aidan MacDonald
f026cc4e17 tagcache: Add menu entry for customizing the DB path
Allow the database path to be set from the file browser's
"Set As" context menu, so it can be changed without editing
the .cfg file by hand.

Change-Id: Ie1a84bcb2084ee3b1a0a18cc51f564238515f164
2024-04-01 17:23:06 +01:00
Aidan MacDonald
ac1f92d9e8 tagcache: Fix missing void in tagcache_rebuild() definition
Change-Id: I04629547979a71f61693d87abb298b7c1d5efce4
2024-04-01 17:06:29 +01:00
Aidan MacDonald
89a6fc087d manual: Document database "Select directories to scan" option
Change-Id: I527f30df924fa2ca16684385ef805f05fc836a38
2024-04-01 17:06:29 +01:00
Roman Artiukhin
f5a852304b Sansa e200v2: bootloader: enable SD boot
Use rockbox_main.e200v2 for boot redirect

Max allowed size: 120860
Thumb build: 119579

Change-Id: I4683b1bdd247d41eaf4393b999db4ef5cd7a4010
2024-04-01 11:44:22 -04:00
Aidan MacDonald
cc210a7161 Fix red in c36d7768c5
Change-Id: Iadcfd322b32cf8523579c9e21a59928a621f15e1
2024-04-01 16:30:41 +01:00
Roman Artiukhin
c36d7768c5 Sansa e200v2: bootloader: fit size
Max allowed size: 120860
Old thumb build: 128494
New thumb build: 118514 (fits!)

Disabled:
Logo;
alpha blending capabilities for bitmaps;
Arm stack unwinder (backtrace);

Related forum discussion: https://forums.rockbox.org/index.php/topic,54768.0.html

Fixes FS#12380

Change-Id: I978720d795cb0ef5169103e467cf8386c21d8e93
2024-04-01 11:02:04 -04:00
William Wilgus
2570909e52 [Feature] Add root_realpath to Rockbox Info
Change-Id: I5a6bb78495a00960d0aa0f1a3fad227e4b8e17f3
2024-04-01 08:39:55 -05:00
William Wilgus
8e9a840d1d [Fix Yellow] 1dc22c7241 use path_append for setting directories is several settings
Change-Id: I30ee97f7f47d52c178de05bcabb62b65fcd9d784
2024-04-01 08:11:05 -04:00
William Wilgus
1dc22c7241 use path_append for setting directories is several settings
sprintf, strcpy, memccpy can all just go thru path_append
with the added benefit of some path sanitizing too

Change-Id: I33510b56a364b8b3a0b06f2ff14b76491f6e3870
2024-04-01 07:35:53 -04:00
Solomon Peachy
47784a777e FS#13403: Fix compilation error in scsitools
Change-Id: I2aa402d09a482d9f559dece13f1acf75a658c4da
2024-03-31 20:12:12 -04:00
Aidan MacDonald
e631fc4723 tree: handle trailing slashes in currdir when navigating up
Make ft_exit() ignore trailing slashes. Previously if these
ended up in "currdir" then pressing the back button would just
leave you in the same directory.

Change-Id: Ic539e02a9860fa13ca3235beaf99bb474c66e151
2024-03-31 18:45:40 +01:00
Aidan MacDonald
856e3d548b Fix red in dc9d354ed2
Change-Id: Ic6639e85c42f7ebf435ebad2740e921b7b932ead
2024-03-31 18:20:24 +01:00
Aidan MacDonald
dc9d354ed2 multiboot: Add v1 boot protocol
v1 passes the drive and partition number of the boot volume
instead of using the volume number. The volume number isn't
reliable because the same filesystem might get a different
volume number once the firmware is loaded, which will cause
the firmware to use the wrong root volume and fail to locate
the correct .rockbox directory.

Using drive and partition numbers avoids this issue because
drive numbering is fixed and determined by the target.

Change-Id: I7e68b892d9424a1f686197a6122e139b438e5f7e
2024-03-31 16:57:19 +01:00
Aidan MacDonald
6ffd42548b multiboot: Refactor boot data validation, add version numbers
Instead of verifying the CRC before every access of the boot data,
verify the CRC once at startup and set a flag to indicate the boot
data is valid.

Also add a framework to support multiple boot protocol versions.
Firmware declares the maximum supported protocol version using a
version byte in the boot data header. The bootloader chooses the
highest version supported by it and the firmware when deciding
what boot protocol to use.

Change-Id: I810194625dc0833f026d2a23b8d64ed467fa6aca
2024-03-31 16:57:19 +01:00
Aidan MacDonald
af644e02a1 Fix red in 5fd5f56cac
Change-Id: Icbc6e234a2fcdd7c8e0cdd0562f49fcbdf52480b
2024-03-31 16:57:19 +01:00
Aidan MacDonald
5fd5f56cac Disable unused LCD scroll functions in bootloaders
These functions just reset some state related to the scroll engine,
which is already disabled for bootloaders. They get called from the
LCD code and compiled into the binary, but have no real effect when
the rest of the scroll engine is not present. Replacing the calls
with inline stubs gets rid of this dead code from bootloaders.

Change-Id: I12a6d8926e19477ae3a5913e7fc8aff41cecd970
2024-03-31 11:36:16 -04:00
Aidan MacDonald
b0a8cacd1d rolo: simplify parsing scramble header in load_firmware()
The standard load_firmware() function is used on targets which
use the "scramble -add" method for generating Rockbox binaries.

While it tries to be a bit more generic and allows the CRC/data
offsets to be placed anywhere in the file, there are no targets
which actually need this flexibility, because they are all using
plain old "scramble -add".

So we can actually simplify load_firmware() and remove defines
from the target headers. All the targets used CRC offset = 0 and
data offset = 8, except for a few which I assume never supported
ROLO or were never tested -- eg. samsungyh820: the CRC and data
offsets cannot both be 0.

The actual motivation for this is removing the calls to lseek(),
which can help make bootloaders a tiny bit smaller, as lseek is
typically not used anywhere else in bootloaders.

Change-Id: Ic2d01e5b75a32e88363f085e3e839146a0710bf4
2024-03-31 11:24:07 -04:00
Aidan MacDonald
7dc8d754a2 Disable legacy codepage handling in bootloaders
Turn off legacy codepage handling in the filesystem code for
bootloaders, and support ISO-8859-1 (Latin-1) only.

This only affects DOS 8.3 filename parsing when FAT32 long
names are unavailable; long names are Unicode and can always
be decoded properly regardless of this setting.

In reality, bootloaders never supported codepages other than
Latin-1 in the first place. They did contain the code to load
codepages from disk, but had no way to actually change the
codepage away from Latin-1.

Compiling out this useless codepage handling code frees up
precious space for very size-constrained bootloaders like the
Sansa e200v2.

Change-Id: I26b049dd648fed4a0cc61fa938faa84e9816ab7d
2024-03-31 11:07:08 -04:00
William Wilgus
4f652b49ae clipzip clean up lcd driver a bit
consolidate some of the lcd cmd / data calls

Change-Id: I2e2ccc7833806f7bf931138a04c48aa55ef4a13d
2024-03-31 01:25:16 -04:00
Aidan MacDonald
8bdf08cd2d Sansa e200v2: Enable thumb for bootloader by default
Thumb bootloaders were confirmed to work in this post:

https://forums.rockbox.org/index.php/topic,54768.msg253473.html#msg253473

Change-Id: Id52769b9b6a2acc167503fa61aec665f4090fdc1
2024-03-30 11:58:40 -04:00
Aidan MacDonald
9f3d83d03f tools: update shebang in thumb-cc.py
Some distros, including Ubuntu/Debian, don't provide a "python"
command unless an additional package is installed. Using "python3"
explicitly should work everywhere.

Using "/usr/bin/env" respects the user's PATH, so they can choose
a specific Python version instead of forcing the systemwide copy.

Change-Id: I02e3ead92939c42df6def79dec3dc2a62c62b1c3
2024-03-30 11:58:40 -04:00
William Wilgus
fe00906abb pathfuncs.c add path_strip_leading_separators()
added to path_append as well

Change-Id: Ieb6ec4f4c475ca5e60c8246c7f044bcc7651f6bf
2024-03-30 11:01:53 -04:00
Roman Artiukhin
777098fca9 usb: fix usb_storage_disconnect shouldn't call core_free for static buffer
Fixes Sansa e200v2 bootloader doesn't boot after 3301c5a

Change-Id: I8f4780961203beb18863f5d2b1f1e61857c4fe27
2024-03-30 09:10:45 +02:00
William Wilgus
52e22b253d [Bugfix] ft_assemble_path extra slashes, Volume unmound double free
Change-Id: Ie2e7702d8e252ce29af0b9dbd2e8d9e892b9ca18
2024-03-29 10:27:03 -04:00
Roman Artiukhin
19f21a2b3f Codecs: mp4: Enable FAAD_STATIC_ALLOC
Allocates several SBR + PS arrays and variables statically
Prevents out of memory exceptions for long audiobooks

Note from original commit a602f46d why it was disabled:
For now malloc is not fully removed but used by a few arrays needed for AAC-HE SBR+PS only. Reason to keep malloc is to have this amount of memory available for AAC-LC files which might require large m4a tables.

But now with "shrinkable" seek table 2c6dfd06 it's no longer a critical issue for aac-lc files (we just load less seek entries) but might be critical for aac-he files.

Fixes issue described here https://www.rockbox.org/tracker/task/13049#comment44587

Change-Id: Id9c20bad4c46034299a2a4de95d41c807b3af412
2024-03-28 08:25:02 -04:00
Roman Artiukhin
6e058fe77f platform: hiby: Increase CODEC_SIZE to 1 Mb
Unifies codec size with most targets.

Apart from other things increased size improves seek accuracy in long m4b audiobooks.

Tested on Agptek Rocker and XDuoo X3II

Related discussion: https://www.rockbox.org/tracker/task/13049#comment44591

Change-Id: Id246969e78386b71ac66aace128cfba72a3f209e
2024-03-26 02:31:48 -05:00
Christian Soffke
53e7176196 dircache: don't unpin invalid buflib handle when building volumes
Buflib pinning was introduced here in 1718cf5.

If the device has to immediately shut down after booting
because of a low battery, the directory cache may be disabled
by the time core_unpin() is reached.

Its handle will have been reset to 0 in that case, triggering
a panic message due to an invalid buflib handle.

Change-Id: Ie34c3f7142d8406b66277ef185bc9ecf387d7295
2024-03-24 13:22:09 -04:00
William Wilgus
34361c82f1 [BugFix] Database Track>Filename returned Directory Attribute
Navigating to track listing by Filename in the database
passed the whole directory to the playlist and track info plugin
insead of the track filename

this was due to 'tag_virt_basename' not being recognized as a valid
audio file

Change-Id: I3d1cd0b6998a2e55d4f7d70711af9ced46cf2c44
2024-03-24 11:19:41 -04:00
Solomon Peachy
c00dff157c ....Fix the fix, properly.
Change-Id: I3349f0c039834e40ddbaebd13da664fa5c5b1bd9
2024-03-23 21:46:51 -04:00
Solomon Peachy
57f76784c5 Fix build for hosted targets.
Basically the namespace code _never_ actually linked properly on hosted
targets, but nobody noticed as there were no users, causing the symbols
to be dropped with no fuss.

The tagcache namespace awareness stuff pulled in the namespace code,
which made things go kaboom due to it relying on native FAT parsing
code.

Change-Id: Idef5f44b026c875022436809ca1f5015eece714a
2024-03-23 19:59:31 -04:00
William Wilgus
fa54e218ff Multiboot Database duplicate files -- Fix Yellow
Change-Id: Iccfbf6988dba49d58ec9c56dd8b453e6f3a62bf4
2024-03-23 10:37:39 -04:00
William Wilgus
fdc3668a6a [BugFix] Multiboot Database duplicate files
When the sd card is mounted into the root namespace the database
picks up files through both paths

previously we hid the mounted drive but this causes issues with users
databases when the drive letter changes

Adds a way to keep track of volumes mounted in the root namespace

Hides the enumerated volume in root

Database:
we can just parse the root directory ('/') and get to any mounted
volume but we can also enumerate a volume in the root directory
when this occurs it leads to multiple entries since the files can
be reached through multiple paths ex, /Foo could also be /SD1/Foo
Instead we will attempt to rewrite the root with any non-hidden volumes
failing that just leave the paths alone

Change-Id: I7bdba8cfaf63902d2a3852d28484bcf8ca317ebd
2024-03-23 01:03:33 -04:00
Solomon Peachy
ae01ea7fd9 FS#13404: Updated Polish translation (Adam Rak)
Change-Id: If23726baf2dd9549f89df5344f44ff29d55d8b5b
2024-02-23 16:05:34 -05:00
Solomon Peachy
386b6d6bae dbtool: Make the dbtool marginally more user friendly.
* Inform you what target it is compiled for
 * Complain if it doesn't find the '.rockbox' directory
   (Instead of creating the directory if it's not found!)
 * Report basic (starting/finished) progress

Change-Id: Ic336dd686ce4419172a1c287995966d0f00e6107
2024-02-20 14:38:49 -05:00
Roman Artiukhin
e122243bb0 plugins: playing time: fix possible crash on sys event
Change-Id: I7b3580c56e2b285f56b9e2195fbf3c14b6cd96e5
2024-02-03 16:01:22 +02:00
Roman Artiukhin
76ec55cc49 Remove ATRAC3 specific fields (channels, extradata_size) from mp3entry
Also fixes typo of using never initialized id3->channels in wav metadata (introduced in 2d1937a1)

Change-Id: I28cddec2b9d9bd1e756ffaa004b4f6e8528a7566
2024-02-02 09:36:53 -05:00
Roman Artiukhin
be16edc94b Codecs: mpa: Use both time and offset when resuming files
The supplied time may be more accurate than the calculated time from the bitrate (can be quite inaccurate for long vbr files and even for cbr due to padding)

Change-Id: I1f8291eab45fbd91a161b51776c391a0f7886a5c
2024-01-24 18:19:33 +02:00
Roman Artiukhin
1122cae028 Codecs: mpa: Improve seek in large mp3 vbr files
Use current position as toc mark and use it if it gives better accuracy.

Continuation of 3883c978

Change-Id: Ic6e8192fc43061f3c07128486dbefba7382be5ce
2024-01-24 12:35:07 +02:00
JJ Style
49910eca4b Implement dart scorer plugin application.
Edit:
    - Add name to credits
    - Add entry in manual

Change-Id: I0e0b062e001ae9134db3ee6e4fba21e93ddd04ee
2024-01-23 22:32:22 -05:00
Roman Artiukhin
d50470bc7d Codecs: aac: Improve ADTS stream detection
Captured ADTS streams might start from some garbage data from previous frame. We should check for sync errors even for first frame.

Change-Id: I70171298b79713aeedf9fa2e6098a03063487649
2024-01-21 20:08:04 -05:00
Christian Soffke
fd12225861 plugins: alarmclock: fix input lag
Change-Id: I6e2e9723aea511eef32116c92105822cc8a16271
2024-01-12 13:15:49 -05:00
Roman Artiukhin
3080892d21 Codecs: mp4: Re-Fix loading tracks with metadata at the end of file
first_frame_offset is not set for mp4 files so seeking to it doesn't make any sense. It can lead only to additional re-buffer request. So instead let's just allow seek back for m4a_check_sample_offset check. And do seek_buffer(0) before reading metadata (fixes possible hang introduced in fc65bdab)

Change-Id: Ia7fae14b0137d73b5e263390be5f143deb7ca789
2024-01-12 18:30:30 +02:00
Christian Soffke
de16065265 plugins: disktidy: fix loading of filetypes to clean
regression introduced in 1648441

Change-Id: I7e7c07128bf47ca862b4d45b362e7723846163a7
2024-01-07 07:01:13 +01:00
roman.artiukhin
ed27dac432 Fix CODEC_AAC_SBR_DEC check with undefined CONFIG_CPU
Define CONFIG_CPU if not defined

This fix makes sure that  AAC-LC decoding is used both on device and simulator.
It's important for testing purposes as proper AAC-LC decoding requires changes both in decoder and in metadata handling.

Fixup for 4cd65b9d9.

Change-Id: Idef88825458761fffa3f5c5f4f221b555c509d89
2024-01-02 10:05:17 -05:00
Dana Conrad
8cc7476735 ErosQ Native ES9018K2M: Add digital filters capability
Setting not yet hidden for older hardware revision.

Change-Id: Iaaa5727e63c38de578a6bbc73498ae1073180e65
2024-01-02 08:19:23 -05:00
Dana Conrad
a3fe07ff12 ErosQ New Revision HW volume
Add HW volume control via ES9018K2M, and reorganize
eros_qn_codec.c/.h, audiohw-erosqnative.c.

This automatically detects the presence of the new DAC and
uses its hardware volume scaling. If not present, use same
SWVOL we have been using so far.

Add debug menu readout of SWVOL/I2C result.

Break out es9018k2m stuff into its own file so that
maybe it can be useful to other ports.

Note that we may need to get smarter about detecting the DAC
type if/when another model emerges.

Change-Id: I586a1cf7f150dd6b4e221157859825952840af56
2024-01-02 06:51:07 -05:00
Solomon Peachy
161c861153 Fix red in 4cd65b9d9
Change-Id: Ic3f136f5c88c46da68b78bc21ddefdf9fdbf2745
2023-12-31 21:30:18 -05:00
roman.artiukhin
4cd65b9d97 Codecs: mp4: Disable SBR decoding for PP5002 - PP5022 platforms
Includes ipod video (5G) and earlier models, sansa c200 and others players not capable to decode AAC-HE.

Allows to play backward compatible files as AAC-LC.

Change-Id: Ic9f5c0f255d9a4308c3414d402f8f27f4328ca94
2023-12-31 20:44:15 -05:00
roman.artiukhin
fc65bdab4e Codecs: mp4: Fix loading tracks with metadata at the end of file
Fixes FS#13402

Change-Id: Iafb21787e8f042e913c86b249bb2552cfdf4f4a8
2023-12-23 14:35:56 -05:00