1
0
Fork 0
forked from len0rd/rockbox
Commit graph

622 commits

Author SHA1 Message Date
Solomon Peachy
08a6f804ce ibasso: Use correct API to query power input and charging state
Instead of using the generic hosted sysfs code, which expects
a full path, the ibasso code's sysfs code uses an enumeration.
Unfortunatley the generic power input/charging code used the former
API but linked with the latter.  oops.

Correct this by placing a private copy of these functions in
the ibasso-specific port, and removing the generic version from
that build.

(A "proper" fix would be to rework all 17 of the ibasso sysfs calls
 to use the generic sysfs API)

Change-Id: Ic13adc9782d85560f0c74d77f60a629619d38668
2025-05-22 07:15:15 -04:00
Solomon Peachy
0ebfab36ba surfansf28: More fixes:
* Use 16-bit audio output
 * More audio tweaks (mute on startup, working volume control)
 * Treat the rotary input as a scroll wheel (works now)

To-dos:

 * Better global keymap (incorporate touchscreen)
 * Turn on plugins and define the approximately eight bajillion keymaps
 * Still have some audible pops when we turn on, need to figure out why
 * Default Cabbiev2 comes off as rather crappy on this device

...I don't know how much work I will do on this thing, as the limited
number of physical controls (and a lack of a line-out) mean I'd never
want to use this thing myself.

Change-Id: I37229d92766495219ee989d9ae48b5ed79bd45f5
2025-05-06 09:56:03 -04:00
Solomon Peachy
95f970076e surfansf28: Major improvements:
* Add a crude keymap
 * Use native "hardware mute" for audiohw_mute()
 * Properly handle touchscreen inputs
 * Can now play back music, with some warts..

Broken:

 * rotary wheel still doesn't work
 * audio garbled/distorted a bit
 * no volume control

Change-Id: I040217035a7bf3983b0e269fca3408eedd972cd0
2025-05-05 20:38:18 -04:00
Solomon Peachy
82f3d0c18f WIP hosted port to the Surfans F28
* Only bootloader builds
 * Plugins disabled
 * No keymaps to anything else
 * No simulator
 * Touchscreen not wired up yet
 * Audio still untested

Bugs:

 * rotary encoder does nothing in bootloader
   (might be bootloader bug, might be something else)

Other stuff pulled in:

 * Unify all of the (identical!) hibyos makefiles
 * Rename the "bootloader" to more generic name

Change-Id: I6d8a3b58de726db8e89cf193c90960a070a575c2
2025-05-04 18:34:22 -04:00
Solomon Peachy
de74b8738b nano4g: Make real bootloader fit in limited IRAM
...Trim support for alpha-blended bitmaps and stack trace.

Change-Id: I2d10af6c8bcb261cdbfb3f17ed81b6ee9bb0cc4b
2025-04-24 20:35:27 -04:00
Aidan MacDonald
83950bf233 New WIP port: Echo R1
The Echo R1 is a new open-hardware music player design, based
on the STM32H743 microcontroller. Schematics and hardware
documentation for it can be found here:

- https://github.com/amachronic/echoplayer

This is an incomplete port. The bootloader can be loaded using
OpenOCD and it can draw to the LCD using SPI. SDRAM is working
but hasn't been extensively tested.

Change-Id: Ifd2bee15c49868fbc989683d3ca14dce48bf3e18
2025-04-22 20:08:08 -04:00
Vencislav Atanasov
545506c923 New port: iPod Nano 4G
Currently, only the development bootloader can be built successfully.

This is a part of the large iPod Nano 3G and iPod Nano 4G support patch.

Credit: Cástor Muñoz <cmvidal@gmail.com>
Change-Id: I74ea0da999ddb1d8ce5d0f5434141b3f0b5f7448
2025-04-18 20:40:49 -04:00
Vencislav Atanasov
d6cd237f80 New port: iPod Nano 3G
Currently, only a bootloader can be built successfully. The development bootloader is functional, it enables further progress on the port.

This is a part of the large iPod Nano 3G and iPod Nano 4G support patch.

Credit: Cástor Muñoz <cmvidal@gmail.com>
Change-Id: Idf85e42334b0e0ae36f9ed273e2940d5d7736e34
2025-04-18 20:10:29 -04:00
Aidan MacDonald
b71337f1fd x1000: remove LCD fast sleep define
All the X1000 targets use "fast" sleep, as opposed to the normal
HAVE_LCD_SLEEP define which creates a user-configurable option.
Remove the ifdefs to make the code a bit easier to read.

Change-Id: Ibb80c92a8e23191651fee61fc8cf6f4e4fac8750
2025-04-18 10:35:49 -04:00
William Wilgus
4f3bbeaffc Remove BATTERY_TYPES
Change-Id: I4fa03a10d0032fd6f92722bbe1d4b7eec0b95cb4
2025-03-11 02:26:38 -04:00
Dana Conrad
96463d855f erosqnative: hw4 units prefer egauge battery percentage
Use AXP2101's egauge battery percent level if available (hw4 units).
If not available (_battery_level() will return -1 on hw1-hw3 units),
fall back to voltage battery level.

Also fix logic in axp2101_battery_status()

Change-Id: Ic300418532dae6f7772fff8bf5e2b32516f3b973
2025-01-19 17:30:21 -05:00
Solomon Peachy
9417ece0ea imx233: Make bootloader compile, fix up remanining warnings
Change-Id: Ie87d178c56455b93364dffa656ebbee9cd7a4bad
2025-01-08 09:14:20 -05:00
Christian Soffke
18aa0f6278 Creative Zen Vision: fix config file (?!)
If I'm interpreting the git history correctly,
the config file for Zen Vision was at some point
inadvertently replaced with one for the
Zen Vision:M.

This deletes the currently unused creativezv.h,
and moves its contents into zenvision.h.

The config files appear to be identical except for
CREATIVE_ZV vs CREATIVE_ZVM define, different
keypads (CREATIVEZVM_PAD vs CREATIVEZV_PAD) and
BOOTFILE_EXT (zv vs zvm), a different model name
and number, as well as different LCD dimensions
and DPI.

The buttonmap still seems to require adjustment.

Change-Id: I9a5e65df750db21be5f5a1ed7a80a50706237781
2025-01-08 08:06:45 -05:00
Solomon Peachy
a76ecf1725 erosqnative: Fix operation in a simulator environment
Real hardware needs 24-bit PCM data supplied, but simulator
is still 16bit only.

Change-Id: I20b88a7cb27105829fe5c9e9c434f559a6dbbb60
2024-12-07 14:05:23 -05:00
Solomon Peachy
127b583a4d ipod6g: Turn on STORAGE_NEEDS_BOUNCE_BUFFER
The s5l8702's ATA controller can only DMA in/out of cacheline-
aligned buffers.  The more general buffering code already ensures
its buffers are aligned, but this covers the rest of the
users of the general I/O path.

Change-Id: Iae54d98797efb61756cb73e3901308775a0c5e52
2024-11-26 08:20:02 -05:00
Vencislav Atanasov
f4bbddb044 ipod6g: Fix config
- NOR flash size is 1MB, not 10MB
- BOOTFILE_EXT2 is not used, the Rockbox binary is always unencrypted on iPod 6G. This looks like a leftover from ipodnano2g config

Change-Id: Iea76c1e87f27e25b3d59924ef02e22d91448e39d
2024-11-23 17:19:18 -05:00
Dana Conrad
253eb79db3 erosqnative: hw4 support
Support hw4 units with AXP2101 PMU

Bootloader successfully compiles and loads onto device.
The LCD appears to be identical to hw3 units.
Scroll wheel and buttons work
Audio output works, including volume.
HP/LO detect works
Rockbox build is generic
GPIO gating logic seems to be working as intended now.

 - Added new GPIO definitions - some significant overlaps with pins
    from previous hardware revisions...
 - Added some GPIO definitions for older players we didn't know about
 - Add register definitions for AXP2101 from datasheet
    (these are very different from AXP192!)
 - Add AXP2101 regulator definitions, need to support multiple step
    sizes per regulator.
 - Verify AXP2101 voltage set multi-range logic
 - Verify AXP2101 voltage get multi-range logic
 - Make AXP2101 its own driver
 - AXP2101 driver should be "minimally viable", though I think
    there is some extra functionality that could be implemented.
 - Disabling the coulomb counter stuff - we could maybe make
   the E-Gauge work for the same purpose, but it only appears to
   be used on the debug screen at the moment so it doesn't seem
   like it's worth the effort.
 - Found new button GPIOs
 - Found error in my GPIO setting logic, blue light works now!
 - Set LDO/DCDC output voltages to OF's settings, as far as
   I can tell.
 - Determined we probably want TCS1421_CFG1:0 to be 0x00,
   for UFP behavior
 - Tested this rb build with both old and new bootloaders on hw1.5,
   hw2, hw4 in as many configurations as I can think of, works across
   the board.
 - Bootloader can install itself on hw4, so nand chip isn't novel
 - Uninstallation file can be made by patcher script, works on hw4
 - Installation file can be made by patcher script, works on hw4
 - Added HW4 to rbutil, manual

Change-Id: I5b75782273e81c2c6f2b9c79501c8b7cbf88391f
2024-11-22 17:01:39 -05:00
Vencislav Atanasov
1c7fddad5b Add the remaining iPod Nano SoCs to config
Currently only S5L8701 (Nano 2G) and S5L8702 (Classic/6G, Nano 3G) are defined. This change adds the remaining to CONFIG_CPU, as a preparation for porting to these platforms. It also defines the RTC types for Nano 3G and Nano 4G.

New CONFIG_CPU options:
S5L8720 - iPod Nano 4G
S5L8730 - iPod Nano 5G
S5L8723 - iPod Nano 6G
S5L8760 - iPod Nano 7G

Change-Id: I4e9e00163c0d0d5a5303f9eee428f9be47a48359
2024-11-21 20:03:32 -05:00
Solomon Peachy
120906dc8b ata: Ensure that the bounce buffer is minimum 32-bit aligned
Basically, if STORAGE_ALIGN_ATTR isn't defined, define it to be
sizeof(uint32_t) in the ATA code.

Change-Id: I13de61788cb71e3e8d3a956ab5f2e251471ce76d
2024-11-15 07:24:08 -05:00
Solomon Peachy
d6e2b5d3cf Enable use of ATA DMA on Philips GoGear HDD1630 and HDD6630
These are PP502x-based devices shipped with ATA drives.  However,
PIO is flaky when used with the various ATA/CF<->SD adapters, so
turn it in across the board.

Change-Id: I65384d95e2e4498eb03f43ac990b01e0c6d060c5
2024-11-11 16:29:56 -05:00
Solomon Peachy
c8e1da8e90 ipod5g/6g: support DEFAULT_VIRT_SECTOR_SIZE
This way if there's no valid partition/filesystem we still report the
"correct" sector size out via USB.

Update the ipod5g/6g bootloaders so they do the right thing too.

Change-Id: I0d93ae7e6664f1591d8edf1c0252c586e329cd4b
2024-11-09 17:48:09 -05:00
Solomon Peachy
c61ad40812 storage: Wrap runtime variable sector size with MAX_VARIABLE_LOG_SECTOR
When enabled this allows 512n and 4Kn drives to be used with a single build.
(So far all ATA SSDs use 512 byte logical sectors)

Change-Id: I902d2318ca8abb581699c0bca68d6e3ec227d064
2024-11-09 16:34:06 -05:00
Solomon Peachy
bc6c189dcb storage: rename MAX_LOG_SECTOR_SIZE to MAX_VIRT_SECTOR_SIZE
Change-Id: I34f00748c1b0935d65af5f0fc6bdd13356ff31e1
2024-11-09 16:32:40 -05:00
Solomon Peachy
42b63daebb ipod6g: Swap STORAGE_NEEDS_BOUNCE_BUFFER for STORAGE_WANTS_ALIGN
Change-Id: Ie34ffe0e022c8416ec9b2d4c39733a15c205eb3d
2024-11-07 21:08:15 -05:00
Solomon Peachy
9dd2781b87 ipod6g: Use storage bounce buffer for ipod6g
Change-Id: I987357bd6795b988802997f92b6d64f36cd24f43
2024-11-07 16:44:25 -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
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
Solomon Peachy
edbcf0b0f4 erosq: Initial PM support for "hw4" variant
(They renamed the battery from 'battery' to 'axp_battery')

Change-Id: Ic42c31e1d5c01eafc3fe01b144d9f22d88933e04
2024-10-10 10:12:29 -04:00
Dana Conrad
a7cfee640d erosqnative: only check for EROSQN_VER if bootloader build
Change-Id: If1dea2414b5c55d54dfd48aa9b24d29bdd49001a
2024-09-08 17:10:04 -04:00
Dana Conrad
a5462d6192 erosqnative: Give erosqnative_v3 its own target ID and modelname
This is needed so "make clean; make reconf" will work correctly.

Change-Id: Ife13e59ac6054f04f7095aa2263ec64595eeb3a2
2024-09-08 12:29:03 -04:00
Dana Conrad
878e29396c ErosQNative: Add v3 LCD support, conditional on bootloader
bootloader passes the player version to rockbox for LCD init changes

Credit ZappBranigan2972 on forums for original changes
Credit Bilgus for devicedata additions

Change-Id: Ia2ca493edef49b7457e84dc19b05397dc915fa5a
2024-09-02 13:29:43 -04:00
William Wilgus
a2cc7546d8 Add DeviceData to bootloaders
same vein as bootdata but for devices that need to pass info back to a
running firmware

Change-Id: I0cdcdc0475804dfbbee415ab487104ae8fc8ac69
2024-09-02 13:29:43 -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
ea80d1cc9c config: Change default HAVE_MULTIVOLUME settings
* HAVE_MULTIDRIVE implies HAVE_MULTIVOLUME as the latter is always
   removeable storage
 * SD storage implies MULTIVOLUME
 * ATA storage (with HAVE_LBA48) implies MULTIVOLUME
 * Replace HAVE_MULTIDRIVE && NUM_DRIVES == 1 with HAVE_MULTIVOLUME

Since SD and ATA can exceed 2TB, we need multiple volumes to fully
utilize available storage with FAT32.

In practice I believe this only affects the ipod devices.

Change-Id: Ia597770948b0e2b47630f7264ad34f225a33a640
2024-07-07 11:35:04 -04:00
Solomon Peachy
e2fb4ecd5c xduoox3: Completely strip USB support out of the bootloader.
Change-Id: I7167e051a56a3be3c285c209b1c8fca7de251b09
2024-07-03 16:51:58 -04:00
Szymon Dziok
f7a3b4dfa3 Radio support and detection for Samsung YH92X [FOR TESTING].
Status:

- tested on:

  Samsung YH920 - it uses this detection too, it always should have
                the radio.
  Samsung YH925 with the radio.

- untested on:

  Samsung YH925 without the radio.

Change-Id: I68b39c09d6b7e26a4c373fbd8bf9401a97e86123
2024-06-23 20:11:59 -04: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
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
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
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
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
Uwe Kleine-König
1ee152b5a4 sansaclipplus: enable usb-hid mouse support
Change-Id: Ifbebf9ff8474882a29378515e010e9c9d39df5c3
2023-10-27 19:31:41 +02:00
William Wilgus
84fe501f53 Add locked actions to all soft lock targets
fiio m3k native is currently the only player with
defined buttons different from the standard
mapping.

This allows the user to use the keyremap plugin
to specify differing keymaps for their device in the locked state

Change-Id: Ie0b447bba0d5978e8d23fed423df30c794afc6f9
2023-01-02 13:19:43 -05:00
William Wilgus
3def8fee8c [FixRed] ClipV2 has a hold button -- news to me
HAVE_LOCKED_ACTIIONS requires !defined(HAVE_HOLD_BUTTON)

Change-Id: I1e98c282f17d11f08ea80cd5963b331a3ae19387
2022-12-31 17:12:36 -05:00
William Wilgus
6ebec601f9 [Feature/Bugfix] keyremap add Context flags
Add context flags to keyremap
CONTEXT_LOCKED
CONTEXT_REMOTE
CONTEXT_REMOTE_LOCKED

--CONTEXT_PLUGIN-- Removed -- Plugins need a custom action list
supplied and a method of supplying them

Change-Id: I5201d275ad0ab6130c2d05d5afb0c450f5c1746c
2022-12-31 16:12:18 -05:00
Solomon Peachy
418169aff8 Revert "Remove YUV blitting functions and LCD modes"
This reverts commit fe6aa21e9e.

Change-Id: I8bb1e5d6c52ed1478002d2140ef494ec5d62b8e3
2022-10-13 11:08:06 -04:00
Aidan MacDonald
fe6aa21e9e Remove YUV blitting functions and LCD modes
None of this is needed now that mpegplayer is gone.

Change-Id: I360366db8513e4d988021e8d7b7d8eb09930efb8
2022-10-03 13:30:01 +01:00
Aidan MacDonald
b371ff1f47 mrobe500: Fix missing parentheses in #define
Change-Id: Ifbba50a951fb3212eabe430dfef6868a7ad5e391
2022-10-03 13:29:52 +01:00