Commit graph

3929 commits

Author SHA1 Message Date
Lorenzo Miori
d2875fc773 This patch adds RDS capability to Samsung YP-R0 target.
Uses register polling method to decide when it's time to decode
RDS packets.

Change-Id: I1d3cc995ea3350ec7b101438b8f2027130d4a4c9
Reviewed-on: http://gerrit.rockbox.org/320
Reviewed-by: Lorenzo Miori <memorys60@gmail.com>
Tested-by: Lorenzo Miori <memorys60@gmail.com>
Reviewed-by: Thomas Martitz <kugel@rockbox.org>
Tested-by: Thomas Martitz <kugel@rockbox.org>
2012-10-06 23:00:36 +02:00
Andrew Ryabinin
548dcc3c6a hm60x/hm801: Fix blinking white screen.
Change-Id: Ia435616872d5d4adb117d507bdb135bccf083b05
2012-09-27 22:00:58 +04:00
Andrew Ryabinin
82d882e1e2 Fix type cast for LCD_BUFF.
We should cast to (volatile uint32_t*) here, because attempt to refer to volatile
object through use of an lvalue with non-volatile-qualified type will result in
undefined behavior.

Change-Id: I1b2e9688af11d3dcba518a5e31865d703b54b635
2012-09-27 14:26:47 +04:00
Andrew Ryabinin
84134f737f rk27xx lcd code rework
Use DMA engine for fullscreen updates and bypass mode for partial
updates. This gives major boost on rk27generic:
default ARM:AHB:APB 200💯50
HEAD    1/1:  26.3fps 1/4: 105.0fps
patched 1/1: 116.5fps 1/4: 249.5fps

with freq scalling NORMAL mode ARM:AHB:APB 50:50:50
HEAD    1/1:  13.1fps 1/4: 52.5fps
patched 1/1:  54.5fps 1/4: 119.0fps

Tested on rk27generic noname DAP and on Hifimans.

Change-Id: Id9dd4d2d61542c7ea6b5c6336b170d6357cefde9
2012-09-27 09:42:44 +02:00
Marcin Bukat
72ebcbf73b rk27xx: Fix commit_discard_idcache()
This version resembles how OF handle cache invalidates.
This seems to fix mysterious data aborts on plugin/codec loading
after introducing frequency scaling.

Credit goes to mortalis for pinpointing the reason of aborts.

Change-Id: I3477b3f65d593d7b43c36a0b06d863f71f000812
2012-09-19 20:44:36 +02:00
Amaury Pouly
49cded1704 imx233: properly disable frequency scaling for now
Change-Id: I3d700762a7f46e82ac99fed03e1aa9448b6cba47
2012-09-04 20:25:46 +02:00
Marcin Bukat
072badeafb rk27xx: Put some nand handling functions for reference
The functions document my reverse engineer findings about nand
controller. This code is commented out and is purely for reference
as FTL scheme is still unknown.

Change-Id: I70edeb4bfb0cbd51b6adc15afa7193dd8f71e8da
2012-09-04 09:48:48 +02:00
Amaury Pouly
a1b101b107 imx233: disable cpu frequency scaling
Frequency scaling seems to be unstable and causes the device to
freeze. It is unclear why at the moment, perhaps we need to ramp
up the vddd voltage to avoid a false brownout ?

Change-Id: I7aaea9d7c213922a65250fe50775fb785d430226
2012-09-04 00:35:58 +02:00
Amaury Pouly
c8e7964e81 imx233: more consistent debug screen
Change-Id: Ia6a869ec22734f95af2b453e01471b0656b7a273
2012-08-31 23:32:16 +02:00
Amaury Pouly
3a1ba755c6 imx233: fix auto slow divisor
The divisor must be set only when auto-slow is disabled.

Change-Id: I31ed94f43a7c9deb80275dc73f8e3c78463b54c0
2012-08-31 01:24:51 +02:00
Amaury Pouly
ee21359437 fix comment
Change-Id: I3a20b30e5707e98ffd5dfe3d0f267c5b2d4e7753
2012-08-31 01:06:57 +02:00
Amaury Pouly
4faaca13ca fuze+: use safer battery shutoff and dangerous levels
Change-Id: I68258828afd3021bab2067e5af0a5dcd2d44de04
2012-08-31 00:56:55 +02:00
Amaury Pouly
d6732a1a9b fix comment
Change-Id: I9eaa21ecfafda9679b4aa1a3d15fa7a550b48876
2012-08-30 23:13:35 +02:00
Amaury Pouly
8723132aaa fix red
Change-Id: I1ee070291d70b2e30ac2096aa8b3b89e6fcdeff1
2012-08-30 21:17:34 +02:00
Amaury Pouly
16dc22f2be fix red
Change-Id: I6bc5fd019160b05f48c9a65639e1025899651f1e
2012-08-30 21:13:28 +02:00
Amaury Pouly
13912fa1de imx233: fix clktrl auto slow function
Change-Id: I6c004836562b0605530ac334434b17afa89ebad5
2012-08-30 20:57:42 +02:00
Amaury Pouly
c9ad8688f1 imx233: implement basic frequency scaling and enable auto-slow
This does not scale the EMI frequency and keep the processor
betweel 261MHz and 454MHz. It can still be improve. The auto-slow
divisor could still be change, 8 seems reasonable for now

Change-Id: I639bb3f6b7f8efedc7dc58d08127849156eeb1b6
2012-08-30 20:56:39 +02:00
Amaury Pouly
6c2190ea04 fuze+: battery calibration
Change-Id: Iaaca5caa35b9624d8dd9ea14eabde24c5667e892
2012-08-30 20:40:13 +02:00
Amaury Pouly
7ff78c4ccb imx233: fix compilation of sdmmc for non-mmc targets
Change-Id: I0f61d0ca8e385fbfeaba53b81c3320b24aa61ab9
2012-08-30 17:28:13 +02:00
Marcin Bukat
722e24a76a rk27xx: implement frequency scalling
Implemented scheme:
        ARM AHB APB
Normal   50  50  50 MHz
Max     200 100  50 MHz

Frequency scaling is disabled on rk27generic due to too
slow lcd updates when running with 50MHz AHB.

battery_bench shows ~1h runtime improvement on hifiman.

Change-Id: I2c6f8acf6d4570c4e14f5bcc72280b51ce13c408
2012-08-30 13:50:36 +02:00
Amaury Pouly
417da66bb3 fix yellow
Change-Id: I798826c8240fa9ce5a87cb0443002ca1b8882922
2012-08-30 01:16:45 +02:00
Amaury Pouly
7ee1e30609 imx233: add regulator api
Remove the old debug stuff about VDDx and add a clean api to
get/set the regulator (VDDD, VDDA, VDDIO, VDDMEM). This is useful
for proper frequency scaling.

Change-Id: Ia5a1a712fd66652a8ad9601ed00db31aba5a7561
2012-08-30 01:10:36 +02:00
Amaury Pouly
51f63f0b2a imx233: fix header, add emi function
Change-Id: I1030e94f0dad4b66646cafa20b61df8a5c7f9278
2012-08-30 01:10:36 +02:00
Amaury Pouly
c9b4b4ea7b imx233: fix idle storage notification for sd/mmc driver
Change-Id: Ia70a0058f0e86824e2b0d74d12e369295629eb5a
2012-08-30 01:10:36 +02:00
Marcin Bukat
2b6886d107 rk27xx: Turn off lsadc clock when not in use
Change-Id: Ic3f29e75aa5b894f17e289263a370fac13e2f1d8
2012-08-27 23:32:23 +02:00
Marcin Bukat
ae27c331e1 rk27xx: Turn off i2c clock when not in use
Change-Id: Ifc6c25a53ace1a5f4d716a33d4979ea0a37fac98
2012-08-27 23:18:31 +02:00
Amaury Pouly
4d8c5e59e7 imx233: sdmmc driver enhancement
Implement cache aligned transfer of more than one sectors. The
current code now transfers almost all data at once by moving
it within the buffer to make it cache aligned. This greatly
improves the performance of the transfers, especially in mass
storage mode.

Change-Id: Ic6e78773302f368426209f6fd6099089ea34cb16
2012-08-23 15:06:45 +02:00
Amaury Pouly
06aa7e83a9 imx233: remove debug panic
Change-Id: I7b6bf2bcac31ff65ae17f4a833587f4a5c9e6d7a
2012-08-21 16:30:13 +02:00
Amaury Pouly
41bf9ebc89 imx233: simplify sd/mmc driver
Further merge drivers by using the same command and data functions.
No use one mutex per drive instead of a global sd lock. Fix the
RCA handling which was different between SD and MMC (shifted 16)
and thus confusing. Add MMC commands definition to the mmc.h
header similarly to the SD one. Change MMC handling a bit by
selecting/deselecting on each transfer like SD, which allows
for several MMC devices in theory and is more uniform.

Change-Id: I7024cb19c079553806138ead75b00640f1d2d95c
2012-08-21 16:28:36 +02:00
Amaury Pouly
4908b8eb1c imx233: merge sd and mmc drivers, fix dma issues
Merge sd and mmc drivers into a single sdmmc driver. This allows
some factoring of the code and simplify bug fixing. Also fix the
dma/cache related issue by doing all transfers via a correctly
aligned buffer. The current code is not smart enough to take
advantage of large user buffers currently but at least it is safe!

Change-Id: Ib0fd16dc7d52ef7bfe99fd586e03ecf08691edcd
2012-08-18 18:24:42 +02:00
Amaury Pouly
4604e984e8 imx233: rework i2c driver to fix dma issues
There are tricky DMA/cache related issue on the imx233 which could
pop up with the old driver. The new one ensures that all dma
tranfers are cache safe by using an intermediate buffer.

Change-Id: I72060682d1c285c83ae16455cfdb62f372b5d687
2012-08-18 15:38:43 +02:00
Amaury Pouly
246c2127a7 imx233: small dma changes, update debug screen
Reduce DMA maximum transfer size since transfering 64Kb requires
to set a size of 0 and it's not worth adding checks everywhere
to handle this special case. Also add statistics about unaligned
transfer (wrt to cache). Update debug screen accordingly and
simplify it so it can fit smaller screens too.

Change-Id: I18391702f5e100a21f6f8d1ebab28d9f2bd8c66f
2012-08-18 15:22:51 +02:00
Amaury Pouly
51919937a9 imx233: fix comment
Change-Id: I86d6e61a497780a9e22ea16075b055c3d7455630
2012-08-18 14:55:41 +02:00
Amaury Pouly
ce54e747dc imx233: fix style
Change-Id: I45813d1f34aff74c6b88c84bae6c0feeb4422ed7
2012-08-18 14:55:41 +02:00
Michael Giacomelli
b61b14f5e8 Revert my previous commit disabling the internal ROM clock during normal
operation.

The interal ROM clock seems to be needed to reboot the player, so disabling
it is too dangerous.  Hopefully this will prevent problems where crashes during
the abort handler resulted in a stock player that needed the battery to drain
in order to reboot.

Change-Id: I7d1e64743dde15b64d718ad3255dada3d570736f
2012-07-22 19:21:54 -04:00
Andrew Ryabinin
50370cd70d hm60x: Fix gpio pin direction.
Change-Id: I22324a3bd080a23d3606e6bc8e55881d072bf615
2012-07-13 22:30:09 +04:00
Andrew Ryabinin
e2d72d64fd hm60x: Fix not working backlight on some hm-601's.
Change-Id: I3e1e92f28537b6fb915a0f9d5960fbf5e217825b
2012-07-13 22:28:17 +04:00
Marcin Bukat
80ec94c497 rk27xx: implement system_exception_wait()
Change-Id: If55cfdf7ef91e732ac0aae6ad9fde24b8918e1b8
2012-07-11 00:27:13 +02:00
Marcin Bukat
5a89549c86 rk27generic: fix charging_state()
Change-Id: Iefa7fa4f9b2e535e2ab9004ffe8eeb8adf203f4b
2012-07-10 09:35:01 +02:00
Marcin Bukat
fa5d22584a rk27xx: disable watchdog on startup
Some versions of nand loader enable watchdog which resets
player just after reaching main menu.

Change-Id: Ia008bccb40570ab102c0558cd2768f125ae826d7
2012-07-09 22:43:34 +02:00
Andrew Ryabinin
052b5f1da9 hm60x: Add support for HM-601 slims with new lcds.
Change-Id: I02d5c85e70686c842f1379aba24ff045b260a4ff
2012-06-30 21:01:25 +04:00
Frank Gevaerts
1a665aab1e Fix non-integer display_zoom for charcell.
Change-Id: I2d41b5cc9cbceae05ba6cde4182896df9c5fb860
2012-06-19 21:56:57 +02:00
Frank Gevaerts
3d0c787a48 Change display_zoom from int to double.
The main reason for this is to be able to downscale the sdl app, which
when used for designing themes for android tends not to fit on laptop
screens these days.

Change-Id: Ib52731dbebcdd03a572be7754c157471165eb2df
2012-06-19 21:27:53 +02:00
Frank Gevaerts
a9217bde27 Remove extraneous "extern int display_zoom" declarations.
One extern declaration of a variable should be enough for everyone!

Change-Id: Idd4f4e05abaa5bb82693134a262d4023e1be6bd6
2012-06-14 22:23:50 +02:00
Amaury Pouly
71f3255a0e imx233: define HAVE_TEST_AND_CLEAN_CACHE
Change-Id: I7ceb9b122520e48a88f6299f10d42d2fa717ef3b
2012-06-07 14:48:43 +02:00
Amaury Pouly
a9667636ca imx233: add ocotp debug screen
Change-Id: Ia2211f9e0b281ffb60139bba539af37d762212dc
2012-05-31 13:57:25 +02:00
Amaury Pouly
64b8d1ed7c imx233: add ocotp driver
Change-Id: If4ed62ece056e81665a00af39eb1c57bb2c42b22
2012-05-31 13:57:25 +02:00
Lorenzo Miori
3cad5573b6 ypr0: This patch adds radio support to Samsung YP-R0
Basically it uses the default SI4700 radio chip driver, the only thing that's different is the I2C access,
written specifically to interact with my kernel module.
Next things to add are:
- RDS support!

Change-Id: I0ed125641e00f93124d7a34f90dd508e7f1db5a4
Signed-off-by: Lorenzo Miori <memorys60@gmail.com>
2012-05-28 19:39:14 +02:00
Thomas Martitz
3f365fc06b load_code: Get rid of win32 specific code in favor SDL_LoadFunction & friends APIs.
Refactor native/hosted implementation seperation while at it
(no wrappers starting with _ anymore).

Change-Id: If68ae89700443bb3be483c1cace3d6739409560a
2012-05-26 22:46:56 +02:00
Michael Sevakis
5c36e2f21c Gigabeat S: Fix the recording locking upon using it a second time.
Apparently I got the "just-in-case" RXFIFO purge in there before the
RXFIFO was enabled, causing severe hardware spasms.

Change-Id: I2ea4b6d28e06372b61cb3f21ab2fce71dd408213
2012-05-23 10:21:22 -04:00