This is a partial revert of a79bdaf46
It caused all sorts of build breakages for misc stuff like the dbtool,
which doesn't include any per-target build directories
Change-Id: I493a33c1859706679972e47c96196223415985d9
They are nearly entirely generic wrappers around ALSA controls, unique
per target, and are ripe for further consolidation.
Change-Id: I05e4a450e3e89e03616906601c4f8fa46200dff5
Several hosted targets read their battery state from a fixed
sysfs path. Get rid of the duplicated code by handling this
common case in power-linux.c.
Some targets use non-standard units in sysfs instead of the
typical microvolts / microamps, so allow the scale factors
to be overridden by the target.
Change-Id: I31dc4ffc7a2d2c066d00a74070f9f9849c1663d0
Our decade+old defaults are reported to trigger a failure on
one user's IHIFI770c and IHIFI960, but work on their HM-603.
Backing CAS latency off from 2 to 3 appears to be sufficient.
What's interesting is that on paper, CL=2 should be easily attainable
due to our max RAM clock of 100MHz, well within the worst-case timings
of the EM639165 SDRAM.
So as an experiment, this code can go back to CL=2 when we change the
CPU+RAM clock speeds. IF this still proves problematic, it will be
removed.
Change-Id: I4a8cfa0563c076e7f25d9599a19b454f590861cd
The introduction of a debounce interval for USB
status by event (see e75a3fb), often resulted in the
FiiO M3K crashing after disconnecting from USB.
Shortening the interval to 10ms appears to fix this,
or make a crash much less likely at the very least.
Change-Id: Ibf1f02779ab1704d9b1c86d39b21648a3e2c4e9d
Creative ZEN lost it's time when shutting down.
The bug was introduced with commit 7f282b9280 (g#2601),
followed by e3f6e9d9f6 (g#2616).
I guarded all persistent register writes with wait loops,
as described in the datasheet.
TODO:
test SONY_NWZE360 and SONY_NWZE370 targets
Change-Id: Ib38ab8691fd1c6e8d0771c1e2eca20dfeb6fc87f
Despite the fact that CE-ATA specifies a minimum logical sector size of
4096 bytes, the low-level tranfer command arguments are specified in
units of 512 bytes. So scale the sector count up and the LBA down.
On CE-ATA devies, the partition table and filesytem is formatted with 4K
logical sectors, so this will be safe.
Change-Id: I959f21f9c72a68ac28aa611d06f8517ca77f0a8c
Default MMC block size is 512B, and the DMA block size must equal
the MMC block size. As we do not negotiate a larger block size,
scale the transfer count up to match the drive's logical sector size.
(CE-ATA mandates a *minimum* sector size of 4K)
Change-Id: I701cbac5c0fa320e8d38ea3333d99257b9b1f560
The DMA xfr size was fixed at 512 bytes, but the count was specified
in terms of the logical sector size (ie 4096 bytes).
Make the DMA size line up with the sector size.
Change-Id: Id9d0088b12775223f8d888f21b19e17c97927570
Show this in in the info dump when we can't find a filesystem to mount
in main() plus in the ipod bootloaders
Change-Id: I3b437ae0032b17f29c0dd94043743f14d2b2f3ad
The goal of this was to have the ipod6g's ata driver report
proper vendor/model information from storage_info()
Change-Id: I64c1aee87c817cac23c90e062333a4ba3545dfaf
Needed due to us commandeering the AUDIO DSP "channel" for USBAudio.
If/When we add another DSP channel, this can be reverted.
Works, but still goes to a "blank" WPS screen for a split second before
cancelling out.
Change-Id: I5fb8a1e226b4d3e46c86c59d593d807f49d7a35f
Does not seem to affect UI usability, but allowable DSP loads will vary
based on device and playback sample rate.
To-Do (someday):
- Add dedicated DSP channel
- How to apply DSP settings to above new channel? (UI)
- How to lock out timestretch from being enabled?
Change-Id: Ia24d1055340354e2c32e6008e7e2b03a8e88867d
Add feedback not based on samples used, but on buffers filled - idea
being we can do "PID" (someone who has actually implemented Real PID
could probably rewrite the calculation) based on how many buffers
we have filled versus the ideal buffer filled level (16).
Feedback is based on a historical average of the last two feedback
intervals.
This feedback math is done as fixed-point math to keep floats out of core. Note that a couple division operations needed to be strategically staged to avoid overflow or truncation.
Floats are still used for debug screen printout.
Also fixed a typo in the definition of usb_audio_control_request()
Host:
Linux: works
MacOS: works
Windows: Feedback does not work! It appears that Windows may not
support asynchronous devices at all. Playback may "work",
but results will vary as the number of buffers filled will
drift over time.
Change-Id: I027feb16705e6e46c1144b1d08920b53de42cb26
Original commit credit to Amaury Pouly, Moshe Piekarski
Pushed across the finish line by Dana Conrad
To enable, see setting under General Settings --> System --> USB-DAC.
On devices with few endpoints, this may not work while HID and/or
mass storage is enabled.
Adds new dedicated mixer channel.
setting usb-dac can have values:
- never (0)
- always (1)
- while_charge_only (2)
- while_mass_storage (3)
Relevant devices are DWC2 and ARC usb controller devices. That being:
x1000 Native targets (m3k, erosqnative, q1, others...?),
sansac200, creativezenxfi2, vibe500, ipodmini2g,
ipod4g, creativezenxfi, creativezenxfi3, sansaview, ipodcolor,
creativezenxfistyle, samsungypz5, sansafuzeplus, iriverh10_5gb,
tatungtpj1022, gigabeats, faketarget, samsungyh820, gogearhdd1630, samsungyh925, ipodmini1g, ipodvideo, creativezenmozaic, sonynwze370, creativezen, gogearsa9200, gogearhdd6330, sonynwze360, sansae200, mrobe100, iriverh10, creativezenv, ipodnano1g, samsungyh920
USB Driver-wise, it should be noted that this patch requires some
slight changes:
- proper blocking on control OUT transfers, to make sure the data is
received *before* using it, the usb_core should probably use that too
- drivers can now support interface alternate settings
- drivers can be notified of completion by a new fast handler, which
is called directly from the driver; this is is necessary for
isochronous transfers because going through the usb queue is way too
slow
Designware changes:
- enable for USBOTG_DESIGNWARE
- set maxpacketsize to 1023 for ISO endpoints
Change-Id: I570871884a4e4820b4312b203b07701f06ecacc6
Version 1: this patch prolongs startup time by 2 seconds, because the
sleep happens early before other threads have started.
The patch is tested on CreativeZEN and Fuze+.
The datasheet was not very helpfull, so some experimentation was needed.
I came to the following conclusions:
* setting HP to ground:
to prevent popping noises, the headphone output can be set to ground.
This however must be done before any part of the audioout module is
powered up (setting HP to ground itself will lead to a pop otherwise).
This consequently means that HP must NOT be set to ground for powerdown
sequence!
Further study showed that setting HP out to ground has no audible benefit,
controversly not setting/resetting allows for noiseless RoLo-ing.
* headphone amp class A/AB mode:
initially the HP amp is in class A mode, and should be set to
class AB before playing audio, as the datasheet mentions.
If the HP output is set to ground, it must be released BEFORE
setting class AB! Releasing from ground while in AB mode leads
to a very loud pop!
* release HP from ground:
as said before: never release the HP from ground if the HP amp is
set to class AB mode. Therefore the correct order is to power up the
headphone amp, wait some time, release HP from ground, and then
set the amp to class AB mode.
To prevent pop, some time is needed before releasing the HP from gnd.
On CreativeZEN 2 sec seems to be ideal; 1 sec have no audible effect,
1.5 sec softenes the pop to some degree.
* shutting player off
The popping noise when shutting off is much quieter that on power up,
so depopping measures are not absolutely necessary.
However the power off pop can be silenced by inserting a wait time
after the audioout block is closed and before the rest of the chip
is powered down. The longer the better, a time of 5 sec practically
eliminates the pop.
Note that RoLo-ing can still produce noise, because the audio device
is not properly shut down.
Change-Id: Ib20e1d613b346433d2a711c442e303ededc26e78
This commit adds new files written exclusively for the 3ds port.
Additional comments:
1. Plugins works, but will be enabled in future commits.
2. The port has only been tested on the New 3DS.
3. Not all features of rockbox have been tested so there may be bugs or non-functional features.
4. There is a known issue where a random crash can occur when exiting the app.
Change-Id: I122d0bea9aa604e04fca45ba8287cf79e6110769
This commit adds changes to the original rockbox sources.
Note: the port files, functions, folders, etc., will be referred
to as 'ctru' to avoid using the Nintendo name elsewhere.
Change-Id: I0e2d3d4d2a75bd45ea67dc3452eb8d5487cf1f5a
Added lcd inversion
Fix issue where backlight would turn on before first frame rendered
Fix issue where backlight would shortly appear at 100% before PWM is
ready during fade in
Turn off backlight before booting/RoLo/shutdown to avoid it being
enabled on next boot
Fix issue where fade in isn't smooth because brightness levels below 13 were
basically equalivent to off, by removing these brightness levels
Change-Id: I868eae2cbeea52c6af7d09c886958ff46167fe26
Simulators (and some hosted targets) no longer get a free pass!
This commit includes general fixes for simulator builds, but it
will undoubtedly result in many more warnings that need to be properly
fixed.
Change-Id: I6bb9d3fc4a29ccfe40366c438e058b5dfff0ddc3
Leading spaces in particular were resulting in Linux warnings/panics, but
to be safe strip out all spaces, including those in the middle.
This was noticed on an ipod6g with the stock hard drive; it reported
a serial number of ' xxxxxxxx', which is technically legal
per ATA specs, but needs to be properly trimmed.
Change-Id: I34309fe64b341caefd5b18f6d0cf539cb97d4a38
Setting the last_volume_change time was moved here in
commit 2e08b0f82e ("sound: update global volume state
in sound_set_volume()"); however this also triggers the
%mv tag on boot, as if the user was actively changing
the volume.
Move the last_volume_change update back to the original
call sites to fix this.
Change-Id: I895112cea4315f194f67c27839f1082d67c1ffa9
Instead of calling sound_set_volume() and then manually
setting global_status.volume to match, update the global
volume state directly in sound_set_volume(). This makes
things a bit simpler and less error-prone.
Change-Id: I4db4d60ae1a72bd051ef49c90b1ae7f5ba59e535
Basically use proper register names instead of magic values.
PP5002-based ipods (ie ipod1g-3g) use UART1 to drive the piezo vs
PWM of the newer models.
Change-Id: Ia333717a825ac6a0ebf43850fc31fca34178dd88
ata-creativezen looks like a legit memory-trashing bug, the rtc fixes
are bitwise inversion of a bool, and the remaining are just unused
static variables.
Change-Id: I1a818d4839cd3a54ca6e85f26feb743a4a9d29dc
Therefore, turn on MAX_VARIABLE_LOG_SECTOR so we can support 512B and 4K
sector sizes. Additionally, correct the interpretation of identify info
word 106 in CE-ATA mode.
Change-Id: I24dc7dd4a8617fcb60ed87c0c1be98d00dbdfa30
Unless you've modded the device with modern CF or mSATA storage, it's
not likely to achieve anything. the original hard drives (supposedly)
lack SMART support, and none of the SD adapters bother to emulate it.
Change-Id: Id3cbe717c64947faf4b23d8c84a04b822cfb35da