Commit graph

9849 commits

Author SHA1 Message Date
Amaury Pouly
94f2bc7473 sonynwze360: fix color swap
I found the BGR bits in the lcd registers by trival and error.

Change-Id: Ib263611e827e8671a0128242b947d76911bd9f47
2013-09-26 16:41:57 +02:00
Amaury Pouly
f37f3393c9 sonynwze370: fix simulator
Change-Id: I23cd8ce8549119868011e2a05341f3cb6335fad6
2013-09-26 13:22:45 +02:00
Amaury Pouly
ddf56a102b sonynwze360: fix simulator
Change-Id: Ib63d5aceeafb1078013599616cb6dcec3a2b8598
2013-09-25 18:22:26 +02:00
Amaury Pouly
e41d2ba02b imx233: only clear got_a_nak on imx233, it doesn't exists on other stmps
Change-Id: I88e369dd7fa289f054837b442983bb7c97a58c53
2013-09-25 16:36:41 +02:00
Amaury Pouly
9392d036c4 Initial commit for the sony NWZ-E360 and NWZ-E370
Change-Id: I52d21e136a98eaf481615d641795cf7ecf325465
2013-09-25 14:31:39 +02:00
Amaury Pouly
b181c4963e fix whitespace
Change-Id: I569dba9c172ec3927cf8a26ee4e58e189addc728
2013-09-25 14:31:39 +02:00
Amaury Pouly
5909438193 imx233: improve button lradc driver
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
2013-09-25 14:31:39 +02:00
Amaury Pouly
2f5f2ba91d imx233: always boost in bootloader
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
2013-09-25 14:31:39 +02:00
Jean-Louis Biasini
89afa32584 fuze+: fix volume bottom limit
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>
2013-09-18 23:09:44 +02:00
Amaury Pouly
b4c1bb0214 imx233: fix block reset code
Change-Id: I5fbc76315a651c91b278e1c7dc6cb49b7e00d9ad
2013-09-18 13:17:19 +02:00
Amaury Pouly
90007da3e9 imx233: implement mmc card info
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
2013-09-07 00:53:21 +02:00
Amaury Pouly
070e27933c imx233: fix red when target cannot record
Change-Id: Ia5f6b290da2f645021ef8becdfbac7436407ec0b
2013-09-07 00:52:36 +02:00
Amaury Pouly
a1e557bbdd imx233: fix horrible sd/mmc bug
The wrong variable was used to enumerate mmc drives. Also fix incorrect
function prototype.

Change-Id: Idd8dca7685bbc2bc4744b7b29e948f0ca2f56cc9
2013-09-06 18:22:34 +02:00
Amaury Pouly
4be366f4b0 cosmetics
Change-Id: Ia2b334ad9dd3f465ad5024e6fc226cb3e60a6e45
2013-09-06 18:22:02 +02:00
Amaury Pouly
74ed592b39 imx233: fix lcdif (don't send anything on empty buffer)
Change-Id: Ic39b2117b24d84452bb6f7b9c410b1cf55066b6d
2013-09-06 18:21:35 +02:00
Amaury Pouly
164876eaf1 imx233: fix i2c issues
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
2013-09-06 18:19:09 +02:00
Amaury Pouly
f13cad4c8e imx233: cleanup lradc button driver
Change-Id: I85fbe6807a1f91ae5be97b6847c07b24a4f18c24
2013-09-05 23:16:19 +02:00
Amaury Pouly
1ac762aebb fix red
Change-Id: I9eb83aaffa93636d5e601132efdfbb85340a665d
2013-09-05 20:50:51 +02:00
Amaury Pouly
1165a08823 fix red
Change-Id: Ibca5879553a87e77014f850308d9b54cc339d474
2013-09-05 20:35:51 +02:00
Jean-Louis Biasini
df6eb82f51 touch devices: Disable touch on softlock.
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>
2013-09-05 20:02:07 +02:00
Amaury Pouly
b63b330775 imx233: revert sd card high speed (unstable)
Change-Id: I3d6a20de4ea1ca0d0150e6b4fc6af849eda0f4ab
2013-08-22 23:46:29 +02:00
Amaury Pouly
92725394eb imx233: always set VDDIO to 3.3V
On some device like Creative Zen X-Fi2 it is set to 3.1V on boot.

Change-Id: I1f9e407eb321c31b3109b7fed07862400073b54f
2013-08-22 23:44:15 +02:00
Amaury Pouly
96125e84f1 imx233: disable half fets on boot
This might cause freeze if the power supply is not able to cope
with the demand

Change-Id: I231142327fcad2096c18d3c8872ac8b6ee24f69c
2013-08-22 23:43:25 +02:00
Amaury Pouly
fb35f06bf5 imx233: rework emi frequency scaling
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
2013-08-22 23:42:26 +02:00
Amaury Pouly
902306378e imx233: add support for 50MHz clock with SD cards
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
2013-08-21 20:18:36 +02:00
Amaury Pouly
96d355abba imx233: fix drive strength for sd/mmc
At high speed, we need a drive strength of 8mA on the clock line
to get stable transfers.

Change-Id: Ida668db10cd3e10ad5740e35fd973f2fa394edb2
2013-08-21 20:18:36 +02:00
Amaury Pouly
462adf2a0f imx233: always keep cards in TRAN mode
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
2013-08-21 20:18:36 +02:00
Amaury Pouly
e90a5efe54 imx233: add support for CMD23 in sd/mmc
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
2013-08-21 20:18:36 +02:00
Amaury Pouly
9a58721974 imx233: rework yield management for wait state, didn't make sense
Change-Id: I5ecb1afb5461018c2c9675d5f4ee1c6e4ded636d
2013-08-21 20:18:36 +02:00
Amaury Pouly
6d7734649d imx233: increase max dma transfer size
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
2013-08-21 20:18:36 +02:00
Jean-Louis Biasini
8d2e4f9b7d [Fuze+][Touchpad] Improve touchpad power managment
- 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>
2013-08-19 13:37:57 +02:00
Michael Sevakis
a56f1ca1ed Cleanup MV/MD macros a little.
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
2013-08-17 12:18:22 -04:00
Amaury Pouly
c13f21a4d5 Fix logdisk
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
2013-08-16 21:59:16 +02:00
Amaury Pouly
630a166a94 fuze+: fix radio power up
Change-Id: I7c9e056879c56f7f385ef6a8855d5726cf994b51
2013-08-16 17:23:41 +02:00
Bertrik Sikken
b662e3a2dc Fix response length calculation for SCSI_REPORT_LUNS
Change-Id: I1167851bae20d9275eb2f441ce9dc73c8b2f09b1
Reviewed-on: http://gerrit.rockbox.org/488
Reviewed-by: Frank Gevaerts <frank@gevaerts.be>
Reviewed-by: Bertrik Sikken <bertrik@sikken.nl>
Tested-by: Bertrik Sikken <bertrik@sikken.nl>
2013-08-12 10:48:35 +02:00
Amaury Pouly
737dafe7df Revert "rk27xx: implement usb driver"
This reverts commit 310f9e068d.
2013-08-11 19:21:24 +02:00
Marcin Bukat
310f9e068d rk27xx: implement usb driver
Change-Id: Iee3036944652fd6431d3177ab619e5df1f9bd44c
2013-08-06 21:27:46 +02:00
Jean-Louis Biasini
be72c4f2bf [RMI Driver] Implement power saving support
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>
2013-07-29 14:28:24 +02:00
Marcin Bukat
49bcf35309 usb stack: add more verbose debug logf()s
Change-Id: I087aefd2854978813c7e4ed7ef7da400f3692e39
2013-07-24 23:17:13 +02:00
Amaury Pouly
074e911859 usb_storage: make it a bit more correct
Add stall when unknown SCSI command is hit

Change-Id: Icbeea905cd262ab296fb34470e54c665b8bab488
2013-07-24 23:16:56 +02:00
Amaury Pouly
21c5ffe09a usb_core: rework handling of clear feature
Change-Id: Icb1e973aa5fd8520eff0796aa8164e0a988d9107
2013-07-24 23:16:38 +02:00
Amaury Pouly
c4f2a46e0d imx233: revert volumes to 1dB resolution
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
2013-07-23 14:12:08 +02:00
Michael Sevakis
9faabb98d4 Fix d2249dc errors
I wonder why it didn't cause more mayhem.

Change-Id: I4a585367d650417b4be3af2a0fe6235d8066c895
2013-07-19 08:37:40 -04:00
Michael Sevakis
d2249dce6f Combine PortalPlayer .lds files into one for app and boot.
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
2013-07-19 08:18:16 -04:00
Amaury Pouly
47785ca7f9 fuzeplus: add touchpad sensitivity
Change-Id: I0252c0967716a4f1a628191dcde7ffc80279370b
Reviewed-on: http://gerrit.rockbox.org/515
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-07-15 18:41:32 +02:00
Michael Sevakis
023f6b6efd Get rid of some superfluous single-purpose functions in playback.
* 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
2013-07-13 00:08:51 -04:00
Amaury Pouly
d85f796890 imx233: fix debug screen keys for the zen x-fi3
Change-Id: I81cfb25d3bd6ff8ec43c64a9f55e1b7bd0ee1473
2013-07-13 03:02:41 +02:00
Amaury Pouly
1a7bf7b91c imx233: fix debug keys for zenxfi2
Change-Id: I535fb611f951244686c60f336a49e068edfaf96a
2013-07-13 02:52:47 +02:00
Amaury Pouly
bbe94e2b24 imx233: fix audio debug screen
Change-Id: Iaadd43a28907ebd425a0b7199f067a4fab8e9653
2013-07-13 02:42:17 +02:00
Amaury Pouly
8c91d05543 imx233: add audioin debug info
Change-Id: Iba6e2b720489c1d2178a44a0a4fe5df2a7540579
2013-07-13 02:42:17 +02:00