The driver can now handle HOLD in several ways, including using a GPIO.
Also add a debug routine to read the raw value of the adc.
Change-Id: Ide2cb1ac58e759b4bc464e606b432f2c150ee36f
Many imx233 targets boot in a very low performance mode, typically cpu and
dram at 24MHz. This results in very slow boots and very unstable USB
bootloader mode. Since cpu frequency scaling is disabled in bootloader in
rockbox, always make the frequency scaling code available and boost at boot
time.
Change-Id: Ie96623c00f7c4cd9a377b84dcb14b772558cfa4d
Even with volume at minimal fuze+ was still playing sound pretty loud.
this fix it.
Change-Id: I5b18e9c39ced240eebb0457c433b0ca150668860
Reviewed-on: http://gerrit.rockbox.org/621
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
This one is a bit strange: our codebase just don't use it if there is both
SD and MMC, so this missing function got unnoticed so far.
Change-Id: Ifea4bb5140477b7637d033737594259cc44fb10e
The i2c core has some bugs: it locks up when the slave doesn't NAK and
prevent the dma channel from being resetted. Specifically handle this
situation by setting CLR_GOT_A_NAK (workaround) and then reset dma and i2c
block.
Change-Id: I0e09d38d4301a0ad42dfad785cc934b43f2c4485
Target that have a touchpad/touchscreen should disable it while
being locked (In order to avoid LCD to drain battery power due to
"key locked" constant reporting messages. If they a have a keylock
button this was already handled at driver level. If not (e.g. fuze+),
they will have to implement a switch at driver level that action.c
can operate on softlock.
This patch does the following for any target having a touchpad
or a touchscreen and no HAS_BUTTON_HOLD (ie any softlock target)
1) it implements the code to call button_enable_touch(bool en) in
action.c.
2) button_enable_touch is implemented in button.c and call
either touchpad_enable or touchscreen_enable
3) those two function are implemented respectively in touchscreen.c
and a new touchpad.c file. They provide a generic way to silents touch's
device and call a function at driver level where target specific code
can be implemented if possible/needed (for power saving for instance).
Those function name are touchpad_enable_device and touchscreen_enable_device
4) we implement an empty function at driver level of targets that need it
to have them still being able to compiled.
Change-Id: I9ead78a25bd33466a8533f5b9f259b395cb5ce49
Reviewed-on: http://gerrit.rockbox.org/569
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
Drop most of the cases: only keep 64 MHz and 133 MHz. Pick values
from the manual which seem to match real life values.
Change-Id: I912752fbe372f9f44207db6853d0ff92fd619bed
Now that the drive strength problem has been fixed, we can safely
drive sd cards at 48MHz in HS mode to get the best possible
transfer speed at 3.3V.
Change-Id: I0291589c399fb4880deba97895ff578451a32f99
Instead of going back and forth between TRAN and STBY modes,
stay in TRAN mode all the time, this avoid two commands on each
read/write and a potential delay to wait for the card.
Change-Id: Iafd456ab9a581d870331b622eeb48dcc254eda7f
This allows tells the card the number of blocks that will be
transfered. This is usually faster than continuous read/write.
It is mandatory for MMC and on SD cards, support is probed.
Change-Id: Ide3f97c26c2b714390884c69e05b00c2caa552f8
The old max dma transfer size was set to 2^15 because allowing
values up to 2^16 would result in overflow of the transfer count
in many places. This was a problem with the old register headers
because the macros didn't make sure the result is contained in
the bitmask of the field. The new macro do so 2^16 will actually
end up being 0 which means 2^16 for the hardware. This is kind of
hacky but it works and I prefer that this stays a power of two
because setting it to 2^16-1 would be extremely weird.
Change-Id: I9ce5661c477a79ab52efd5c573948e2353117804
- take advantage of the new rmi power function implemented to:
1) lower usual power_mode to low_power as it seems to be enough and might save
some battery
2) implement a system that lower that state to very_low_power
after 1 minute of inactivity.
3) implement touchdev_enable(bool) that can be use later to disable the
touchpad when needed
4) improve the debug screen report of the current power state and
changing the power state using volume keys
Change-Id: I0b372696d4b2bef5360c778d0500870fd9badee1
Reviewed-on: http://gerrit.rockbox.org/525
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
When using variadic macros there's no need for IF_MD2/IF_MV2 to deal
with function parameters. IF_MD/IF_MV are enough.
Throw in IF_MD_DRV/ID_MV_VOL that return the parameter if MD/MV, or 0
if not.
Change-Id: I7605e6039f3be19cb47110c84dcb3c5516f2c3eb
The code was broken in a subtle but crucial way: storage idle
callbacks are oneshot so after the first flush everything would
stay in the buffer forever and would never be written to the disk
thus resulting into many events being lost. This changed correctly
registers the idle callback each time the buffer is not empty.
Note that the idle storage code checks if a callback
has is in the queue already so we don't register twice.
Change-Id: Ifdf331d4b757e05b8a6902bf5926cbc7689f5109
Implement standard values and functions to operate on power control
register. This allow to modify both reporting rate and sleep mode
in order to save power.
Change-Id: I2bdffd4160e10eec488eb5e19de8a2a258ddbb04
Reviewed-on: http://gerrit.rockbox.org/529
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
Using a better resolution causes havoc in the user interface
because it doesn't properly handle steps and people start to
believe I am responsible for all this mess.
Change-Id: I02b68dce5802692efde3da226eeeb49e4995f97a
These nearly identical files are multiplying like rabbits as PP targets
are added and make SoC-related changes a PITA. Just include the master
.lds file from the target one as was done for bootloader USB.
Change-Id: I65e9e653030f0688b1728e32ada16abf2932e029
* Remove explicit tracking of elapsed time of previous track.
* Remove function to obtain auto skip flag.
* Most playback events now carry the extra information instead and
pass 'struct track_event *' for data.
* Tweak scrobbler to use PLAYBACK_EVENT_TRACK_FINISH, which makes
it cleaner and removes the struct mp3entry.
Change-Id: I500d2abb4056a32646496efc3617406e36811ec5