Commit graph

3433 commits

Author SHA1 Message Date
Tomasz Moń
b4ecd612f7
Sansa Connect: Use deviceid in USB Serial Number
Atmel AT88SC6416C CryptoMemory is almost I2C compatible. The device
is connected to bitbanged I2C bus shared with compliant I2C devices.

Change-Id: Iec54702db1bdfb93c01291eef18ec60391c63b16
2021-07-10 08:56:32 +02:00
Tomasz Moń
60e2cd6de9 DM320: Regorganize LCD and TTB memory layout
Do not introduce any change for M:Robe 500 as it uses the two LCD frames
in non-obvious way.

Sansa Connect and Creative ZVM use only single front framebuffer.
Place TTB at DRAM end to minimize memory loss due to alignment.
Reserve as little as possible memory for the LCD frames.
On Sansa Connect this change extends audio buffer by 858 KiB.

Change-Id: I21bdeec4cfba86d71803a39acd651a87e73767e6
2021-07-09 09:24:38 +00:00
James Buren
a9f36efa62 file/fat: rework utime function as modtime extension
This eliminates the dependence on a special struct since we were only
using the modtime anyway. But it no longer fits any known standard APIs
so I have converted it to our own extension instead. This can still be
adapted to existing hosted APIs if the need arises.

Change-Id: Ic8800698ddfd3a1a48b7cf921c0d0f865302d034
2021-07-08 17:47:51 +00:00
Solomon Peachy
a0f1236e88 Fix yellow in android builds.
Change-Id: Ic22908e249f2db85c029e1644c9531a12ed87993
2021-07-08 13:06:41 -04:00
Solomon Peachy
39b82afb45 Fix warnings introduced in c174d3a5 (redux)
Change-Id: Icc871bd9875aa0d092a4fba3e8a6c3a598053854
2021-07-08 14:16:25 +00:00
Solomon Peachy
78eb87f453 Revert "Hosted & tool builds need utime.h"
This reverts commit a8fd590003.

Reason for revert: Inverted polarity and it didn't work anyway.

Change-Id: Ife548ce4608405e3243c84a1d72090603fd2decc
2021-07-08 14:07:58 +00:00
Solomon Peachy
a8fd590003 Hosted & tool builds need utime.h
Should fix the warnings introduced in c174d3a5

Change-Id: Ib4bd863caef4dedf28dadab8b58b9a165ed4ef9b
2021-07-08 13:55:12 +00:00
James Buren
c174d3a544 file/fat: add utime function
This emulates the traditional utime function from UNIX clones to allow
for manual updates of the modification timestamp on files and directories.

This should only prove useful for non-native targets as those usually
have a libc version of utime.

Change-Id: Iea8a1d328e78b92c400d3354ee80689c7cf53af8
2021-07-08 13:15:30 +00:00
Tomasz Moń
841e704fc3
Sansa Connect: Read HDQ battery data
Make it possible for target to provide voltage, percentage and time to
empty values. The voltage measurement is nice to have in debug menu even
if the actions are taken only based on percentage. Perform battery level
estimation based on voltage only if percentage is not available.

Use time to empty based on actual power consumption. This makes the
estimated runtime displayed in Rockbox Info to react to backlight
setting. The bq27000 updates time to empty estimate every 5.12 seconds
so it is possible to see the estimate with backlight off on the screen
if user enters Rockbox Info, activates hold switch, waits 11 seconds and
releases the hold switch.

Change-Id: Iafe3fa0fb334e3428e3a0ad05b2c020d208dc934
2021-07-07 08:24:01 +02:00
Tomasz Moń
2acf8db3e1
Sansa Connect: Power off LCD to save power
Prevent startup screen flash by properly using AVR LCM functions. Power
off LCD when not needed to improve battery runtime.

Change-Id: I76e3c5c0208774f189fbc6f7d7b3c9e22c062285
2021-07-05 15:19:52 +02:00
Tomasz Moń
e11fa5f74e Sansa Connect: Initial libertas WiFi driver port
Import non-free firmware image from linux-firmware package.

Firmware loading works but is disabled at compile time because just
loading firmware without configuring device results in higher power
consumption without any benefit to end user.

Change-Id: I8fd252c49385ede1ea4e0f9b1e29adeb331ab8ae
2021-07-04 07:41:44 +00:00
James Buren
c9f2308a1d fat: move fattime_mktime to timefuncs
This moves the time conversion function to timefuncs since it has
uses on ports that don't use the FAT driver. This function has no
dependency on the FAT driver as it is so this should not cause any
issues. To reflect this separation the function was renamed to
dostime_mktime since it is really for DOS timestamps. The places
where it was used have also been updated.

Change-Id: Id98b1448d5c6fcda286846e1d2c736db682bfb52
2021-07-03 00:19:58 +00:00
Tomasz Moń
3738510953
Sansa Connect: Implement RTC functionality
Use 32-bit monotime AVR counter for time tracking. Set the time by
adding fixed offset to the counter value. Store the offset in rockbox
directory to make it persistent between reboots.

Do not implement alarm functionality as wakeup is only possible from
sleep and not from complete power off.

Change-Id: I615c7eb4df8ab0619dcbfcff107bc7051a15aace
2021-06-25 16:12:06 +02:00
Tomasz Moń
2ca5774cf9 Sansa Connect: Indicate charging status
Consider battery level down to 0 as safe as OF continues to operate
normally even when at level 0.

Change-Id: Ie3889e5662b9fa6588e20ad02d8953f29e28800c
2021-06-20 10:33:46 +00:00
Tomasz Moń
f6c7407cc3 DM320: Use SD/MMC data done interrupt
Wait on semaphore until DMA finishes instead of busy waiting. This
allows the CPU to be used by other tasks during transfers.

Increase peripheral clock frequency, divide AHB by 2 instead of 3.
Function clock frequency is AHB divided by MMC divider + 1.

Change-Id: Ic890634da7e3541962ea3501eae8fa2ca2db606a
2021-06-15 07:31:29 +00:00
Tomasz Moń
f3f9d1fb95 USB Serial: Implement Abstract Control Management
On devices that can assign interrupt IN, bulk IN and bulk OUT endpoints
this change results in the serial interface working out of the box on
Linux and Windows. On Linux it is registered as ttyACM device and on
Windows it is assigned a COM port number.

On devices that cannot assign the interrupt IN this change won't have
any effect.

Implement minimum required interface control requests. Respond with
whatever line coding was set to make terminal programs happy.

Change-Id: Id7d3899d8546e45d7cb4ecc3fe464908cb59e810
2021-06-12 14:47:15 +00:00
Aidan MacDonald
d01f3192f2 Spin off common ft6x06 code to a driver
Allows for the i2c boilerplate to be shared between the M3K and
Shanling Q1 ports. M3K-specific quirks remain in button-fiiom3k.

Change-Id: I8879b603cefc16416bb200f1c484ca916d935c6a
2021-06-11 20:09:38 +01:00
Tomasz Moń
551c74da55
Sansa Connect: Remove fake battery voltage scale
Use battery percentage as reported by AVR.

Change-Id: Id697d460b240798eb0b103f9e1f419906b87e9ca
2021-06-10 08:43:32 +02:00
Tomasz Moń
163e3507f8
Sansa Connect: Working USB Mass Storage
Acknowledge SYS_USB_CONNECTED in all queues so USB task can gain
exclusive access to the storage.

Reduce CPPI requeue timeout to speed up disk access.

Change-Id: I322aae4cac679696bb8186ccacf838a18f0715e9
2021-06-09 20:52:36 +02:00
Tomasz Moń
474293a12b Sansa Connect: Initial TNETV105 driver port
Port USB driver from Sansa Connect Linux kernel sources. The device
successfully enumerates and responds to SCSI commands but actual disk
access does not work. The SCSI response sent to host mentions that both
internal storage and microsd card are not present.

Change-Id: Ic6c07da12382c15c0b069f23a75f7df9765b7525
2021-06-06 07:57:38 +00:00
Aidan MacDonald
0187fca640 axp173 driver: rename to "axp-pmu" + other changes
The old name was a bit misleading. AXP173 is sort of the lowest common
denominator of a series of related chips. The M3K uses an AXP192 which
has a few extra features vs. the AXP173.

New voltage regulator stuff was added for the sake of the Shanling Q1
native port (that player also uses an AXP192).

Change-Id: Id0c162c23094bb03d13fae2d6c332e3047968d6e
2021-06-01 19:57:41 +00:00
Aidan MacDonald
663c5268ac AK4376 driver: refactoring
Some audiohw API calls are shared between playback and recording,
eg. frequency settings. Implementing these in the DAC driver won't
work for the M3K, as it uses a separate codec for microphone input.

Change-Id: Ieb0a267f8a81b9e2bbf0bbca951c5778f8dcd203
2021-05-31 23:00:14 +01:00
Aidan MacDonald
5cbeb88541 FiiO M3K: keymap improvements & fixes
- Add support for skip and seek while the player is locked.
  (Thanks to @bahus for the suggestion)
- Fix touch zones because the down button zone ended up being
  a lot smaller than expected due to the touchpad's wonkiness.
  Also added a visual display of the touchpad to its debug menu.
- Fixes the pictureflow keymap because it was mostly unusable.

Change-Id: Ic0da4f8df3613ff7828ce1cb940ed9e77ada3281
2021-05-22 12:20:44 +00:00
Solomon Peachy
ff28d238b8 ibasso: DX50/DX90 support 192KHz audio
Also bump max battery capacity to 7300mAh, to accomodate
oversized aftermarket units that require case mods.

Change-Id: I743e550b0c0843ab17529e70b5d592ea0e9a79d8
2021-05-13 21:40:22 -04:00
Dana Conrad
84a3cbe24d ErosQ: Small keymap changes
- Move WPS Stop to Power (Hold)
- Add WPS Hotkey to Wheel scroll Fwd/Back
- Add WPS Quickscreen to Play (Hold)
- Add Tree Hotkey to Play (Hold)

Change-Id: Id74622138353521f736c0de1009a354307b108eb
2021-05-12 11:01:27 +00:00
Aidan MacDonald
3f26fcf340 FiiO M3K: New bootloader
SPL and UCL-compressed bootloader are now packed into one output,
bootloader.m3k, eliminating the separate SPL build phase.

The Rockbox bootloader now has a recovery menu, accessible by
holding VOL+ when booting, that lets you back up, restore, and
update the bootloader from the device.

Change-Id: I642c6e5fb83587a013ab2fbfd1adab439561ced2
2021-05-12 10:35:20 +00:00
Aidan MacDonald
3748117ee3 Add standalone UCL decompressor
Change-Id: Ibdb128ad66a7dcdd617dc83dfd294c0b24d4901d
2021-05-12 10:35:20 +00:00
Aidan MacDonald
20fc928221 x1000: Centralize common definitions, memory layout
Change-Id: I8daad058ae55d4b750b1ae407153e4917de5d095
2021-04-28 20:04:10 +01:00
Solomon Peachy
7d0d32dbc6 Nuke the never-functional iriver ifp-7xx port
It never worked, and hasn't compiled in something like a decade, Given
the HW capabilities (limited onboard flash, no expandability) there's
really no point in trying to fix/complete it.

Change-Id: I7d175089840396f8891645bd10010d730dd5bfdc
2021-04-26 07:42:58 -04:00
Solomon Peachy
3ba2f6e5c7 Nuke all TCC77x targets: iAudio 7, Sansa C100, M200(v1-3), Logik DAX
They were never finished, never saw any release ever, and haven't
compiled for the better part of a decade.  Given their HW capabilities [1],
they are not worth trying to fix.

[1] 1-2MB RAM, ~256MB onboard flash, no expandability

Change-Id: I7b2a5806d687114c22156bb0458d4a10a9734190
2021-04-26 07:41:51 -04:00
Aidan MacDonald
79d1b68fe2 FiiO M3K: disable USB DMA
Although data transfer is reliable with DMA, it seems to cause hangs
and lockups during the early stages of connection and it's not clear
what the cause might be.

Change-Id: I9a83089c31d28309f0534dcdedf3c8c8348e6e3d
2021-04-23 00:30:52 +01:00
Aidan MacDonald
75cb8ba8a4 FiiO M3K/X1000: add USB support
This only required a minor patch to the usb-designware driver due
to DMA requiring physical addresses -- on the X1000, these differ
from virtual addresses so we have to do the usual conversion.

Both the mass storage and HID drivers work, but there are a few
issues so this can't be considered 100% stable yet.

- Mass storage might not be detected properly on insertion,
  and USB has to be replugged before it shows up
- HID driver may occasionally panic or hang the machine

Change-Id: Ia3ce7591d5928ec7cbca7953abfef01bdbd873ef
2021-04-21 18:31:55 +00:00
Aidan MacDonald
088ebb5fac Minor enhancements to axp173 driver
- Added register names to reduce usage of magic numbers
- Added function to control max charging current, needed for USB
- Corrected comment about axp173, since FiiO M3K has an axp192

Change-Id: I6604ce8d44e5a2ee84061cf042d17ccc4734ac57
2021-04-21 18:31:55 +00:00
Aidan MacDonald
92140752d7 FiiO M3K: disable CPU frequency switching
After conducting some simplistic tests, I found that the power usage
did not appear to be affected by the CPU frequency.

I tested by playing back a 44.1 KHz FLAC file on single track repeat,
and measured current with the AXP173's battery discharge current ADC.
The button and LCD backlights were set to always on. Headphones were
unplugged and the volume was muted to eliminate any influence from
the headphone amp.

On average the current usage was between 78-81 mA at 1008 MHz, 252 MHz,
and 112 MHz. If anything, 1008 MHz drew _less_ current than the lower
frequencies, by about 1-3 mA.

A possible explanation for this, assuming it's not just a bias of the
test, is that the CPU idle state saves so much power that it's better
to maximize the real time that the CPU spends idling. More systematic
testing is needed to confirm this.

Change-Id: I527473e8c4c12bc1e94f8d4e849fecc108022abe
2021-04-17 20:24:36 +00:00
Dana Conrad
4dc602dd7f erosq: Tweak volume scale to be approximately correct
Tested on eros q, everything measured from line out,
open circuit.

- volume steps were approximately double the dB they
  were labelled as, so "-2 dB" would result in a change
  of about -4 dB from maximum (0, +6.2dBV)
- maximum volume defining the line out volume only
  changed every 10 values, and then was not close
  to correct- "-10 dB" resulted in -2.5 dB from maximum

This gets the volume dB approximately correct, and
maximum volume correctly sets the line out volume.
I was unable to get odd values in the max volume
to work, so set the step size to 2 instead of one.

For "consumer level" (-10dBV), set to -16.
For "Pro level" (+4dBu -> ~1.8dBV), set to -4.

Change-Id: I898b85d768153579a893b23551019af88f865d21
2021-04-17 12:09:19 +00:00
Solomon Peachy
b6fce99046 ibasso: Implement proper PIVOT_ROOT filesystem access
Including direct use of the external SD card mount

Known issue:  If SD card is inserted at startup, it must be
              ejected and reinserted to be registered.

Change-Id: I5f420160bda32135cbb088c1e8b04b6e3a73018e
2021-04-12 18:19:06 +00:00
Solomon Peachy
bc416ff590 misc: Only include rbpaths.h and string-extra.h in places that need it
(Don't include rbpaths.h in settings.h, or string-extra.h in rbpaths.h)

Build-tested on rocker, erosq, mini2g, nano2g,
                xduoox3, clipzip, dx50, and uisim

Change-Id: If32e9c9910f5c8247a655cb64522b84d6d7ccbb5
2021-04-10 12:08:12 -04:00
Aidan MacDonald
54b8e9131c Revert "sound: add sound_numdecimals() to round out the sound setting query API"
There is already a sound_numdecimals() function, according to Git
it's been around since 2005. No need to add another one :).

This reverts commit 92a0ab8789.

Change-Id: I533ebf1763dd7a27346842982493d4550f05ad7c
2021-04-09 10:52:02 +00:00
Solomon Peachy
1e2a9a651c erosq: Switch to 32-bit PCM output, and do volume scaling in driver
Should improve audio output quality, especially at lower volumes.

Change-Id: I31c38f05fe4b554b092511f0fe7aaad9f346f6c5
2021-04-08 23:58:49 -04:00
Solomon Peachy
54fcb907c1 alsa: instead of per-target tests, use HAVE_ALSA_32BIT
Affects all Sony NWZ (linux) and the fiio m3k linux targets.

Change-Id: I2fcf121bd026103d2b72332a5a52cc2b5e93949f
2021-04-08 23:02:15 -04:00
Solomon Peachy
74ae18cc8a fiiom3k_linux: Enable HAVE_TOUCHPAD and add in missing bits
Change-Id: I78fa5fdb3648adfaa40f6d5f3c255666a85e2761
2021-04-05 13:57:01 +00:00
James Buren
962d412917 hdd1630/hdd6330: update battery capacities
Ensure the default setting reflects what the service manual says the
official battery capacity is. Change the ranges to reflect what
replacement batteries are actually available.

This range is actually much shorter in reality due to these units
requiring the rarer 3 pin battery type that uses a thermistor. As such
there's only one real replacement battery for each.

So the HDD1630 caps out around 700 mah while the HDD6330 caps out around
680 mah.

Change-Id: I2dbbba83ad2cd6e1d84e3481c4af84a06c45e16b
2021-04-04 13:27:00 +00:00
Solomon Peachy
0b20038d87 FiiO M3K: Hopefully fix the sim build
Change-Id: If5a58a4b3913645068cee95d4553f285eb55d182
2021-04-01 10:54:36 +00:00
William Wilgus
89acde6af2 H10 PP Crash -- Fixed
This appears to finally fix the issue
turns out the status register we were writing was only for the CPU
COP cache flush wiped out the CPU cache
--

Added some defines to cut down on the magic numbers
Added some comments explaining such

Set the address to full 20 bit address
0x1FFFFF which is then left shifted 11 internally --  somewhere around 4GB?

Link explains the cache status bits
https://daniel.haxx.se/sansa/memory_controller.txt

Change-Id: I57b7187c2f71a5b54ce145bf3a21ed492a8993cb
2021-04-01 00:52:57 -04:00
Solomon Peachy
058a9ec945 Add M3K native to the simulator
Change-Id: If3e877d2df189e44076631fd571cf6aa70ce6ca8
2021-03-28 12:08:31 -04:00
Aidan MacDonald
3ec66893e3 New port: FiiO M3K on bare metal
Change-Id: I7517e7d5459e129dcfc9465c6fbd708619888fbe
2021-03-28 00:01:37 +00:00
James Buren
018372bf39 usb: implement macro for initializing USB strings
This uses the new unicode string literal feature that is available
now to greatly simplify the initialization of these special string
types. This makes them much more readable at a quick glance.

Change-Id: Iad8b49aa763486608e3bb7e83fb8abfb48ce0a7b
2021-03-25 13:26:03 -05:00
Solomon Peachy
7652e6f8df rk27xx: Get rid of duplicate STORAGE_WANTS_ALIGN
Change-Id: I278d42858cc33da3710c8ca8f42d14c6d57509ca
2021-03-25 12:23:06 -04:00
William Wilgus
3d9d2de34d Revert "lcd framebuffer - Bugfix #2 ensure proper alignment"
This reverts commit 3a5c5edbf6.

Reason for revert:pulling in system.h breaks SDL

:(

Change-Id: Ied5e08de4770aa0da87c14b304480448db349423
2021-03-25 06:34:58 +00:00
William Wilgus
3a5c5edbf6 lcd framebuffer - Bugfix #2 ensure proper alignment
-- apparenty 0x4 aligned doesn't work properly

requires 0x8 alignment at least for the h10 20gb
but enabled for all processors that define MEM_ALIGN_ATTR

Change-Id: I11edaab183b91a6d158f1f439f173b9b699dc914
2021-03-25 00:32:26 -04:00
Aidan MacDonald
94b40ed314 Add asynchronous I2C bus API
The driver core is based off of the i.MX233 I2C implementation and
should work on any platform.

Change-Id: I3b9c15e12a689ef02a51c285be08d29d35e323dc
2021-03-23 15:42:54 +00:00
Aidan MacDonald
55805e13a4 Add new audiohw capability: POWER_MODE_CAP
This allows the user to make use of the DAC's power-saving abilities.
The two modes are "high performance" and "battery saver". This feature
is supported by the AK4376 DAC in the upcoming FiiO M3K port.

The setting is only a manual toggle right now, but in the future it
could be hooked up to the battery level (via another setting) so it
can be toggled automatically when the battery gets too low.

Change-Id: I482af6e2f969fcbdeb3411bd3ff91f866b12d027
2021-03-22 13:00:11 +00:00
Solomon Peachy
efe493de3d FS13274: Bump max battery capacity for iPod Videos to 3000mAh
3rd party batteries can go this high for users that have performed SSD mods.

Change-Id: Icb34ce08e5ea345bc0fdb555bd3fd8ea9cf9e0d9
2021-03-15 12:17:30 +00:00
Solomon Peachy
92a0ab8789 sound: add sound_numdecimals() to round out the sound setting query API
A necessary prerequisite for fixing FS#13272

Change-Id: Ice288af39a4f08bea376f920d855932bdac69a52
2021-03-14 12:33:49 -04:00
Caleb Connolly
04c29984ce
ipod6g: increase max battery capacity
It's possible to get up to 3000mAh batteries for this device, although
it requires that you use an iFlash adapter to make enough space.

Signed-off-by: Caleb Connolly <caleb@connolly.tech>
Change-Id: I0d0d02aa30caffcae4a7e8c805516a1266eef359
2021-03-12 14:39:03 +00:00
Solomon Peachy
555299af9f hosted: Consolidate the code that polls the battery charging status
affects all hiby targets, fiiom3k, and ibasso dx50/dx90

As well as deduplicating a small pile of code, this also implements
hysteresis so we're not doing a sysfs read/lookup multiple times
back-to-back every time the power management tick fires.

Change-Id: I2f7672acbb36341becf67e07960c24c681270d09
2021-03-10 18:29:29 -05:00
James Buren
0ba174789b usb_hid: switch Battery Strength to use feature reports
This means we will no longer send them routinely and instead rely on
the HID driver to send them when the host requests it. This also
moves the reporting out of the power management code where it probably
did not belong in the first place.

Change-Id: I9c8420e81897f1f6caaa55ffacc7525589f1ef75
2021-03-10 04:09:46 -06:00
James Buren
f647cde3c7 usb_hid: add support for Battery Strength
This allows rockbox to report its battery status through the
HID Battery Strength method that is available through the
Device Controls usage page.

Change-Id: Ia7a7dd9b9d476dd9df5a5f5becabc5ae823e9a89
2021-03-06 04:15:02 +00:00
Solomon Peachy
0f439bee99 ihifi: use STORAGE_WANTS_ALIGN rather than STORAGE_NEEDS_ALIGN
Change-Id: I39284194d19785e92ca641c85b03d31849b85ec9
2021-03-03 17:05:31 -05:00
Aidan MacDonald
74a3d1f5be Fix MIPS cache operations and enable HAVE_CPU_CACHE_ALIGN on MIPS
- The range-based cache operations on MIPS were broken and only worked
  properly when BOTH the address and size were multiples of the cache
  line size. If this was not the case, the last cache line of the range
  would not be touched!

  Fix is to align start/end pointers to cache lines before iterating.

- To my knowledge all MIPS processors have a cache, so I enabled
  HAVE_CPU_CACHE_ALIGN by default. This also allows mmu-mips.c to use
  the CACHEALIGN_UP/DOWN macros.

- Make jz4760/system-target.h define its cache line size properly.

Change-Id: I1fcd04a59791daa233b9699f04d5ac1cc6bacee7
2021-03-03 20:50:28 +00:00
Aidan MacDonald
aacb0811d9 Rename symbols of FiiO M3K Linux-based port
Mainly a straight replacement of FIIO_M3K -> FIIO_M3K_LINUX.

Change-Id: Id07c84f8150991d1b6851540c2c3f8f67e3f12c2
2021-02-27 23:53:28 +00:00
Solomon Peachy
02119357dc erosq: Enable HAVE_SCROLLWHEEL for saner scroll wheel handling
Basically no longer treat SCROLL_FWD/BACK as "button" events, instead
relying on the scrollwheel hooks to handle things properly.

Change-Id: I9bf18595ab3ca68e912f6dfb1f2eac2544578e73
2020-12-16 14:54:11 -05:00
Solomon Peachy
3027cead01 hosted: Improve buffer underrun handling in the ALSA driver
* Bump internal mix buffer size by 4x, to 1K frames (matching ALSA period)
 * Handle an underrun that occurs when filling the audio buffer
 * Log underruns and make them available in the debug info

Change-Id: I28d56dd35d88851fa167ad92368a5882937a758f
2020-11-18 14:38:12 -05:00
Solomon Peachy
9c68c69cf0 FS13257: Fix inconsistent defaults in the USB mode selection
Change-Id: I44894d13f070313ad326ce68018556573e35aad9
2020-11-16 17:11:38 +00:00
James Buren
c79ddb6bf4 iriver_flash: update valid bootloaders table
This removes all the pre-release bootloader of version 7 and
replaces them with production releases of version 8. The
pre-releases have their own problems and should be left
behind as they were never officially released.

Change-Id: If96531ba63cf4401d04133bda94735fe94ae4de1
2020-11-16 11:57:18 +00:00
Moshe Piekarski
3ef8455626
Remove some SWCODEC artifacts
Change-Id: I580522bc0ec3bc86c24400625d7d9cde2eea8fc8
2020-11-14 19:20:33 -05:00
Solomon Peachy
03cd773051 ibasso: Hopefully hack usb into building again.
Change-Id: I6f369d60319704ab4d2c18b80ba6e78902630790
2020-11-13 20:04:04 -05:00
Solomon Peachy
60f581e8f5 usb: Add ability to prompt user about what to do upon usb insertion
v3: Add in config option
 v4: Bugfixes
 v5: Force a redraw upon exiting
 v6: keypress-in-chargeonly mode enables mass storage (and vice versa)
 v7: Fix bootloader builds
 v8: Update manual, and have bootloader respect keypresses
 v9: Change default to mass storage (ie no change in behavior)

 todo:
  * test-build dx50/dx90
  * Switch from yes/no to proper menu?
  * prevent WPS progress bar from drawing over us

Change-Id: I82e0ccb08497b7a5aa756ce77f1332ee963703a7

...

Change-Id: I7946cf240b18a4fa8ace5e25e1eb6e97b8b12d7c
2020-11-13 16:44:01 -05:00
Solomon Peachy
388adff3cc pcm: Further cleanup of unused bits of the PCM ACPI:
* pcm_get_bytes_remaining()
 * pcm_calculate_peaks()
 * pcm_get_peak_buffer()

Nothing in-tree uses these at all (except for the lua plugin wrapper)

Change-Id: I971b7beed6760250c8b1ce58f401a601e1e2d585
2020-11-12 15:59:09 +00:00
William Wilgus
1a68856f52 Rocker Add WPS and Tree Hotkey, button codes in debug menu
VolUp+VolDown becomes the wps and tree (file browser) hotkey

Change-Id: I0cba96927420c318506bc0c15dabcb809cd81647
2020-11-12 01:22:32 -05:00
James Buren
4aa749b59d iriver_flash: refactor code to be easier to understand
This overhauls most of the code to be easier to understand in terms
of the interactions with the flash. I found the original to be rather
confusing with how it kept switching between byte and word offsets.

My solution was to make all external access to the flash in terms of
sectors and bytes. Whatever the flash uses internally is now handled
by the subroutines for performing the erase, program, and verify
operations.

This helps make it far more consistent for the code that actually uses
these operations as they do not need to concern themselves with word
sizes and offsets anymore.

As a side effect of this change the flash operations are now done
entirely by subroutines; even the batch operations that used to use
custom loops.

Additionally some functions were merged with other functions in order
to reduce the amount of functions as well as consolidating common
code fragments.

Change-Id: I4698e920a226a3bbe8070004a14e5848abdd70ec
2020-11-11 13:30:09 +00:00
Torne Wuff
5db83c155a pp5020: use ipod firmware timings for ATA PIO.
Some mSATA adapters seem to have trouble working with Rockbox using our
normal PIO timings; the timing value we use is probably out of spec and
is different to the OF. Switch to using the OF's timings according to
which PIO mode we select. This may not completely resolve problems with
these adapters but allows Rockbox to boot and play audio.

Change-Id: If73210700eb4af01864b373709ee1d15c775fb11
2020-11-04 03:03:19 +00:00
William Wilgus
611c18704c FuzePlus USB+screen dump overflows usbstack
Bump USB stack by 128 bytes

adds USB_EXTRA_STACK

Change-Id: I12839edbe889c878482081cf59fc6540384673ac
2020-11-02 21:38:13 -05:00
William Wilgus
60f642ba4f lcd_framebuffer bugfixes, sanity checks
several issues I saw that could pontentially cause problems
scroll engine doesn't take text height into account when checking bounds

NBELEMS was one whole row too large hopefully I got them right this time

Change-Id: If303da8320429c3964fc675351cb088d46303745
2020-10-31 01:11:30 -04:00
Solomon Peachy
fe2d52cc7d pcm: Get rid of pcm_play_pause() and associated APIs
Nothing in the core has used it for some time.  It's exported to the
plugin API but the last plugins to use it were switched to the mixer API
back in 2011.

This allows us to get rid of pcm_play_dma_pause() from all audio drivers

Change-Id: Ic3fa02592316f84963e41d792d1cabb436d1ff6b
2020-10-31 01:18:27 +00:00
William Wilgus
40e98a2e49 Whitespace cleanup on fb_viewport Rewrite
Change-Id: I24aac41c8abecf7b78a44d7f59e842b791be4563
2020-10-26 12:38:22 -04:00
William Wilgus
3237ae4a4f LCD core move buf ptr and address look up function viewport struct
I'm currently running up against the limitations of the lcd_draw functions
I want these functions to be able to be used on any size buffer not
just buffers with a stride matching the underlying device

[DONE] allow the framebuffer to be decoupled from the device framebuffer
[DONE need examples] allow for some simple blit like transformations
[DONE] remove the device framebuffer from the plugin api
[DONE}ditto remote framebuffer
[DONE] remove _viewport_get_framebuffer you can call struct *vp = lcd_set_viewport(NULL) and vp->buffer->fb_ptr

while remote lcds may compile (and work in the sim) its not been tested on targets

[FIXED] backdrops need work to be screen agnostic

[FIXED] screen statusbar is not being combined into the main viewport correctly yet

[FIXED] screen elements are displayed incorrectly  after switch to void*

[FIXED] core didn't restore proper viewport on splash etc.

[NEEDS TESTING] remote lcd garbled data

[FIXED] osd lib garbled screen on bmp_part

[FIXED] grey_set_vp needs to return old viewport like lcd_set_viewport

[FIXED] Viewport update now handles viewports with differing buffers/strides by copying to the main buffer

[FIXED] splash on top of WPS leaves old framebuffer data (doesn't redraw)
[UPDATE] refined this a bit more to have clear_viewport set the clean bit and have skin_render do its own screen clear
scrolling viewports no longer trigger wps refresh
also fixed a bug where guisyncyesno was displaying and then disappearing

[ADDED!] New LCD macros that allow you to create properly size frame buffers in you desired size without wasting bytes
(LCD_ and LCD_REMOTE_)
LCD_STRIDE(w, h) same as STRIDE_MAIN
LCD_FBSTRIDE(w, h) returns target specific stride for a buffer W x H
LCD_NBELEMS(w, h) returns the number of fb_data sized elemenst needed for a buffer W x H
LCD_NATIVE_STRIDE(s) conversion between rockbox native vertical and lcd native stride (2bitH)
test_viewports.c has an example of usage

[FIXED!!] 2bit targets don't respect non-native strides
[FIXED] Few define snags

Change-Id: I0d04c3834e464eca84a5a715743a297a0cefd0af
2020-10-26 12:28:48 -04:00
Moshe Piekarski
12f3ed1699 make the plugin API frambuffer agnostic
Change-Id: I5abdc231093054c517ff53b9a456997e440e3f6e
2020-10-26 12:28:48 -04:00
Solomon Peachy
845e5a4f03 sonynwz: A10 and A20 series support high bitrates
Change-Id: I6b33368ed5d7800b79dafbb736e6ed079accbd25
2020-10-26 07:42:48 -04:00
James Buren
c5d7cd5f9f h300: add support for ROM image generation
Change-Id: I6e0985de370609bae98ba6eab487bf43eb4191b6
2020-10-26 01:37:42 +00:00
Solomon Peachy
28b9c8bfeb rocker: Disable mute-on-pause, due to a platform kernel bug.
In short, the display fading back in after a pause resuming interferes
with the audio codec, causing BadThings(tm) that cannot be recovered from

This really is just avoiding a known trigger; there's no guarantee this
condition won't occur under random circumstances during normal use,
and there's no good way to work around this from within rockbox.

I suspect the underlying problem is that both the display control and
codec control share an i2c bus, but the kernel drivers implementing them
isn't using proper linux bus access/locking.

Change-Id: Id4f56f9cb269ed74aac2f041146b3630cef09030
2020-10-26 01:07:59 +00:00
James Buren
bde72efa30 coldfire: make the RAM and ROM image locations configurable by macros
Change-Id: Ie27e39c34947b0391be621dafb8711c44e863a1c
2020-10-26 01:07:14 +00:00
James Buren
129001909d h300: enable support for iriver_flash
This also modifies the configuration file to include macros
defined in the H100 / H120 implementation.

Change-Id: Iae845889c98661ec548c04fc57e733dcc346c0f1
2020-10-26 01:07:14 +00:00
Solomon Peachy
39a0d8bf86 x3ii/x20/rocker: Fix volume scaling.
Change-Id: Ie70d709b4c18f16cdd67aa05d9183b4ace2e66b4
2020-10-26 00:12:54 +00:00
Solomon Peachy
a8aa8403ad samsungyp: Enable recording feature. No idea if it works. :D
Change-Id: I48952f0551aaf1023f084e0be18354970d2492ed
2020-10-23 17:49:07 -04:00
Solomon Peachy
6834d1a02f xduoox20: Start unmuted, as the least-worst option
Change-Id: Ie85d9df0f861315dfc9d767218d86115420aa9d7
2020-10-20 17:07:48 -04:00
Solomon Peachy
6a94f1e995 sonynwz: Properly support multidrive, with hotswap of the SD card
Change-Id: I7eb8efb0986a395d5ffbcc06a54bb680e0b59e9d
2020-10-18 10:19:42 -04:00
Solomon Peachy
5f75c493e3 xduoox20: Remove a duplicate config option
Change-Id: Ieeacc8b42d2a4d1c647cfa3b0d00f90fe98af0ed
2020-10-17 22:52:48 -04:00
Solomon Peachy
b1e21bbd7a hosted: Consolidate common config of hiby-based units into a common header
* Enabled MULTIDRIVE and ROOTFS_HOTPLUG for full hotswap!
   (Requires updated bootloader/integration!)

Change-Id: I7dad1f8d375e087c36fce37bec3e9184602ede50
2020-10-17 20:45:41 -04:00
Solomon Peachy
d8d37ffdb8 Define a USB storage type, and hook it up for hosted targets
Change-Id: I56363c989139c7edf0b2c67b0aac9ef1adfacba2
2020-10-17 18:38:49 -04:00
Solomon Peachy
012908e064 hosted: Fix HAVE_MULTIDRIVE to work properly with PIVOT_ROOT
Change-Id: Ibc97de5c345e88c19ad8ba8c05fefebbada08790
2020-10-17 17:10:52 -04:00
Solomon Peachy
a68fc3b6c2 xduoox3ii/erosq: Fix CPU frequency declared in header
(108 MHz -> 1008 MHz)

Change-Id: I2baf416689e2afb68948609e226df8c5feeecc4a
2020-10-17 17:10:52 -04:00
Solomon Peachy
2e07223690 m3k: Fixes for the M3K.
* Cannot turn off the LCD directly (have to rely on backlight)
 * Only insmod/rmmod the usb gadget modules if state changes

Change-Id: I9ea90177d496cd035ada93e04a93a7c6f2e84706
2020-10-15 14:11:41 -04:00
Solomon Peachy
d544ce46a7 hosted: Unify the USB code for the hiby-based players.
* Specify exported USB VID/PID in target config header
 * Don't fail if the sd filesystem has already been remounted
   (ie due to platform hotplug)

Change-Id: Ifd2dae0c4f15086bf2bf89eb093018b3c4d2b75d
2020-10-15 10:18:16 -04:00
Solomon Peachy
1b449abf39 erosq: Add battery discharge curve and initial runtime estimation.
(playing mp3 with headphones inserted lasted just over 13 hours)

Change-Id: Id610f911811eafd914db20000ae860c75e0d8a93
2020-10-14 08:37:00 -04:00
Solomon Peachy
431caa4311 imx31: Work around an apparently not-quite-kosher abuse of CPP
(we were trying to foward-declare functions from within static
 initializer context.  GCC no longer accepts this)

Change-Id: I58f316ecc84c8ab45fffc054955727a55714b0a3
2020-10-13 15:48:31 -04:00
Solomon Peachy
e91f89a410 xduoox3ii: Update battery curve.
Change-Id: I2cc04d696631ba887fa8943d94360f902bf12e85
2020-10-13 16:01:55 +00:00
Solomon Peachy
078c34e951 hosted: More PCM muting work
* Track mute state, only call hw if actual change is needed
 * Don't unmute in audiohw_postinit()
 * sample rate tracking fixes
 * erosq:  Don't start up muted

Change-Id: I004f787a4b7ea73c16b6ec9818ec29a12c89f46b
2020-10-12 15:33:32 +00:00
Solomon Peachy
141e91ef1f Hosted PCM: Rework auto-muting code a bit
* If AUDIOHW_MUTE_ON_PAUSE, no meaningful change
     * Unconditionally unmute on playback start
     * xduoox3ii:  Mute on sample rate change
     * rocker/xduoo:  Stay muted after startup

    This avoids the nasty "pop" on startup, without doing
    the full mute-on-pause stuff that causes unacceptable
    dropouts on the X3ii.

Change-Id: I2e3ee0bb8094e288f37a0acada86a80016ce5cac
2020-10-12 13:40:37 +00:00
Solomon Peachy
e1bc36ca31 Turn on ROLO for M3K too
Change-Id: I7e1b2168a70605c5a138d83fd69e847fd02af4a4
2020-10-11 18:34:04 -04:00
Solomon Peachy
db6f21e295 hosted: sanitize handling of HOME_DIR
* HOME_DIR is now either "/" or special "<HOME>"
   * target-specific "home dir path" is defined solely by PIVOT_ROOT
 * PIVOT_ROOT path is now defined in toplevel config files
 * Make Samsung YP-R0/R1 and SONY_NWZ use PIVOT_ROOT too
 * Do not prepend PIVOT_ROOT path if the path already has it!
 * Do not play these games for __PCTOOL__ builds

Change-Id: I3d51ad902a5f9cafe45ba15ba654f30f1ec6113a
2020-10-11 17:47:34 -04:00
Solomon Peachy
2a471e288c New port: AIGO EROS Q / EROS K
The Q and K have a slightly different case, but the hardware under the
shell is completely identical.

These models are rebadged versions:

 * Hifiwalker H2   (== Q)
 * AGPTek H3       (== K)
 * Surfans F20     (== K)

Other notes:

  * Significant improvements in the shared Hiby-platform launcher/loader
    * SD card can theoretically be hot-swapped now
    * Support external USB mass storage!
  * Some consolidation of Hiby-platform targets
  * Some consolidation of plugin keymaps

Todo/known issues:

 * Keymaps need to be gone over properly
 * Convert to HAVE_SCROLLWHEEL?

Change-Id: I5a8a4f22c38a5b69392ca7c0a8ad8c4e07d9523c
2020-10-11 16:37:17 -04:00
Solomon Peachy
6533d983ca hosted: Add ROLO support for hosted targets
Change-Id: I2d46a63ee8225a9d9d77dd80a06c418af78c260c
2020-10-11 14:18:42 +00:00
Solomon Peachy
aabc8aca47 New port: FiiO M3K
Most credit goes to:  Roman Skylarov
Additional integration and refactoring by myself.

 *** COMPLETELY UNTESTED ***

Change-Id: Ia64c36d92e0214c6b15f7a868df286f8113ea27b
2020-10-09 12:41:18 -04:00
Solomon Peachy
4231c2c83f codecs: Add support for the 'VTX' ZX Spectrum chiptunes format.
This codec requires floating point.

Original author:  Peter Sovietov
Ported to Rockbox:  Roman Skylarov
Further integration and bugfixes:  Solomon Peachy

Change-Id: I781ecd3592dfcdbbc694063334350342534f1d6c
2020-10-09 11:39:25 -04:00
Solomon Peachy
914114fd21 FS13241: Get rid of the hacky hold switch emulation on the X3ii & X20
It doesn't work properly and interferes with the power button in the keymap.

Rework WPS keymap a bit to make single-tap power emulate lock.

Change-Id: I9d9b9b4adcea3764e6e427f484e051c9bab9d13b
2020-10-05 22:55:08 +00:00
Solomon Peachy
1916aca7f3 imx233: Enable 96/192K playback for all imx233 targets that have room
Change-Id: Ief00cc9243af3168f0c088520936137b64f3b581
2020-10-03 16:56:19 -04:00
Solomon Peachy
2b358ffa7f Disable 88/96KHz from targets that lack the IRAM to hold the mix buffers
Change-Id: I67b15d4c517a74a23639f8659acbc89022c264b5
2020-10-03 15:27:30 -04:00
Solomon Peachy
d4a620e85a alsa: introduce AUDIOHW_MUTE_ON_PAUSE, and have rocker use it.
Change-Id: I1edbb8e71a9c73baaeecb01b66cbee6c3f7b5f8f
2020-10-03 14:41:40 +00:00
Solomon Peachy
b5cb99a7bf For backlights that have a wide control, support skipping steps.
the rocker, x3ii, and x20 now take advantage of this, and fades
are far faster now.

Change-Id: Iceb1a5a6c1d1389c3fdb859b32016b5114a80a22
2020-10-02 02:45:43 +00:00
Solomon Peachy
f4f3255edf xduoox3: Work out clocks for 176/192KHz support.
Note:  PCM mix buffer sizes are _way_ too small for these high bitrates

(We really need to make the mixer stuff use dynamic buffer sizes based
 on the bitrate.  Maybe pre-allocate a max size based on upper bitrate limit,
 but use only part of it at lower bitrates?  So we can have sane latency..)

Change-Id: Id7b4afd73dba7f1ffb84b2e1c016859fae5d6835
2020-10-01 17:30:22 -04:00
Solomon Peachy
b030bf5885 xduoox3ii/x20: Proper lineout detection and volume mangling.
hotplugging hp and lineout works, without blowing out eardrums.

Change-Id: I2df5c7a618bb2d1d77d416548d45dff9cfc619db
2020-10-01 15:41:30 -04:00
Solomon Peachy
6d47dc9a88 fix some of the red introduced in e43726d
Change-Id: Id1abb0dd11f8a8e79a80fc54e58a5a22706a03ad
2020-10-01 12:55:52 -04:00
Solomon Peachy
e43726df2c hosted pcm-alsa improvements
* xduoo x3ii/x20:  Better line out support
 * less granular volume settings (too many steps before)
 * Better handling of swiching sample rates
 * Log actual sample rate in debug menu

Most credit goes to Roman Stolyarov
Additional integration [re]work by myself

Change-Id: I63af3740678cf2ed3170f61534e1029c81826bb6
2020-10-01 11:56:57 -04:00
Solomon Peachy
01650b8bc9 audio: Add support for 192 and 176KHz playback
* SAMPR_CAPS_ALL -> SAMPR_CAPS_ALL_48/96/192
 * All targets claiming SAMPR_CAPS_ALL now get appropriate subset
 * No need to explicitly define HAVE_PLAY_FREQ
 * Rates that are a multiple of 44 or 48KHz can be used for playback

Inspired by a patch by Roman Stolyarov, but substantially rewritten by myself.

Change-Id: Iaca7363521b1cb9921e047ba1004d3cbe9c9c23e
2020-09-30 21:37:11 -04:00
Solomon Peachy
ff408fd717 Leave HOME_DIR out of default recording and playlist paths
The hosted filesystem code will automatically prepend HOME_DIR.

Change-Id: I36a76e51637ab2bb68353f8eb9ffac25ca75bad1
2020-09-30 18:56:54 +00:00
Solomon Peachy
0fe7db2460 xduoo: x3ii and x20 also have their CPUs clocked at 1008 MHz.
Change-Id: I59fbd1edc934a6e2b2323e13b4efc3cc1caad903
2020-09-28 21:17:39 -04:00
Solomon Peachy
ae58b5aafe xduoox20: UI Simulator support
Change-Id: I2a03cea07fbad9fb5862ca69e4cfca2e8ca6b17f
2020-09-28 21:12:52 -04:00
Solomon Peachy
43980bb877 rocker: CPU is actually running at 1008MHz, not 532.
Change-Id: If5204574cb604d1ea82f0863d300468bedcf541d
2020-09-29 00:37:11 +00:00
Solomon Peachy
ec413f7692 jz4760: Heavily rework USB driver to add working DMA support
* DMA Bulk IN (ie our TX) results in sequential transfers 33-68% faster.
 * DMA Bulk OUT (ie RX) is mostly stripped out due to complete brokenness.
 * Interrupt and control endpoints remain PIO-driven.

Other improvements:

1) Use consistent endpoint references (no magic numbers)
2) Greatly enhanced logging
3) DMA support can be compiled out completely
4) Setting lockswitch will disable all DMA operations at runtime
5) Much more robust error checking and recovery

Change-Id: I57b82e655e55ced0dfe289e379b0b61d8fe443b4
2020-09-17 11:26:04 -04:00
Solomon Peachy
90a4f28c27 jz47xx: Audio path tweaks:
* Increase audio buffer size to better handle IRQ latency (256->2048)
 * Ensure DMA engine is idle prior to starting transfers
 * Set AIC to repeat last sample in case of underflows

Change-Id: I9c45c20481ee072e5882b7586fb7d50bd8ef2f35
2020-09-04 15:57:00 -04:00
William Wilgus
06e9abc428 XduooX3 Tweak LCD drive strength and slew
Change-Id: Ic5ee9e700a0c8acffc39b51cedc24ff44d230fd3
2020-08-30 17:26:43 -04:00
Solomon Peachy
3dc4f817de jz4760: Disable dynamic clocking entirely.
Back off to 480MHz [max] clock, bus/mem clock of 120MHz.

576 is unstable on at least one unit, and 528 still glitches.

Change-Id: I020e48532524e739f3bfa42bed570381ccd34959
2020-08-29 14:59:46 -04:00
Solomon Peachy
6296b220e5 cs4398: Change default volume to -25 dB (from 0 dB)
Change-Id: Iac216951b6f21bd83bb1d529e231bbb3e0aa0da6
2020-08-29 08:51:35 -04:00
William Wilgus
31a1a29004 Xduoo X3 Tweak LCD settings
Adds contrast setting which actually sets the drive voltage

Change-Id: I173238e2efe9e50c6ef4cda9bf991e7ee5568ff5
2020-08-29 04:31:37 +00:00
Solomon Peachy
fc7eb3b2a3 xduoox3: When not using dynamic clocks, use max cpu
Change-Id: I789bb4eccc5b663156f5d1b7cd5d291b60ccb18d
2020-08-29 02:53:06 +00:00
Solomon Peachy
a2b77446c2 xduoox3: enable HAVE_GUI_BOOST
Change-Id: I719057b3539d6fb80cef10238a13c5071def1be5
2020-08-28 21:16:24 +00:00
William Wilgus
5fb4c74bfb Xduoo X3 - Grey scale lib update
greylib on the xduoo x3 now matches the rest of the 1bit targets

Change-Id: I2685869da6734404356552cc9f4ed5f59ebd6650
2020-08-27 14:33:23 +00:00
Solomon Peachy
a52eb1d8cc xduoox3: Include curves for both battery types
There is no way to detect this at runtime so it is a user setting

Change-Id: Ibc5b87312238c59e3678d512af27e3a3bcb9a58a
2020-08-26 18:18:02 +00:00
Solomon Peachy
f791df1375 xduoox3: Update battery discharge curve and runtime estimates
(Brand new unit lasted one minute shy of 12 hours!)

Change-Id: I0330f43065412d432a45b555bb310f943eb526e7
2020-08-26 08:34:07 -04:00
William Wilgus
f850bbbbc4 Revert root_redirect :(
This reverts commit 31fc46ded6.

Change-Id: Ia78618c0e8b25ca65f7c8ae0db1cb9c9b321bad9
2020-08-20 21:54:00 -04:00
William Wilgus
5ef28cccf9 Allow mounting of any directory as the root directory.
Provide definitions for the macros:
* RB_ROOT_VOL_HIDDEN(v) to exclude certain items from the root.
* RB_ROOT_CONTENTS to return a string with the name of the
directory to mount in the root.

Defaults are in export/rbpaths.h

It's a bit much for those that don't need the full functionality.
Some conditional define can cut it back a lot to cut out things only
needed if alternate root mounts are required. I'm just not bothering
yet. The basic concept would be applied to all targets to keep file
code from forking too much.

Change-Id: I90b5c0a1c949283d3102c16734b0b6ac73901a30
2020-08-20 23:08:57 +00:00
Johannes Rauh
da190727e7 Enable boot from SD for Sansa e200
Change-Id: I0940f2cd5fc914d6d5061b5798b1a636009649b7
2020-08-19 19:17:01 -04:00
Solomon Peachy
4d9f190cab xduoox3: Fix build when disabling adjustable cpu freq
Change-Id: Ia8526ad81d7a9744972d9c4fb394e61175ad2391
2020-08-12 20:43:46 -04:00
Solomon Peachy
ae18cac2a9 Enable full sample rate sets for X3ii, X20, and Rocker
Change-Id: I89e139efb8a7662afaaabec360e6579907f8d025
2020-08-09 17:00:27 -04:00
Solomon Peachy
491b696669 Fix HOME_DIR path for Rocker, X3ii, and X20
Prevented plugins from accessing their config files properly

Change-Id: Ic3b115aaa9168fa30b98607aeacb1a12b5498a5f
2020-08-09 17:00:27 -04:00
Solomon Peachy
eb0e41c1cc jz4760: Support dynamic reclocking!
default/low speed is 192 MHz, Max is 576

Downclock PCLK/MCLK/etc to 96MHz to save a bit of juice

Honestly the high speed could be dialed down to, eg 384
as this thing is so bloody fast..

Change-Id: Ie65597c74290f1603e65f69dae8e75b59c8ba0b4
2020-08-07 11:42:45 -04:00
Solomon Peachy
89c7a4e393 xduoox3: Enable HAVE_PLAY_FREQ
This way the player can natively play back 48KHz audio

Change-Id: I1d525ec7cb5540062b9e13489d3b53479e68435f
2020-08-07 03:44:18 +00:00
Solomon Peachy
e0bb30a1bd xduoox3: Set PLL0 to 480MHz, not 492.
PLL0 Needs to be a multiple of 48MHz for sane USB operation!

(Indeed, "typical" clock for this part is 528, but that seems a
 waste of power)

Also fixes a minor bugaboo in the jz4670 usb divisor calculation
that won't matter until we enable reclocking

Change-Id: I40b1fd1ae48871e50885981ccc8b01feb711b9a5
2020-08-07 03:44:01 +00:00
Solomon Peachy
5d1d431b97 FS#9295: Detect external power supply for ipod 1st & 2nd gen (Mark Fawcus)
Change-Id: I7b64c37ead60152c8a12556cfa344e225abc1980
2020-08-06 09:28:28 -04:00
Solomon Peachy
658026e626 [4/4] Remove HAVE_LCD_BITMAP, as it's now the only choice.
Note:  I left behind lcd_bitmap in features.txt, because removing it
would require considerable work in the manual and the translations.

Change-Id: Ia8ca7761f610d9332a0d22a7d189775fb15ec88a
2020-07-24 21:20:13 +00:00
Solomon Peachy
8cb555460f [3/4] Completely remove HWCODEC support
'swcodec' is now always set (and recording_swcodec for recording-capable
units) in feature.txt so the manual and language strings don't need to
all be fixed up.

Change-Id: Ib2c9d5d157af8d33653e2d4b4a12881b9aa6ddb0
2020-07-24 21:20:13 +00:00
Solomon Peachy
0c4f89370d [2/4] get rid of HAVE_LCD_CHARCELLS
HAVE_LCD_BITMAP is now redundant.

lcd_bitmap is always-on in features.txt so manual and lang strings
don't have to change

Change-Id: I08eeb20de48099ffc2dc23782711af368c2ec794
2020-07-24 21:20:13 +00:00
Solomon Peachy
092c340a20 [1/4] Remove SH support and all archos targets
This removes all code specific to SH targets

Change-Id: I7980523785d2596e65c06430f4638eec74a06061
2020-07-24 21:20:13 +00:00
Solomon Peachy
2b9c85a41b storage: Clean up storage_xxxx macros when STORAGE_MULTI is not set
Change-Id: I1652eac1743f4b8b84da08ea5a6d04ac7e17e21d
2020-07-16 23:23:25 -04:00
Igor B. Poretsky
30fb53d47f Enabled hotkey for Sansa Clip players
Change-Id: Ic0fb331415bf0cc0fce5916befce64f4a41c46ee
2020-07-14 12:42:16 +00:00
Amaury Pouly
278a76b3a6 add some documentation in usb.h and usb_drv.h
Change-Id: Icd39ee5c017fc219144b33ef96b0df85c5d430da
2020-07-09 14:09:10 +00:00
Solomon Peachy
65a91333ef FS#12082: Add Tuner support to the Nano2G (Bertrik Sikken)
(The serial portions of the patch were already present, this just pulls
 in the tuner enablements)

Change-Id: I8090e318f34835769ac0a56d7a48b9250631eb4f
2020-07-09 13:24:14 +00:00
Solomon Peachy
c0276c8352 yp-r1: Fix some of the simulator build issues.
Change-Id: I167b801acaff9d36f3fd2fa57ba295d05816c60d
2020-07-07 18:34:28 +00:00
Franklin Wei
a65a341a00 button: allow disabling software poweroff
On some devices, the button driver allows a "software poweroff" by long-
pressing a certain key. This behavior is inconvnient when that button needs
to be held down for other purposes, such as moving the cursor in rockpaint
or sgt-untangle.

This patch allows selectively disabling the software poweroff (enabled by
default) from both core and plugin code.

Change-Id: I7580752888ae5c7c7c5eb1be5966e3d67f17d4b4
2020-06-27 13:27:40 -04:00