Commit graph

2744 commits

Author SHA1 Message Date
Marcin Bukat
2f7bd4d993 HD200 - power_init() rework based on latest power consumption measurements
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26767 a1c6a512-1295-4272-9138-f99709370657
2010-06-11 11:41:29 +00:00
Marcin Bukat
b45a2d433b HD200 - small cleanup in button_init_device()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26766 a1c6a512-1295-4272-9138-f99709370657
2010-06-11 11:41:24 +00:00
Rafaël Carré
71c9521a87 pcm-pp: revert r26756
FIQ/IRQ handlers can't be built with -mthumb, and the thumb case was
buggy anyway (spotted by jhMikeS) : pc offset hadn't been adjusted

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26765 a1c6a512-1295-4272-9138-f99709370657
2010-06-11 11:25:16 +00:00
Rafaël Carré
2f7bb96c3d as3525v1: drop the asm version of mono2stereo
When building with eabi gcc, 2 variables are assigned the same register
This might be a bug in the constraints, but it's just simpler to use C,
even at the cost of 1 cycle per loop

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26761 a1c6a512-1295-4272-9138-f99709370657
2010-06-11 06:39:32 +00:00
Rafaël Carré
45c7498f59 FS#11335 by me: make ARM assembly functions thumb-friendly
We can't pop into pc on ARMv4t when using thumb: the T bit won't be
modified if we are returning to a thumb function
Code running on ARMv4t should use the new ldrpc / ldmpc macros instead
of ldr pc, [sp], #4 and ldm(cond) sp!, {regs, pc}
No modification on pure ARM builds and ARMv5+

Note: USE_THUMB is currently never defined, no targets can currently be
built with -mthumb, see FS#6734

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26756 a1c6a512-1295-4272-9138-f99709370657
2010-06-11 04:41:36 +00:00
Rafaël Carré
5fea005610 arm/memset: don't use ldm to load pc when it has been stored with str
It looks nicer to keep str/ldr and stm/ldm in pairs

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26754 a1c6a512-1295-4272-9138-f99709370657
2010-06-11 03:54:47 +00:00
Michael Sevakis
05ca8978c4 Clean unused stuff out of thread.h and config.h and reorganize thread-pp.c to simplify the preprocessor blocks.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26743 a1c6a512-1295-4272-9138-f99709370657
2010-06-10 17:31:45 +00:00
Rafaël Carré
70b9ab484f meizu m6sl: load code from IRAM, not FLASH (it eases debugging)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26730 a1c6a512-1295-4272-9138-f99709370657
2010-06-09 18:13:36 +00:00
Rafaël Carré
1596128296 arm/crt0.S: s58l* don't use this file, no need for 'DFUC' string
adjust vectors offsets

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26709 a1c6a512-1295-4272-9138-f99709370657
2010-06-08 23:26:21 +00:00
Rafaël Carré
e907a96d71 make meizu-m6sl bootloader build
assume 512 bytes sector size as reported by dmesg

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26700 a1c6a512-1295-4272-9138-f99709370657
2010-06-08 18:07:59 +00:00
Marcin Bukat
12fa759aad HD200 - fix lcd power save command (not used currently)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26684 a1c6a512-1295-4272-9138-f99709370657
2010-06-08 09:44:17 +00:00
Jens Arnold
fe0334394f Fix byte order for Mini G2, and fix comments.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26675 a1c6a512-1295-4272-9138-f99709370657
2010-06-07 21:16:59 +00:00
Rafaël Carré
4eea33e27d as3525v1: fix r26444 which broke mic recording
preventing the DMA callback to advance in the recording buffer is not
enough in pcm_rec_dma_get_peak_buffer()
we need to prevent it interrupting us while we are copying the left
channel data into the right channel

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26663 a1c6a512-1295-4272-9138-f99709370657
2010-06-07 16:17:32 +00:00
Jens Arnold
a225ee9867 Use atomic GPIO manipulation where appropriate.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26632 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 13:50:26 +00:00
Rafaël Carré
5c9e76a1e0 sd-as3525v2: check the (supposedly) card data line for business when writing
Fix panics when deleting large files from µSD
Tested on problematic Transcend 4GB Class 6

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26631 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 13:47:30 +00:00
Frank Gevaerts
9c43b2ce17 Remove card_enable_monitoring() and use a mutex instead. The card_enable_monitoring() method actually didn't eliminate the possible race conditions it was meant to fix.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26627 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 13:20:47 +00:00
Torne Wuff
4a2cab6aa1 USB charging support for iPods.
This adds proper full speed charging support for iPod 4G, Color, Mini 1G, Mini 2G, Nano 1G, and Video. Nano 2G already has support, so now all ipods charge (except 1G-3G whose hardware doesn't support USB charging).

USB charging defaults to on, but will only charge at full speed from a USB host. To charge from an AC charger, you need to set the USB charging mode to "force". It may be possible to detect AC chargers in a future version, at least on some models.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26626 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 13:01:19 +00:00
Thomas Martitz
19ac3453e0 Fix most reds, I have no idea what's wrong with the gigabeats (yet).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26619 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 10:27:14 +00:00
Thomas Martitz
59d2603c41 Move target-simulating specific keymaps out of button-sdl.c into a file per
keypad.

Copyright is restored for each keymap according to git blame.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26615 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 09:11:52 +00:00
Frank Gevaerts
a0557b23f0 remane hotswap.* to sdmmc.*. The contents have nothing at all to do with hotswapping things
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26598 a1c6a512-1295-4272-9138-f99709370657
2010-06-05 21:12:16 +00:00
Thomas Martitz
4477902738 Mini2440: Fix simulator. It's touchscreen so there's button clashes when trying to map the 6 hw buttons as well. Just remove that for now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26590 a1c6a512-1295-4272-9138-f99709370657
2010-06-05 17:09:13 +00:00
Bertrik Sikken
20856e1c10 Move delay a bit in dbop_read_input for ams sansa targets using the DBOP port for button readout
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26585 a1c6a512-1295-4272-9138-f99709370657
2010-06-05 15:57:32 +00:00
Jens Arnold
57dcfe0eee Implement backlight brightness for iPod G4 greyscale and iPod Color/Photo.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26573 a1c6a512-1295-4272-9138-f99709370657
2010-06-05 11:48:12 +00:00
Torne Wuff
991e92fd3d New USB charging system, part 1 - API rework and user-visible setting update
1) "Charge during USB connection" option is now tristate: off/on/force. Currently "force" behaves just like "on", but in future it will allow charging even when it was not possible to positively identify a charger.

2) The H300 code has been adjusted to use the new system but there should be no functional differences, it already had the USB charging option and its USB/charging support is hardware controlled.

3) The Gigabeat S code has been adjusted to use the new system: the player now has the USB charging option, which wasn't previously available. The player will only charge at full speed when allowed to do so by a working USB host, so USB AC adapters won't work very well; however, they didn't work before either, so this is not a change in functionality.

4) The iPod Nano 2G code has been adjusted to use the new system: it already had the USB charging option. Using a USB AC adapter won't charge at full speed any more (it did before) - the old implementation was equivalent to the not-yet-implemented "force" option in the new system.

No other target should be affected. Support for the "force" mode and support for at least some other iPod models will come in a future commit :)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26570 a1c6a512-1295-4272-9138-f99709370657
2010-06-05 10:05:27 +00:00
Jens Arnold
c4f88526c7 Port greylib blitting optimisation to clipv2 and Clip+. Actual speedup can't be measured because something is fishy with the cpu clocking (calculated load is negative??)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26562 a1c6a512-1295-4272-9138-f99709370657
2010-06-04 23:12:33 +00:00
Jens Arnold
081bda8ab2 Port greylib blitting optimisation to clipv1.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26557 a1c6a512-1295-4272-9138-f99709370657
2010-06-04 21:12:06 +00:00
Tobias Diedrich
3f44f1c151 Using void instead of unsigned char fixes the strict-aliasing warnings with -Os and gets rid of some casts. And we already use void pointer arithmetic in several other places.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26518 a1c6a512-1295-4272-9138-f99709370657
2010-06-03 18:29:06 +00:00
Rafaël Carré
bf3e50b89b sd-as3525v1: do not disable peripheral clocks in sd_enable()
(forward port of r26481 + cosmetics)
This lead to freezes under various conditons (bug report: FS#11267)

Battery life is almost not (if at all) affected:
- between 4 and 8 minutes less runtime for fuzev1
- 9 minutes less runtime for c200v2 (2 minutes difference on a 2 hours run)

Additional verifications of the runtime (including on other models) wouldn't hurt

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26512 a1c6a512-1295-4272-9138-f99709370657
2010-06-03 13:55:42 +00:00
Michael Sevakis
a34860524b Fix PP5002 builds. Somehow an #else went missing along the line.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26480 a1c6a512-1295-4272-9138-f99709370657
2010-06-02 12:56:05 +00:00
Michael Sevakis
555ad6710f Threading: Split processor support code into respective target files. C files from /target/xxx are included into thread.c because of essential inlining and files are code, not declarations. Copyrights in each new file go to whoever implemented the first functional support.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26479 a1c6a512-1295-4272-9138-f99709370657
2010-06-02 12:45:36 +00:00
Tobias Diedrich
253cfbcd47 Prevent a race condition when writing VIC_INT_EN_CLEAR. Should be very difficult to hit in this case though...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26451 a1c6a512-1295-4272-9138-f99709370657
2010-06-01 19:29:01 +00:00
Rafaël Carré
df34a4767f as3525 ascodec: make internal functions statics and remove some details for ascodec-target.h header
reorder static functions to avoid the need for early prototypes
panic if the INT_AUDIO callback could not read the 3 IRQ_ENRD registers

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26445 a1c6a512-1295-4272-9138-f99709370657
2010-06-01 10:16:10 +00:00
Rafaël Carré
dc32a5b14c as3525 PCM: implement locking like done for the gigabeats in r26341
this removes workaround for spurious interrupts added in r26316

side effect: make keyclicks work correctly when used intensively (with
the scrollwheel for example), the clicks should be inserted fast enough
for the PCM fifo to not become empty.

PL190 can cause spurious interrupts if an interrupt is triggered by a
peripheral shortly before the interrupt for this peripheral is cleared
from VIC registers.

As an effect we should only write in VIC_INT_EN_CLEAR after having
disabled the source of the interrupt in the peripheral.

references on PL190 spurious interrupts:
- http://www.embeddedrelated.com/groups/lpc2000/show/14599.php
- http://water.cse.unsw.edu.au/esdk/lpc2/spurious-irq.html

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26444 a1c6a512-1295-4272-9138-f99709370657
2010-06-01 09:39:08 +00:00
Rafaël Carré
acb524e51a sd-as3525v1: set up bank selection data outside of the loop
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26441 a1c6a512-1295-4272-9138-f99709370657
2010-06-01 03:50:52 +00:00
Rob Purchase
a6c1b54d46 Enable IRAM on TCC7801 (Cowon D2) for a 6-12% speedup in codecs that use it, and a small increase in battery life.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26436 a1c6a512-1295-4272-9138-f99709370657
2010-05-31 21:00:25 +00:00
Jens Arnold
64adb32cbf Port the greylib blitting optimisation to m:robe 100. It's even more efficient on monochrome LCDs - about 20% ISR speedup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26435 a1c6a512-1295-4272-9138-f99709370657
2010-05-31 20:13:27 +00:00
Jens Arnold
85fd2d8be9 Smaller & faster greylib blitting on iriver H1x0 and iAudio M5, based on the ARM version but using mulu.l for the bit shuffling. ISR speedup is ~10%.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26434 a1c6a512-1295-4272-9138-f99709370657
2010-05-31 19:56:21 +00:00
Rafaël Carré
0ea7905395 ARM: use BX when branch to an address in register
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26432 a1c6a512-1295-4272-9138-f99709370657
2010-05-31 15:14:26 +00:00
Jens Arnold
7a1aca46a3 Smaller & faster grey blitting on greyscale ipods, based on an idea by Mike Sevakis. ISR speedup on all greyscale iPods except Mini 2nd Gen is ~10%. No speedup on the latter, because the serial transfer is the limiting factor.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26422 a1c6a512-1295-4272-9138-f99709370657
2010-05-30 22:24:50 +00:00
Bertrik Sikken
a5248a2995 Update Samsung YP-S3 bootloader demo
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26417 a1c6a512-1295-4272-9138-f99709370657
2010-05-30 21:43:14 +00:00
Rafaël Carré
cc07d68866 fuze*/e200v2 YUV lcd code: remove a useless instruction forgotten in r21795
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26399 a1c6a512-1295-4272-9138-f99709370657
2010-05-29 22:42:54 +00:00
Rafaël Carré
9b2527420f Fuze: don't change gate scan position if lcd_set_flip() is not used
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26387 a1c6a512-1295-4272-9138-f99709370657
2010-05-29 17:40:37 +00:00
Rafaël Carré
5ea1fe614a cpucache_invalidate: use bx reg instead of mov pc, reg to return
Using BX has the effect to set the T bit, so it can return to a thumb
function

With this change, rockbox runs fine on Clipv2 built with -mthumb (for
most files which don't use inline 32 bits ARM assembly)

Some other places use code which change the T bit on armv5 but not on
armv4 so armv4 won't run

See FS#6734

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26386 a1c6a512-1295-4272-9138-f99709370657
2010-05-29 17:12:42 +00:00
Rafaël Carré
56220785c1 e200v2: revert r26353
invert setting isn't remembered when backlight goes off and lcd_enable()
is ran again

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26374 a1c6a512-1295-4272-9138-f99709370657
2010-05-29 14:24:10 +00:00
Rafaël Carré
d2f26206ba Fuzev1/v2 : lcd_set_flip()
FS#11329

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26372 a1c6a512-1295-4272-9138-f99709370657
2010-05-29 13:43:18 +00:00
Jack Halpin
8b6356d08a sd-as3525.c: Do not wait for TRAN state after transfer is over.
Waiting for TRAN state after the end of the transfer caused writing problems for some uSD cards.  Removing this wait returns write functionality to those cards.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26365 a1c6a512-1295-4272-9138-f99709370657
2010-05-28 21:47:36 +00:00
Bertrik Sikken
36b4b39a7e Apply FS#9194 - LCD invert for Sansa c200/c200v2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26362 a1c6a512-1295-4272-9138-f99709370657
2010-05-28 19:36:52 +00:00
Bertrik Sikken
36c6f3d13f Restore return statement in kernel-as3525.c that was accidentally removed in r26330. This fixes c200v2 black screen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26361 a1c6a512-1295-4272-9138-f99709370657
2010-05-28 19:04:30 +00:00
Michael Chicoine
0ae59df3fa Simplify lcd invert
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26353 a1c6a512-1295-4272-9138-f99709370657
2010-05-28 12:19:26 +00:00
Michael Chicoine
3c1dd03fb3 Simplify lcd_set_flip, lcd_window, and lcd_window_blit
Remove unneeded defines
Whitespace cleanup

Thanks to Rafaël Carré for finding the simpler register settings.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26350 a1c6a512-1295-4272-9138-f99709370657
2010-05-28 05:15:28 +00:00