1
0
Fork 0
forked from len0rd/rockbox
Commit graph

5110 commits

Author SHA1 Message Date
Solomon Peachy
87ef6bb9e1 hosted: Don't unconditionally pull in mv.h on hosted environments
It causes some conflicts in plugins with the upcoming 64-bit storage enablement

Change-Id: Ia8615c5266c2b29216a05a8d85c3da5186c98d1c
2024-07-19 18:42:11 -04:00
Solomon Peachy
942e013eac pp5020: Cache the result of the is_ssd check.
...So we don't look it up on every write.

Change-Id: I85b0abe5032a60588535b401cc719661601807ee
2024-07-16 17:35:53 -04:00
Solomon Peachy
27a0cda6ac PP5020: Unconditionally use stock PIO timings
The SSD detection heuristic is flawed, and when it fails
(due to very crappy CF->SD adapters) we end up corrupting things.

So let's give up a slight amount of performance on the original hard
drives (which are aging out anyway) in favor of guaranteeing safety.

Change-Id: Id92583a6b9ae6ec543b91b3e0f8f28b57ac38cb0
2024-07-16 17:35:53 -04:00
Solomon Peachy
9c53fa1b0a pp5020: It's okay to use DMA reads on non-SSDs
Fixes a regression introduced in 4b423e21f6

Change-Id: Ief4a4a562840524b98ad5988999bac87586dec41
2024-07-16 13:37:14 -04:00
Solomon Peachy
c51a9821e7 rk27xx: Fix simulator errors brought upon by HAVE_MULTIDRIVE but not HAVE_HOTSWAP
Change-Id: I0171d01dfffbb936e8041c0e2fc5207c620ddce3
2024-07-07 16:02:38 -04:00
Solomon Peachy
5a2bd580cd Hopefully fix the last of the stragglers.
* xDuoo X3 fix some warnings due to an incorrect #ifdef
 * stub storage_removeable() and storage_present() for non-HOTSWAP builds
 * sim_trigger_external() is gated by HOTSWAP, not MULTIDRIVE

Change-Id: I38f14fdfeba13957899c378051d49afc2e8245e5
2024-07-07 15:13:53 -04:00
Solomon Peachy
1528b44349 More red fixes
Change-Id: If22cdb286edac47b08b158bee6910ba7a539b041
2024-07-07 14:47:07 -04:00
Solomon Peachy
f37b5a8349 Fix the remaining red in red from ea80d1cc9ca
Notably:

  * double-paste in ihifi760 config.h
  * jz4740 ATA & SD drivers used MULTIVOLUME instead of MULTIDRIVE
  * Simulators implicitly rely on HAVE_HOTSWAP

Change-Id: I44fc7f98f0f6df366f016567c330f87e9f3ca6a6
2024-07-07 12:29:19 -04:00
Solomon Peachy
181fe7530a Fix most of the (extensive) red in ea80d1cc9ca
Change-Id: Ie494df80caa222423a52977031920d54bd058c3c
2024-07-07 12:05:18 -04:00
Solomon Peachy
80b9127727 Revert "jx47xx: Rename crt0 'init' sections to 'startup'"
This reverts commit 83bb89d0b8.

...It breaks the jz47xx bootloaders.
2024-07-03 16:51:58 -04:00
Solomon Peachy
e55618d07a hosted: Minor corrections to the linux framebuffer driver.
* Query variable info _before_ mmaping the framebuffer
 * Sanity-check the resolution/bitdepth, and if it doens't match
   try to set it to what we want.

This is functionally a no-op.

Change-Id: I087ff81775d8f63bf7846b7fef19f6fc36c1cc84
2024-07-01 09:51:50 -04:00
Solomon Peachy
5f26f21ab2 samsungypr0/1: Minor improvements to framebuffer driver.
* Distinct error codes for all failures
 * Corrected some comments and error messages

The ypr0/r1 target should be switched over to the generic lcd-linuxfb
driver, but that will come later.

Change-Id: Idc3867a96db7e431847473708712f88dd2725a96
2024-07-01 09:50:33 -04:00
Vencislav Atanasov
4691152f92 Add SysCfg viewer for iPod 6G in the debug menu
Change-Id: I4e142f40777c7f8ae58f2b46fc6a3ec4f12aa530
2024-06-24 21:00:25 -04:00
William Wilgus
c6473f4e7f [Fix Yellow] imx233_debug fix yellow
Change-Id: I2d04340a8383edd03350045085188d2191e41526
2024-06-05 20:03:02 -04:00
William Wilgus
c96d728d81 [coverity] debug-imx233.c dbg_hw_info_audio() use strlcat, fix snprintf call
technically this isn't currently causing any issue but
coverity correctly identified the potential for buffer ovfl

Change-Id: I4af462c9860c44f22d05b5b2b4c685364823d395
2024-06-05 19:16:07 -04:00
William Wilgus
74552d5404 [coverity] RFC ata-imx31.c UDMA mode timing tables out of bounds reads
mode only goes 0-4 the original commit mixed up the index and mode
bad stuff must happen but its been here for 16 years

Change-Id: I7e69f4e2574029a6bc3cea76e8803d2d0357d9e2
2024-06-05 19:00:15 -04:00
Roman Artiukhin
2109d524e8 samsung yp-r0: Fix displaying non-Latin filenames on SD card
Supply iocharset=utf8 mount option. Otherwise, cyrillic symbols appear as question marks.

Change-Id: Ibf40a15ff429cfe2bf6e7970330870505e2470b7
2024-06-04 19:29:19 -04:00
William Wilgus
82dcf32736 [BugFix] headphone should be removed on first toggle
Change-Id: I10a77f210896a9ec317f9cbc7de21dccabafe426
2024-06-02 17:09:24 -04:00
William Wilgus
aca41be3ca [Feature] Simulator add headphone and lineout toggling
Change-Id: I0b019414643e5c9037c0128093488da49e1a4c0d
2024-05-30 12:12:29 -04:00
Aidan MacDonald
e37cd0f2f5 x1000: Enable NOCROSSREFS_TO()
Start enforcing the correctness of references to the .init section.

Change-Id: I507891a25be9cccff4cf8ec13fdc799b73c75176
2024-05-08 22:14:10 -04:00
Solomon Peachy
1957237a46 Fix red in 8c86fb6da0 (ipod5g only)
Change-Id: Idf6a488728b0187779bc4a9232c7e7e9400afeec
2024-05-08 22:03:59 -04:00
Solomon Peachy
8c86fb6da0 arm: Use -masm-syntax-unified when compiling with gcc8 or newer
Annoyingly, this makes all of the '.S' files we compile get treated as
divided syntax, so we need to make the syntax in them explicit.

Change-Id: I56a3916b7b24c84a1214a5d6bc4ed4d651f002cf
2024-05-08 21:45:42 -04:00
William Wilgus
efcea66280 Revert "readdir_r use in tagcache.check_dir, ft_load"
This reverts commit 0c737d3b2e.

Reason for revert: Not really a concern as open_stream returns an independent buffer since g#566

Change-Id: Idbd2f4a7cc2ea6362b7714629469eeb7b3d19b3b
2024-05-02 13:38:32 -04:00
William Wilgus
0c737d3b2e readdir_r use in tagcache.check_dir, ft_load
Change-Id: Ibcde39ed247e100dd47ae877fb2a3625bbb38d8b
2024-05-02 09:33:29 -04:00
Solomon Peachy
aa7357861a ipod6g: Issue a FLUSH_CACHE[_EXT] command if device can't sleep.
Additionally, synchronize with the standard ATA driver's feature table

 * Acoustic management set to quietest
 * Set power mode to lowest w/o standby

Change-Id: I12e64354d4c946228e9a55fc8da2114127d08d28
2024-04-26 07:28:01 -04:00
Solomon Peachy
2905ba2f72 ipod6g: ata: Don't power down devices that can't handle it
...by checking to see if the mandatory ATA PM feature flag is set

The common CF->SD adapters don't report this.

TODO:  When PM is not available, issue a CMD_FLUSH[_EXT] instead?

Change-Id: If9200bd3c03a984376203aeea4fbe11e230a9b4d
2024-04-22 15:47:10 -04:00
Solomon Peachy
4b423e21f6 pp5020: Use DMA Writes by default for SSDs
It is likely that these things accept data far faster than the spinning
rust drives ever would, and while there is a question about PIO timings,
DMA timings seem to be solid.

Change-Id: I70644e0ad85a6ed429c8704e66ca7af91d78765c
2024-04-22 15:46:50 -04:00
William Wilgus
b57536db8d [BugFix] Hosted incoming directory component leading slashes #2
Fix the rest..

Change-Id: Ie551772a073cba3eb6de176cd73a59d419057183
2024-04-07 16:46:02 -04:00
William Wilgus
d1f14c7b46 [BugFix] Hosted incoming directory component leading slashes
leading slashes in directory components to path_append
makes a path with a leading slash absolute and discards
the basepath

Change-Id: I65253080c0ca4278b559894104ab25ab199a3100
2024-04-07 14:13:21 -04:00
Solomon Peachy
75ad7c9792 Remove duplicate 'const' declaration in percent_to_volt_charge[]
Affetcs many hosted targets; probably was a typo that was copy-pasted
everywhere else.

Change-Id: Ifbb31e7ff1fce4874fa0f3c108db59f152e2f927
2024-04-06 21:26:53 -04: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
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
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
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
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
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
Aidan MacDonald
857267e9df x1000: Support GD5F1GQ5xExx NAND chips
This is basically identical to the GD5F1GQ4xExx series, except for
the addition of double-data-rate transfer modes (which are useless
for us). These devices may be found in some Surfans F20s.

Change-Id: I2c04c86bd88f2e27d813de7fe01712ce365ba077
2023-11-30 21:46:56 +00:00
Solomon Peachy
57713f6308 ipod: Support IAP remote MENU/SELECT/UP/DOWN keys in MODE2
Only the primary contexts (standard, wps, quckscreen, tree, radio)
handle the new keys so far.

Todo contexts:  Settings, keyboard, pitchscreen, bookmark, & recording.

Available docs for MODE4 don't list anything other than playback
controls, so it's not clear if there is a path forward here.

Change-Id: I91908092f75d96813e2e155e447129ba15f58051
2023-10-06 11:31:59 -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
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
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
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
Dana Conrad
66519000f4 ErosQNative: Enable Line Out capabilities on new revision players
The newer players have some changed hardware, but most importantly
the line out now appears to be routed through the stereo switch
instead of being hardwired directly off the DAC.

Disable muting the headphone amp, enable switching the stereo switch,
and rename some of the GPIOs to be more generic since the DAC,
headphone amp, and stereo switch all appear to have changed.

Change-Id: I220fe5e37bcbcd959b544183e1fcf70673a83c13
2023-01-22 15:11:35 -05:00
Solomon Peachy
255a34c685 fix red from #641e91aa2f
Change-Id: I7e648a7bdf1d706258afd49c1edd63655b2d2830
2023-01-13 17:02:23 -05:00
Solomon Peachy
641e91aa2f jz47xx: Add support for INIT region
Change-Id: I100cd661e9b1225167463542800c6aafbc3c17b3
2023-01-13 16:14:42 -05:00
Aidan MacDonald
719d48afc4 buflib: Refactor various debugging features
Gate buflib_get_data() checking, debug printing, and buflib
integrity checks behind individual defines in buflib.h, and
turn them all off by default. If needed, they can be turned
on manually when compiling.

The buflib debug menu is only available if debug printing is
enabled, so after this commit it will no longer be included
in normal builds -- it isn't very useful to end users.

Change-Id: Iab25b7852bc7c5592ce04c9c45762046a87d5bc3
2023-01-13 10:32:57 +00:00
Aidan MacDonald
1e9ad3ca0d Remove buflib allocation names, part two
Remove allocation names from the buflib API and fix up all callers.

Change-Id: I3df922e258d5f0d711d70e72b56b4ed634fb0f5a
2023-01-13 10:32:54 +00:00