Commit graph

7735 commits

Author SHA1 Message Date
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
Rafaël Carré
74cee6297c rolo: use BX for ARM branches
This is equivalent to mov pc
Remove an instruction from the asm() for PP cop restart : use register constraint

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26431 a1c6a512-1295-4272-9138-f99709370657
2010-05-31 14:42:27 +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
Andree Buschmann
8b5bf04dab Fix FS#9193. Remove recording source <Mic> for iPod Video and iPod nano 1G. The manual already describes the correct behaviour.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26414 a1c6a512-1295-4272-9138-f99709370657
2010-05-30 18:34:10 +00:00
Andree Buschmann
f0e1cf038f Submit FS#11240 by Raphael Jakse. Allows to reduce volume on WM8985 to -89 dB (e.g. used for Cowon D2). Below -57 dB the line out is affected. The manual is updated accordingly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26413 a1c6a512-1295-4272-9138-f99709370657
2010-05-30 18:29:04 +00:00
Rafaël Carré
17889d4ec4 inttypes.h: remove excessive PRI*PTR declaration when long isn't 64 bits
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26412 a1c6a512-1295-4272-9138-f99709370657
2010-05-30 16:07:54 +00:00
Rafaël Carré
c0f9aa44e4 inttypes.h: add (some) iso c99 fprintf format specifiers
Skipped the specifiers for octal, (u)int_leastN_t, (u)int_fastN_t and
(u)intmax_t as we don't use them in rockbox

Specifiers use the types specified in stdint.h
Specifiers for short (16 bits) and char (8 bits) use the int specifier,
our format.c doesn't know about 'h' and 'hh'

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26411 a1c6a512-1295-4272-9138-f99709370657
2010-05-30 16:00:03 +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
Frank Gevaerts
8d079a0bcb No need to break after a return
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26398 a1c6a512-1295-4272-9138-f99709370657
2010-05-29 21:54:23 +00:00
Michael Giacomelli
1ecb6297a1 Commit FS#10887 by me. Change the check for software poweroff to be that the power button is held, not that the power button is held AND that no other button is held. This makes shutting down players with small tightly spaced buttons (Sandisk...) much easier. This also means that combos involving the power button can now potientially power off the player. The H10 and sansas excluding the Fuze use a combo involving power for AB repeat mode. However, the timeout for shutdown is much longer then the long press duration needed for AB repeat, and in practice seems to not be a problem on these players. I've tested this on various players for a long time and bugged other people to try it out, so I think its pretty safe, but if theres problems it can be reverted or keymaps tweaked.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26397 a1c6a512-1295-4272-9138-f99709370657
2010-05-29 21:54:14 +00:00
Frank Gevaerts
acf98d9e7f fix broken case handling in storage_present() and storage_removable(). Those were buggy for targets with a hotswappable drive *and* more than one storage driver (i.e. only the D2 was probably affected)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26395 a1c6a512-1295-4272-9138-f99709370657
2010-05-29 20:44:09 +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
Rafaël Carré
10dbaa24a7 genversion: generate version.c and version.h independantly
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26349 a1c6a512-1295-4272-9138-f99709370657
2010-05-28 04:07:57 +00:00
Rafaël Carré
6921a2b6b9 Merge common LCD code between fuzev1 & fuzev2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26344 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 23:32:38 +00:00
Rafaël Carré
9d583f2b0b fuzev2: lcd_enable and lcd_invert() work fine
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26343 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 23:32:33 +00:00
Rafaël Carré
9ff986cdca sd-as3525v2: Include time spent yielding when figuring timeout in sd_wait_for_tran_state()
(apply r23738 to as3525v2 code)
extend the arbitrary delay to 5 seconds, we never know

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26342 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 23:32:29 +00:00
Michael Sevakis
6b6123444e Gigabeat S PCM: Sync some comments to changes.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26341 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 23:22:55 +00:00
Michael Sevakis
25ebd9832d Gigabeat S PCM: There's no reason to touch any hardware registers in order to lock out PCM callbacks.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26340 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 23:14:39 +00:00
Michael Sevakis
6ce5279ff3 Simulator: get rid of SDL_mutex* parameter to sim_do_exit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26338 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 21:36:04 +00:00
Michael Sevakis
deb1600bbc SDL Simulator: Get thread shutdown and properly handled and fix a minor memory leak that happens when threads exit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26336 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 18:46:09 +00:00
Rafaël Carré
a71929b1a0 as3525: no need to ack TIMER interrupt multiple times
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26330 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 13:42:39 +00:00
Rafaël Carré
2f0f3490d3 Clip*: give lcd_hw_init() INIT_ATTR attribute
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26329 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 12:28:53 +00:00
Rafaël Carré
435e08eae1 mark some functions as init functions (discarded after init() has run)
tick_start, fmradio_i2c_init, pcm_init, pcm_postinit, pcm_play_dma_init

Also add some as3525 target specific functions
Make as3525v2 use this attribute

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26328 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 12:00:29 +00:00
Rafaël Carré
b0146de64c as3525: don't export empty usb_init_device(), declare it as empty inline
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26326 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 12:00:18 +00:00
Rafaël Carré
065ef89479 clipv2: make buttonlight functions static inline one-liners
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26323 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 11:09:12 +00:00
Rafaël Carré
5d236b2bfd Generate C file / header for svn version string
It's now easier to force rebuild of files depending on the svn revision

version.c/version.h are generated once with new tools/genversion.sh
Changes in the VCS are still not auto detected, so you'll have to remove
builddir/version.* if you want to change the string in your binaries

APPSVERSION is now called RBVERSION and is defined in the generated
header instead of being defined by the Makefiles
appsversion is now called rbversion (the plugin api number didn't change
since old modules are still binary compatible)

Change some bootloaders to use knwon-at-buildtime RBVERSION instead of
"%s" + rbversion

You'll need to run make clean to regenerate dependencies after the
removal of apps/version.h

To build binaries with a different version string, hand-edit
tools/version.sh or tools/genversion.sh (which calls the former)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26320 a1c6a512-1295-4272-9138-f99709370657
2010-05-27 09:41:46 +00:00
Rafaël Carré
6ca9f232a8 as3525: fix r26308
I2SOUT peri needs to be enabled to set the loopback setting

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26319 a1c6a512-1295-4272-9138-f99709370657
2010-05-26 22:58:55 +00:00
Michael Sevakis
28a7c5d369 UISimulator: cleaner startup using semaphore only to tell when event_thread is done initializing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26317 a1c6a512-1295-4272-9138-f99709370657
2010-05-26 21:11:40 +00:00
Rafaël Carré
c9133db4b1 as3525: as revealed by r26311, it seems DMAC interrupt can't be masked
Even if we disable it in VIC_INT_EN_CLEAR, it still fires an interrupt
by running the default isr.
Locking requires disabling interrupts completely.
I'm not sure if DMAC is the only interrupt affected or if we can't rely
on VIC_INT_EN_CLEAR to mask interrupts.
If it's the latter, we will need to have special locking scheme for
INT_AUDIO.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26316 a1c6a512-1295-4272-9138-f99709370657
2010-05-26 17:32:50 +00:00