Commit graph

2671 commits

Author SHA1 Message Date
Michael Sevakis
453550a687 Try to get some control over #ifdef hell in usb.c by refactoring and inline function use. SYS_USB_DISCONNECTED_ACK hasn't been doing anything useful for the USB thread; remove it. USB thread simply ignores that value. Observe only valid usb_state transitions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29084 a1c6a512-1295-4272-9138-f99709370657
2011-01-18 14:10:06 +00:00
Michael Sevakis
05f6f3419a Add a higher level USB detection that prevents fraudulent bus resets from causing USB mode to be entered. Enable for SA9200 only at this time. Also, for SA9200, use the bus power GPIO rather than the 'connector inserted' GPIO to detect the cable.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29068 a1c6a512-1295-4272-9138-f99709370657
2011-01-17 12:24:41 +00:00
Michael Sevakis
bcc0f88372 Convert PortalPlayer iRivers to use USB-mode enabled bootloader. The H10 5/6GB already has a pre-boot USB mode (so it's a little redundant there) but building them the same way is simpler.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29067 a1c6a512-1295-4272-9138-f99709370657
2011-01-17 06:50:27 +00:00
Michael Sevakis
76083359e0 e200v1 seems to be ok using USB-enabled bootloader. Also, include the bootloader USB .lds into the boot.lds instead of pasting into every one to keep things sane for now-- commented upon inside.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29062 a1c6a512-1295-4272-9138-f99709370657
2011-01-16 01:40:15 +00:00
Michael Sevakis
3a1127785b Bootloader USB mode for PP502x. Enable only on GoGear SA9200 for the time being. Add HAVE_BOOTLOADER_USB_MODE to config if BOOTLOADER is defined to enable it. Clean up some kernel stuff a little to support it. Mess up a bunch of other stuff (hopefully not too badly).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29053 a1c6a512-1295-4272-9138-f99709370657
2011-01-15 08:19:30 +00:00
Andree Buschmann
13435127b7 Fix FS#11820. Implement LCD shutdown for iPod Photo/Color and iPod nano 1G. The code was taken from FS#10034 and slightly changed to avoid white flashing when shutting off the display.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29033 a1c6a512-1295-4272-9138-f99709370657
2011-01-12 07:36:02 +00:00
Michael Sevakis
267ac4b79b SA9200: Adjust touchpad sensitivities so that actual contact with the player is needed to cause button presses and hopefully those settings will work nicely. Add a parameter read function to the MEP driver for debugging and RE purposes; enable compilation of it if you want to use it. Make a note in power-sa9200.c about button inits.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29032 a1c6a512-1295-4272-9138-f99709370657
2011-01-11 23:48:29 +00:00
Marcin Bukat
91d8fe0848 HD300 - adjust default battery capacity (based on battery benches)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29021 a1c6a512-1295-4272-9138-f99709370657
2011-01-10 14:19:05 +00:00
Michael Sevakis
1b275d8ddb Some static data is only used by .init functions. Add .initdata to declare such data (otherwise section conflicts arise). For i.MX31, use INITDATA_ATTR in the appropriate places.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29008 a1c6a512-1295-4272-9138-f99709370657
2011-01-08 20:42:51 +00:00
Michael Sparmann
44f924f8b4 Adjust iPod Classic CPU clock speed constants to at least roughly correct values
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29005 a1c6a512-1295-4272-9138-f99709370657
2011-01-08 01:05:27 +00:00
Michael Sparmann
9b5c95f557 Fix CS42L55 (iPod Classic) tone control
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29002 a1c6a512-1295-4272-9138-f99709370657
2011-01-07 23:09:09 +00:00
Michael Sparmann
d5758731bf Fix iPod Classic USEC_TIMER
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28987 a1c6a512-1295-4272-9138-f99709370657
2011-01-07 12:09:54 +00:00
Michael Sevakis
89a7a8138e Gigabeat S: Make it a removable mass-storage device. Windows will assign a drive to only the main data partition by default. To access the bootloader partition instead, press 'Vol -' while it connects (in bootloader and firmware). Hopefully doesn't break anything for anyone.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28972 a1c6a512-1295-4272-9138-f99709370657
2011-01-05 19:35:51 +00:00
Michael Sparmann
152847977a New port: iPod Classic (also known as iPod 6G/6.5G/7G)
Major known issues:
- No bootloader yet
- No support for the first-generation 160GB CE-ATA hard disk drive yet
- Audio playback is slow, only FLAC seems to reach realtime


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28953 a1c6a512-1295-4272-9138-f99709370657
2011-01-02 23:16:27 +00:00
Michael Sparmann
6f40387e74 Fix yellow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28952 a1c6a512-1295-4272-9138-f99709370657
2011-01-02 23:09:01 +00:00
Michael Sparmann
1a1fc09863 Fix red
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28951 a1c6a512-1295-4272-9138-f99709370657
2011-01-02 23:02:55 +00:00
Michael Sparmann
7fea136903 Autodetect sector size on superfloppy volumes based on the FAT32 BPB (kudos to Frank Gevaerts)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28946 a1c6a512-1295-4272-9138-f99709370657
2011-01-02 22:28:22 +00:00
Andree Buschmann
9290ab8ab1 Submit FS#11707. Add line out power off to iPods nano1G, color and 4G.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28932 a1c6a512-1295-4272-9138-f99709370657
2010-12-29 23:38:07 +00:00
Michael Sevakis
a24b140c0b Just a technical matter even though all is well anyway: struct blocker::thread should be volatile for > 1 core and the change should make no difference to anything for 1 core.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28923 a1c6a512-1295-4272-9138-f99709370657
2010-12-29 13:53:30 +00:00
Michael Sevakis
7b4eb44395 Certain data accesses in the kernel should have volatile semantics to be correct and not rely on the whims of the compiler. Change queue clearing to simply catch read up to write rather than reset both to 0 to ensure sane results for queue_count and queue_empty with concurrency. Binsize may or may not increase a bit depending upon whether the output was as intended in all places; wrong stuff was already unlikely to cause any issue.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28909 a1c6a512-1295-4272-9138-f99709370657
2010-12-27 10:05:09 +00:00
Michael Sevakis
f387cdef21 Make mutexes a tiny bit leaner. There is no need for a separate locked semaphore since having an owning thread also indicates that it is locked. Rename member 'count' to 'recursion' since it counts reentry, not locks. Change presents no compatibility issues for plugins or codecs because the structure size goes down.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28901 a1c6a512-1295-4272-9138-f99709370657
2010-12-26 05:59:39 +00:00
Thomas Martitz
a341646f2d Fix yellow
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28878 a1c6a512-1295-4272-9138-f99709370657
2010-12-22 16:05:22 +00:00
Szymon Dziok
90e8dc8f6b HDD6330: implement lcd_set_flip() function.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28839 a1c6a512-1295-4272-9138-f99709370657
2010-12-15 22:06:51 +00:00
Szymon Dziok
bf34449638 HDD6330: implement initialization and inversion of lcd.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28826 a1c6a512-1295-4272-9138-f99709370657
2010-12-13 21:13:04 +00:00
Frank Gevaerts
ecd80d888e Move AMSv1 USB to the USB_DETECT_BY_DRV model, so connecting to a dumb charger works without interrupting playback
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28819 a1c6a512-1295-4272-9138-f99709370657
2010-12-12 20:03:42 +00:00
Andree Buschmann
3c0f5181cc iPod nano 2G does use less current since the latest optimizations.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28815 a1c6a512-1295-4272-9138-f99709370657
2010-12-12 15:46:27 +00:00
Michael Sparmann
cb8b6ad369 Really fix yellow this time, SVN only committed half of what I wanted...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28802 a1c6a512-1295-4272-9138-f99709370657
2010-12-12 01:03:14 +00:00
Michael Sparmann
70447b529c usb-s3c6400x.[ch], button-clickwheel.c: Move s5l8701-specific parts to where they belong, prepare for s5l8702
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28800 a1c6a512-1295-4272-9138-f99709370657
2010-12-12 00:52:02 +00:00
Andree Buschmann
08bcbd08d2 S5L870x LCD interface registers are 32 bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28798 a1c6a512-1295-4272-9138-f99709370657
2010-12-11 22:56:12 +00:00
Andree Buschmann
e4a233ed9b Derive clock and timer defines from frequency of external source.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28791 a1c6a512-1295-4272-9138-f99709370657
2010-12-11 09:39:33 +00:00
Thomas Martitz
7a9fd0baae Fix configure and lib path
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28753 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 22:28:14 +00:00
Thomas Martitz
2c2416094f Get rid of get_user_file_path and do the path handling in wrappers for open() and friends.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28752 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 22:26:31 +00:00
Marcin Bukat
1f64b7fb1f HD300: enable RTC alarm function (working partially for now)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28741 a1c6a512-1295-4272-9138-f99709370657
2010-12-06 10:24:54 +00:00
Thomas Martitz
b62ff2bba4 That was a bit too far upwards :(
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28730 a1c6a512-1295-4272-9138-f99709370657
2010-12-03 00:06:06 +00:00
Thomas Martitz
7f9c1718b5 Fix red by moving the difinition up.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28729 a1c6a512-1295-4272-9138-f99709370657
2010-12-02 23:56:24 +00:00
Thomas Martitz
1d425bf1e6 Enable ARM ASM optimzations on android. Speedup in codecs ranges from 20% to 150%. Most codecs now need well below 30MHz.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28727 a1c6a512-1295-4272-9138-f99709370657
2010-12-02 22:33:47 +00:00
Szymon Dziok
589d2110dc HDD6330: implement block transfers through the LCD2 bridge in lcd_update_rect(), speedup is huge, fps over 4 times faster.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28722 a1c6a512-1295-4272-9138-f99709370657
2010-12-02 20:35:25 +00:00
Marcin Bukat
2d3064a7aa HD300 - add basic RTC support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28697 a1c6a512-1295-4272-9138-f99709370657
2010-11-28 22:51:14 +00:00
Frank Gevaerts
1db3dfdd75 Accept FS#11774 by Michael Hohmuth (with some own modifications to #ifdef conditions)
Unmount all filesystems before connecting USB. This ensures that all filehandles are closed, which avoids possible filesystem corruption



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28693 a1c6a512-1295-4272-9138-f99709370657
2010-11-28 15:22:51 +00:00
Andree Buschmann
2dcc515d15 Undo r28682. Bad idea...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28683 a1c6a512-1295-4272-9138-f99709370657
2010-11-27 10:13:18 +00:00
Andree Buschmann
8972744ea9 Use CACHEALIGN_BITS to calculate CACHEALIGN_SIZE instead of directly setting it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28682 a1c6a512-1295-4272-9138-f99709370657
2010-11-27 10:06:26 +00:00
Marcin Bukat
9a24892e2e MPIO HD300 - initial commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28680 a1c6a512-1295-4272-9138-f99709370657
2010-11-26 23:28:08 +00:00
Bertrik Sikken
26c36d9ac3 Sansa c200/c200v2: limit allowable contrast value to 0-127, it wraps at 128.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28662 a1c6a512-1295-4272-9138-f99709370657
2010-11-24 22:17:23 +00:00
Andree Buschmann
6695226331 Fix typo in comment.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28641 a1c6a512-1295-4272-9138-f99709370657
2010-11-22 18:43:22 +00:00
Andree Buschmann
eef21cb18a Change alignment macros to allow further performance optimization. Define the CACHEALIGN macros for all ARM CPUs, the used alignment size is derived from CACHEALIGN_BITS which has been defined for each supported ARM CPU with r28619. The default alignment size for ARM is set to 32 bytes as new -- not yet supported -- ARM CPUs will most probably need this alignment. To be able to differ between ARM and other CPUs a new macro called MEM_ALIGN_ATTR is introduced. This equals CACHEALIGN_ATTR for ARM, 16 byte alignment for Coldfire and is kept empty for other CPUs. MEM_ALIGN_ATTR is available system wide. From measurements it is expected that the usage of MEM_ALIGN_ATTR can give significant performance gain on ARM11 CPUs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28625 a1c6a512-1295-4272-9138-f99709370657
2010-11-21 12:27:01 +00:00
Andree Buschmann
c3574034ad Reinsert CACHEALIGN_SIZE to imx31l.h, r28619 expected another local change.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28620 a1c6a512-1295-4272-9138-f99709370657
2010-11-19 07:23:31 +00:00
Andree Buschmann
90a5a8a068 Define CACHEALIGN_BITS for missing ARM CPUs for later use.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28619 a1c6a512-1295-4272-9138-f99709370657
2010-11-19 07:17:20 +00:00
Jonathan Gordon
3806584dbe fix reds, not so nice fiddling with simulator stubs to make it all works
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28614 a1c6a512-1295-4272-9138-f99709370657
2010-11-18 11:57:51 +00:00
Jonathan Gordon
1ce7ba4931 Make the %tr (radio RSSI) tag work as a bar tag or as a conditional.
As a conditional it scales its value to the number of options you give it (like volume)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28613 a1c6a512-1295-4272-9138-f99709370657
2010-11-18 11:47:42 +00:00
Michael Sparmann
a5ad3f8a72 iPod Nano 2G: Implement LCD sleep (FS#11604 by Franz-Josef Haider), adds up to 5 hours of battery life
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28591 a1c6a512-1295-4272-9138-f99709370657
2010-11-14 15:29:05 +00:00
Michael Sparmann
316986df67 Oops, forgot to add CLKCON3 to the CPU header. Fixes red.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28587 a1c6a512-1295-4272-9138-f99709370657
2010-11-14 15:11:37 +00:00
Michael Sparmann
23fd886c4f iPod Nano 2G: Finally FIQ-less and glitch-free PCM. This should allow for IRQ latencies high enough to allow re-locking PLLs and changing and stabilizing Vcore when switching CPU frequency.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28580 a1c6a512-1295-4272-9138-f99709370657
2010-11-13 21:08:15 +00:00
Michael Sparmann
9156dbaef5 Damn. Remove another typo.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28579 a1c6a512-1295-4272-9138-f99709370657
2010-11-13 17:49:45 +00:00
Michael Sparmann
fc86352e27 Fix a typo in a comment
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28578 a1c6a512-1295-4272-9138-f99709370657
2010-11-13 17:39:21 +00:00
Bertrik Sikken
de870b3ee0 Signal strength meter for FM radio - FS#8151 by Przemysław Hołubowski
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28559 a1c6a512-1295-4272-9138-f99709370657
2010-11-11 21:13:29 +00:00
Maurus Cuelenaere
b787c0dd05 Onda VX767: get some facts about the state of the current LCD driver straight
* Remove wrong comment in config
* Add a note to the LCD driver stating that it isn't complete and thus non-working atm

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28558 a1c6a512-1295-4272-9138-f99709370657
2010-11-11 13:04:22 +00:00
Thomas Martitz
33af0dec28 Touchscreen: Improved scroll threshold
Remove the hardcoded (and way too small) scroll threshold (the distance moved in pixels before we think the users wants to scroll) and replace it with something based on the actual DPI of the screen.
On Android we call the API for that, on other touchscreens we reimplemented Android's formula (as of 2.2) and calculate it.

Flyspray: 11727

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28548 a1c6a512-1295-4272-9138-f99709370657
2010-11-10 15:25:15 +00:00
Marcin Bukat
a434a0de5c MPIO HD200 manual - tex files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28544 a1c6a512-1295-4272-9138-f99709370657
2010-11-09 22:10:38 +00:00
Marcin Bukat
c25887a2b9 Bump BATTERY_CAPACITY_MAX to 1500 for ipod mini. Closes FS#11736
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28534 a1c6a512-1295-4272-9138-f99709370657
2010-11-08 12:51:08 +00:00
Thomas Martitz
988bdc1cc4 Android: Use wakeup objects instead of polling for the dialog results in the keyboard and yesno dialog, allowing a lot of code to be removed.
First part of FS#11708

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28512 a1c6a512-1295-4272-9138-f99709370657
2010-11-06 01:01:01 +00:00
Bertrik Sikken
981a639ade Implement tea5767 tuner detection - FS#11714 by me
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28493 a1c6a512-1295-4272-9138-f99709370657
2010-11-05 17:04:18 +00:00
Marcin Bukat
56c4e9fa60 Separate mas35xx lowlevel stuff. Move SH specific bits to target tree. FS#11189 by me.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28425 a1c6a512-1295-4272-9138-f99709370657
2010-10-31 21:09:34 +00:00
Thomas Martitz
49f1ec8e8a Add support multimedia keys/buttons to the core, and adapt Rockbox on android for it (multimedia buttons are found on wired headsets and the lock screen in cyanogenmod).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28421 a1c6a512-1295-4272-9138-f99709370657
2010-10-31 15:32:57 +00:00
Thomas Martitz
b673ae2c46 FS#11686 - Kinetic list scrolling for touchscreen
This adds kinetic scrolling to to lists on touchscreen targets and RaaA, like all other OSes on touchscreens have.
It's only enabled in the absolute point mode, so for non-touchscreen and in grid mode nothing changes.

Kinetic scrolling means that the list keeps scrolling (but is decelerating) after you leave the touchscreen with the finger.
Redraw interval and deceleration is hardcoded for now but could be made configurable if desired.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28408 a1c6a512-1295-4272-9138-f99709370657
2010-10-31 11:11:46 +00:00
Szymon Dziok
2eeb29bc04 HDD6330: fix some values in config (USB PID, battery capacity), insert commented out ATA DMA.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28367 a1c6a512-1295-4272-9138-f99709370657
2010-10-27 19:53:47 +00:00
Maurus Cuelenaere
77b3529246 Ramdisk: add hotswap support
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28363 a1c6a512-1295-4272-9138-f99709370657
2010-10-26 12:27:33 +00:00
Michael Sparmann
77129ad3ec Really fix yellow: Rename BMP_LINESIZE and BMP_BPP to get rid of the macro name collision
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28359 a1c6a512-1295-4272-9138-f99709370657
2010-10-25 12:52:02 +00:00
Michael Sparmann
e117b4a400 Fix yellow: BMP_BPP and BMP_LINESIZE being used both in greylib and screendump
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28357 a1c6a512-1295-4272-9138-f99709370657
2010-10-25 12:43:23 +00:00
Michael Sparmann
01cdb6a21f Fix screendump on iPod Nano 2G by increasing the usb thread stack size and reducing the stack usage of FAT and storage functions
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28356 a1c6a512-1295-4272-9138-f99709370657
2010-10-25 12:36:57 +00:00
Bertrik Sikken
462f012d17 Fix return type of iap_getc (should be bool instead of int)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28354 a1c6a512-1295-4272-9138-f99709370657
2010-10-24 21:39:09 +00:00
Szymon Dziok
057806f67a HDD6330: Try to adapt the keys for the new touchpad code, remove the non existing buttons, enable morse input.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28306 a1c6a512-1295-4272-9138-f99709370657
2010-10-18 19:30:54 +00:00
Thomas Martitz
8e8839c8c2 Forgot to update lcd-remote.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28243 a1c6a512-1295-4272-9138-f99709370657
2010-10-11 01:23:40 +00:00
Thomas Martitz
3022a60cc2 Rename {draw,fill}_viewport once more (to draw_border_viewport and fill_viewport) and remove the viewport parameter as suggested by Dave Chapman.
The parameter wasn't used yet and it's not clear whether it should be a absolute or relative viewport.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28242 a1c6a512-1295-4272-9138-f99709370657
2010-10-11 01:19:55 +00:00
Thomas Martitz
5462ef728f Add _rect to {draw,fill}_viewport as suggested by Jonathan Gordon to reduce the chance to confuse it with update_viewport().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28240 a1c6a512-1295-4272-9138-f99709370657
2010-10-10 23:35:03 +00:00
Thomas Martitz
8a0152bd4a Two new lcd/multi screen api convinience functions: draw_viewport(), fill_viewport().
They work as the drawrect/fillrect pendants but work on a viewport basis; pass NULL to draw the current viewport (the one set with set_viewport()).
In conjunction with action_get_touchscreen_press_in_vp() it should be less of a pain to draw buttons and get presses on them.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28239 a1c6a512-1295-4272-9138-f99709370657
2010-10-10 23:15:05 +00:00
Thomas Martitz
c2b5739419 Fix targets with remote display, forgot to add the new functions to their header.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28215 a1c6a512-1295-4272-9138-f99709370657
2010-10-06 12:52:00 +00:00
Thomas Martitz
d9d0b4dd20 Pixel-accurate (vertical) list scrolling for touchscreen targets.
Looks much smoother now as you don't scroll by whole lines anymore.
Add some functions lcd driver to enable the line based scrolling engine to draw the lines with a pixel-based y-offset.
This should also allow for a sensible kinetic scrolling mechanism (still a todo).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28214 a1c6a512-1295-4272-9138-f99709370657
2010-10-06 12:46:42 +00:00
Frank Gevaerts
8ff4f1aec9 Add optional (define BUFFER_ALLOC_DEBUG to enable it) code to check for code overflowing buffer_alloc()-allocated buffers.
Also add a panicf() if buffer_alloc() doesn't have enough space left to allocate a requested buffer


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28173 a1c6a512-1295-4272-9138-f99709370657
2010-09-26 12:05:42 +00:00
Andree Buschmann
0ef3616d10 Add current consumption and battery capacities to iPod nano 2G config file.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28165 a1c6a512-1295-4272-9138-f99709370657
2010-09-25 22:46:36 +00:00
Andree Buschmann
6a9cabc434 Implement lineout en-/disable for WM8975 and activate it for iPod nano 2G.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28159 a1c6a512-1295-4272-9138-f99709370657
2010-09-24 22:42:06 +00:00
Bertrik Sikken
c0edce8f5c iap: make variable serbuf non-global
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28128 a1c6a512-1295-4272-9138-f99709370657
2010-09-20 19:37:17 +00:00
Thomas Martitz
141673945e Fix typo
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28126 a1c6a512-1295-4272-9138-f99709370657
2010-09-20 17:42:46 +00:00
Thomas Martitz
ad500e1063 Redirect (L)DEBUGFs to adb logcat in DEBUG enabled builds.
Exclude compilation of firmware/debug.c for hosted platforms.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28125 a1c6a512-1295-4272-9138-f99709370657
2010-09-20 17:38:47 +00:00
Frank Gevaerts
d343bbe846 Allow e200 to compile without HAVE_RECORDING
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28104 a1c6a512-1295-4272-9138-f99709370657
2010-09-17 20:42:45 +00:00
Frank Gevaerts
bd43690170 Simplify unnecessary baroque preprocessor condition a bit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28101 a1c6a512-1295-4272-9138-f99709370657
2010-09-17 20:13:13 +00:00
Frank Gevaerts
b0351c7588 Only define USB_ENABLE_STORAGE if USB_HAS_BULK and USE_ROCKBOX_USB are both set
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28100 a1c6a512-1295-4272-9138-f99709370657
2010-09-17 20:00:04 +00:00
Rafaël Carré
520baf0b6a usb_drv_reset() is only used in usb-drv-arc.c
remove from usb_drv.h and mark static

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28092 a1c6a512-1295-4272-9138-f99709370657
2010-09-16 05:46:24 +00:00
Thomas Martitz
0d4585b28f Extend lc_open() to also being able to load overlay plugins.
For this it needs to look at the plugin header. Since lc_open() doesn't know
it's a plugin, the header needs to be changed slightly to include the new lc_header (which needs to be the first element in plugin_header so it can be casted savely).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28054 a1c6a512-1295-4272-9138-f99709370657
2010-09-09 16:17:21 +00:00
Thomas Martitz
dd5dd8cfd9 Rename cache coherency functions.
The old cache coherency function names where wrong and misleading.
The new names are (purposely different from vendor manuals)
*  commit_* (write-back only)
*  discard_* (removing lines from cache only)
*  commit_discard_* (write-back and removing lines from cache)

It's suspected the old names have led to wrong uses. The old names still exist
(as aliases) so every call via the old names need to be double checked and changed
to the new name.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28045 a1c6a512-1295-4272-9138-f99709370657
2010-09-08 17:05:49 +00:00
Rafaël Carré
9503e6ede3 as3525v2 usb: define USB_HAS_BULK
Ask for alignement of USB buffers on cache line
Also remind that the hardware is identical to the hardware in nano2g

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28033 a1c6a512-1295-4272-9138-f99709370657
2010-09-08 01:03:11 +00:00
Rafaël Carré
336cec2e1f Fix set_serial_descriptor() for targets with as3543
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28013 a1c6a512-1295-4272-9138-f99709370657
2010-09-06 18:26:17 +00:00
Rafaël Carré
c196da2cee FS#11597 : decrease FCLK frequency when unboosted
FCLK is unused because we use fastbus clocking: CPU clock = PCLK
Base PCLK off PLLA and use the lowest frqeuency for FCLK (24MHz source,
maximum divider)
Save a bit of power, adjust Clipv1/e200v2/Fuzev1 current usage accordingly

Note: the power saving (in mA) is a bit less on e200v2/Fuzev1 than on Clipv1

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28000 a1c6a512-1295-4272-9138-f99709370657
2010-09-05 15:34:34 +00:00
Rafaël Carré
bf0e907257 powermgmt.h: include config.h
AMS*: define CURRENT_MAX_CHG to give more correct estimation of recharge time
The amount of current each target draws from the charger is defined in
powermgmt-target.h

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27994 a1c6a512-1295-4272-9138-f99709370657
2010-09-03 07:03:07 +00:00
Amaury Pouly
f3da8d0ee3 as3525v2: revert the USB_DEVBSS_ATTR and the panicf redefinition, don't protected #undef of USB_NUM_ENDPOINTS
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27987 a1c6a512-1295-4272-9138-f99709370657
2010-09-02 13:46:34 +00:00
Amaury Pouly
e09a0857e8 as3525v2:
- change buffer alignement to 32 bytes (not sure if it's useful)
- flush rx fifo on reset
- use AS3525_PHYSICAL_ADDR for DMA
- reset endpoints structure states on reset
- force full speed for debugging purpose
- add more debugging code

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27986 a1c6a512-1295-4272-9138-f99709370657
2010-09-02 13:00:16 +00:00
Thomas Martitz
97ed213fce Fix typo
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27981 a1c6a512-1295-4272-9138-f99709370657
2010-09-02 03:53:09 +00:00
Thomas Martitz
f8381d9c39 Android: don't compile stubs.c and kill off libuisimulator entirely.
Seperate make rules in a almost empty android.make.
Also add forgotten powermgmt-android.c

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27977 a1c6a512-1295-4272-9138-f99709370657
2010-09-02 00:24:40 +00:00
Thomas Martitz
eac36d5a09 struct DIR -> DIR, should fix most if not all reds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27970 a1c6a512-1295-4272-9138-f99709370657
2010-09-01 21:45:58 +00:00
Thomas Martitz
dc8ad8684c Android: Enable software tone controls
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27969 a1c6a512-1295-4272-9138-f99709370657
2010-09-01 21:32:12 +00:00
Thomas Martitz
6eaab4d004 Ged rid of uisimulator/common/io.c for android builds.
Use host's functions for file i/o directly (open(), close() ,etc.), not the sim_* variants.
Some dir functions need to be wrapped still because we need to cache the parents dir's path (host's dirent doesn't let us know).
For the same reason (incompatibility) with host's dirent) detach some members from Rockbox' dirent struct and put it into an extra one,
the values can be retrieved via the new dir_get_info().

Get rid of the sim_ prefix for sleep as well and change the signature to unix sleep().

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27968 a1c6a512-1295-4272-9138-f99709370657
2010-09-01 21:29:34 +00:00
Amaury Pouly
8e0a0babc5 Revert an accidentaly change to debug.h that prevent simulator+debug build
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27967 a1c6a512-1295-4272-9138-f99709370657
2010-09-01 21:11:20 +00:00
Frank Gevaerts
a1cf4ced83 Unify 32mb and 64mb ipod video builds - FS#11580
Since memory on 32mb ipod videos is mapped twice, a 64mb build still has codecs and plugins mapped in a usable area. This means that all that needs to be done to support 32mb and 64mb boards with the same build is to adjust audiobufend to avoid using more than the actually present RAM.



git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27960 a1c6a512-1295-4272-9138-f99709370657
2010-08-31 19:06:04 +00:00
Thomas Martitz
a1997c13c1 Change lc_open_from_mem() return type to void*
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27947 a1c6a512-1295-4272-9138-f99709370657
2010-08-30 20:47:26 +00:00
Rafaël Carré
0f063b7d72 Implement lcd(_remote)_putsxyf() and export to plugins
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27921 a1c6a512-1295-4272-9138-f99709370657
2010-08-28 21:46:18 +00:00
Bertrik Sikken
a290ce4222 tcc77x targets: various minor cleanups
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27913 a1c6a512-1295-4272-9138-f99709370657
2010-08-28 10:17:19 +00:00
Fred Bauer
cf8f526d16 change get_glyph_size() to font_glyphs_to_bufsize(). fixes a bug when font glyph buffer < font header
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27911 a1c6a512-1295-4272-9138-f99709370657
2010-08-27 18:25:23 +00:00
Thomas Martitz
2c2e261648 Use system headers a bit more: use host's fcntl.h for O_RDONLY etc.
Removes the need to fix up those in the simulator.

Also work around some posix-mingw incompatibilities (e.g. getcwd()).

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27904 a1c6a512-1295-4272-9138-f99709370657
2010-08-27 12:38:25 +00:00
Thomas Martitz
194174a371 2nd try: Introduce a small api for loading code (codecs,plugins) from disk/memory.
It's a used by codec/plugin loading and vastly reduces code duplication. It's also a step forward in getting rid of libuisimulator in the application ports.

Apparently sh needs linker symbols prefixed with _ even if they're referenced without from C code.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27902 a1c6a512-1295-4272-9138-f99709370657
2010-08-27 00:29:50 +00:00
Thomas Martitz
97d2a6ec5c Revert "Introduce a small api for loading code (codecs,plugins) from disk/memory."
I don't understand the build error at all, plugin_bss_start is clearly defined in plugin.lds

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27901 a1c6a512-1295-4272-9138-f99709370657
2010-08-27 00:16:26 +00:00
Thomas Martitz
73f057be6f Introduce a small api for loading code (codecs,plugins) from disk/memory.
It's a used by codec/plugin loading and vastly reduces code duplication. It's also a step forward in getting rid of libuisimulator in the application ports.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27900 a1c6a512-1295-4272-9138-f99709370657
2010-08-26 23:20:02 +00:00
Jonathan Gordon
aaa1636a8b Move to a proper sdl key config instead of using the d2 pad. make the mouse wheel work, middle click is "select" and right click is "back"
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27891 a1c6a512-1295-4272-9138-f99709370657
2010-08-26 11:43:51 +00:00
Jonathan Gordon
faaf431d32 Accept FS#11567 by Fred Bauer - better memory management for the skin fonts
%Fl now takes an optional 3rd param which is the number of glyphs to cache (default to 256). the smaller the number, the less ram will be used (i.e using 15 for a font which only shown numbers is a good idea)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27882 a1c6a512-1295-4272-9138-f99709370657
2010-08-25 14:11:38 +00:00
Bertrik Sikken
aea21cd18b ipod fm remote: some static/const fixes from FS #11266 by me
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27867 a1c6a512-1295-4272-9138-f99709370657
2010-08-23 20:49:33 +00:00
Marcin Bukat
8d5f159687 Implement WHEEL_ACCELERATION for Ipod mini 1G based on code for 1G/2G.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27865 a1c6a512-1295-4272-9138-f99709370657
2010-08-23 19:56:17 +00:00
Jens Arnold
43ccc1eef7 Enable wheel acceleration and repeats for iPod 1st/2nd Gen, using the same settings as on iPod 3rd Gen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27849 a1c6a512-1295-4272-9138-f99709370657
2010-08-20 21:00:15 +00:00
Maurus Cuelenaere
934a5a5808 Android port: add support for hardware keys
* Forward Java KeyEvents to C layer and translate them to Rockbox BUTTON_*.
 * Add a basic Android keymap

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27832 a1c6a512-1295-4272-9138-f99709370657
2010-08-16 20:12:06 +00:00
Thomas Martitz
0e2286f226 Introduce NORETURN_ATTR wrapper for __attribute__((noreturn)), using this and a bit further cleanup in main gets rid of a warning when compiling for android.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27788 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 13:38:25 +00:00
Michael Sparmann
524035b772 Fix red: Revert the const correctness part, which opened a can of worms.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27780 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 08:43:18 +00:00
Michael Sparmann
f3834a4626 emBIOS backports part one: Fix an annoying race condition in the Synopsys OTG driver, and a bit of const correctness.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27779 a1c6a512-1295-4272-9138-f99709370657
2010-08-12 08:35:43 +00:00
Nils Wallménius
64ebe5f0d4 Delete useless #ifndef #endif pair.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27771 a1c6a512-1295-4272-9138-f99709370657
2010-08-11 08:46:20 +00:00
Thomas Martitz
ca4439ff65 Android port: handle incoming calls.
Stop explicitely if a call comes in, and resume playback (if it was playing before the call) upon hang up.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27746 a1c6a512-1295-4272-9138-f99709370657
2010-08-07 21:30:22 +00:00
Thomas Martitz
594110e962 Implement HAVE_LCD_ENABLE and lcd_update_rect(). When Rockbox runs in the background
this greatly reduces CPU load. lcd_update_rect shoves a bit as well.

CPU usage with Rockbox in background is between 3% (with a 200kbps vbr mp3) and 12% (320kbps cbr mp3), so it's low but still dependent on codecs and even particular files.
Driving a WPS with peakmeter, e.g. the builtin one, adds about 30% cpu usage.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27689 a1c6a512-1295-4272-9138-f99709370657
2010-08-04 01:03:25 +00:00
Rafaël Carré
82e1332db9 android: declare audiohw_set_volume()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27681 a1c6a512-1295-4272-9138-f99709370657
2010-08-03 17:53:38 +00:00
Thomas Martitz
240923a801 Rockbox as an application: Commit current Android port progress.
General state is: Rockbox is usable (plays music, saves configuration, touchscreen works too).
Problems:
 - Playing music in the background (i.e. when switching to another app) doesn't work reliably, but I'm working on that now.
 - no cabbiev2 (only some preliminary files for it), no other default theme.
 - screen flickers sometimes if the updates are too frequent
 - no multi screen apk/package
 - strange behavior when a phone call comes in

The java files (and the eclipse project) resides in android/, which is also supposed to be the build folder.
I've put a small README in there for instructions. There are some steps needed after the make part, which are described there,
and which eclipse mostly handles. But there ought to be some script/makefile rules which do that instead in the future.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27668 a1c6a512-1295-4272-9138-f99709370657
2010-08-02 20:34:47 +00:00
Thomas Martitz
9c0b2479f7 Rockbox as an application: add get_user_file_path().
For RaaA it evaluates user paths at runtime. For everything but codecs/plugins it will give the path under $HOME/.config/rockbox.org if write access is needed or if the file/folder in question exists there (otherwise it gives /usr/local/share/rockbox).
This allows for installing themes under $HOME as well as having config.cfg and other important files there while installing the application (and default themes) under /usr/local.

On the DAPs it's a no-op, returing /.rockbox directly.

Not converted to use get_user_file_path() are plugins themselves, because RaaA doesn't build plugins yet.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27656 a1c6a512-1295-4272-9138-f99709370657
2010-08-01 16:15:27 +00:00
Bertrik Sikken
38e0918eb5 Fix condition for compiling audiohw_set_monitor (should fix red)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27638 a1c6a512-1295-4272-9138-f99709370657
2010-07-31 13:01:52 +00:00
Marcin Bukat
1ee19676f2 Add optional CURRENT_ATA in runcurrent(). On MPIO HD200 powering ata takes ~100mA which is sagnificant contribution to the total power consumption.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27589 a1c6a512-1295-4272-9138-f99709370657
2010-07-27 21:27:51 +00:00
Marcin Bukat
e13d410761 HD200: comment out CURRENT_REMOTE as remote doesn't draw additional current (no lcd)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27588 a1c6a512-1295-4272-9138-f99709370657
2010-07-27 21:05:55 +00:00
Marcin Bukat
451138ba74 WM8750 - add ALC and NGAT related low level functions (disabled now by default)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27587 a1c6a512-1295-4272-9138-f99709370657
2010-07-27 20:57:33 +00:00
Bertrik Sikken
adc472bec5 FM tuner region code cleanup - FS #11492 by me.
This removes the tuner-specific region structs and makes each driver use the common one (which is now extended with a deemphasis field)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27579 a1c6a512-1295-4272-9138-f99709370657
2010-07-26 20:15:16 +00:00
Rafaël Carré
5215773c9f bootchart.h doesn't need _ansi.h, especially not in a relative path
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27553 a1c6a512-1295-4272-9138-f99709370657
2010-07-25 15:28:24 +00:00
Rafaël Carré
a72aa856bd Move some gcc extensions to new gcc_extensions.h header
- Move ATTRIBUTE_PRINTF/ATTRIBUTE_SCANF from _ansi.h
  They are not related at all to this file, and this broke compilation
  with Code Sourcery GCC which ships its own _ansi.h
- Move LIKELY/UNLIKELY from system.h

There is likely a lot more GCC extensions used everywhere in the source,
conditionally on __GNUC__ or unconditionally

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27548 a1c6a512-1295-4272-9138-f99709370657
2010-07-25 14:44:29 +00:00
Nils Wallménius
d15a4f617f Define CONFIG_REMOTE_KEYPAD for iaudio x5/m5 and add a keymap for that remote to the logo plugin. Fixes a warning when building with gcc 4.4.4.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27533 a1c6a512-1295-4272-9138-f99709370657
2010-07-23 20:20:40 +00:00
Rafaël Carré
7d9cc0e2ce CCU_BASE+0x20 is specific to AMSv2 -> move to as3525v2.h
Rename to simply 'CCU_USB'

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27518 a1c6a512-1295-4272-9138-f99709370657
2010-07-22 13:07:56 +00:00
Rafaël Carré
bd78dc7693 The new Fuzev2 use the same FM chip than some Clip+
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27502 a1c6a512-1295-4272-9138-f99709370657
2010-07-20 06:26:39 +00:00
Rafaël Carré
7d4414ebd8 AB_REPEAT_ENABLE was never defined to 2
There's only 2 possibilities: defined or undefined

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27483 a1c6a512-1295-4272-9138-f99709370657
2010-07-18 18:13:53 +00:00
Nils Wallménius
6d732a32bc Don't duplicate byteswap code. Invent system where NEED_GENERIC_BYTESWAPS is set if the generic functions from system.h are needed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27440 a1c6a512-1295-4272-9138-f99709370657
2010-07-15 22:01:06 +00:00
Marcin Bukat
d367ab41e3 HD200 - calibrate battery indicator based on measurements and battery_benches
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27350 a1c6a512-1295-4272-9138-f99709370657
2010-07-08 16:53:09 +00:00
Thomas Martitz
31b5c471ae Rockbox as an application: Add an 320x240 SDL application target.
It still works mostly like the simulator. There's also some minor left overs from the sim, but it does not define SIMULATOR.
It installs into the current (build) dir, and you need to run it with '--root .' (because it looks for ./.rockbox and not ./simdisk/rockbox) as options. That's one of the few kludges left that should be resolved soon'ish.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27310 a1c6a512-1295-4272-9138-f99709370657
2010-07-06 15:11:56 +00:00
Szymon Dziok
63c795a349 hdd6330: change the synaptics-mep driver in a few places according to the touchpad behavior.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27273 a1c6a512-1295-4272-9138-f99709370657
2010-07-04 12:03:38 +00:00
Marcin Bukat
971a6e9c94 HD200 - Setup codec as I2S master and enable recording
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27250 a1c6a512-1295-4272-9138-f99709370657
2010-07-02 21:09:28 +00:00
Michael Sevakis
e286b0bbc0 Remove atomic register bit manipulation functions from i.MX and s3c target code and introduce generic functions for ARM (bitmod32, bitset32, and bitclr32). Multiprocessor support is possible but just not implemented at the moment, only interrupt lockout.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27188 a1c6a512-1295-4272-9138-f99709370657
2010-06-30 02:02:46 +00:00
Tobias Diedrich
31cf6d5013 Enable HID support, clean up usb-drv-as3525.c a bit, add a workaround for weird Linux behaviour (don't have Windows to test with), we don't need to set up USB_PHY_EPx_INFO (OF doesn't bother either).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27164 a1c6a512-1295-4272-9138-f99709370657
2010-06-28 09:46:13 +00:00
Michael Sevakis
e0bb92f00f Should clear up rest of red. Add a required #define in the config for c200. Fix up some preprocessing directives. Hope it's all taken care of now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27141 a1c6a512-1295-4272-9138-f99709370657
2010-06-26 10:37:41 +00:00
Michael Sevakis
c3eca575b6 Fix red. Thought I had REC_SAMPR_DEFAULT covered if not otherwise specified as different than 44.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27140 a1c6a512-1295-4272-9138-f99709370657
2010-06-26 10:17:18 +00:00
Michael Sevakis
b15a523870 e200v1/c200v1: Implement limited samplerate switching. Rates 24kHz and below are being a bear as far as minor crackling at higher amplitude-- leave them out for the time being since no solution is currently evident. 48, 44, 32 (rec rates 24, 22, 16) seem perfectly fine. I'm betting c200 is ok to include because it uses the same setup as e200.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27139 a1c6a512-1295-4272-9138-f99709370657
2010-06-26 10:07:17 +00:00
Michael Giacomelli
103eabd31f Commit FS#11364 by me. Increases the A3525v2 volume range by 7.5dB. Each volume setting gets 7.5dB louder (if you listened before at 0dB, you would have to set it to about -7.5dB to get the same volume). As a result, the new 0dB actually is pretty close to max line level for a full scale voltage, so positive dB may clip, whereas before they did not because the scale was off. Thanks to dfkt and Tim Graf for help figuring this out.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27101 a1c6a512-1295-4272-9138-f99709370657
2010-06-24 01:11:51 +00:00
Amaury Pouly
237d9666cc as3525v2-usb: define number of enpoints correctly, write interrupt handler
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27098 a1c6a512-1295-4272-9138-f99709370657
2010-06-23 22:03:31 +00:00
Rafaël Carré
2494afccc4 playback.c: don't assume cacheline size is 16 bytes
ideally all targets should define CACHEALIGN_BITS, for now we default it
to 16 bytes if it's not specified

Since the buffer is already aligned in playback.c no need to align it
again in buffering.c

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27073 a1c6a512-1295-4272-9138-f99709370657
2010-06-23 04:34:18 +00:00
Tobias Diedrich
33faa05a06 Enable USE_ROCKBOX_USB on all AS3525v1, confirmed to work on C200v2 and E200v2, I'm confident it should work on the others too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27055 a1c6a512-1295-4272-9138-f99709370657
2010-06-22 15:49:22 +00:00
Tobias Diedrich
072c0a15cb usb_storage seems to be working now, enable USE_ROCKBOX_USB on C200v2, other AMSv1 untested.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27039 a1c6a512-1295-4272-9138-f99709370657
2010-06-22 05:46:54 +00:00
Bertrik Sikken
2062270964 Apply FS #11423 - Use udelay in AMS driver for FM radio I2C
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27035 a1c6a512-1295-4272-9138-f99709370657
2010-06-21 21:41:07 +00:00
Thomas Martitz
35e8b1429a Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with #if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently).
The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR).
The new define is to (de-)select code to compile on hosted platforms generally.

Should be no functional change to targets or the simulator.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
2010-06-21 16:53:00 +00:00
Michael Sparmann
43fa52aaca Also define STORAGE_ALIGN_ATTR if STORAGE_WANTS_ALIGN isn't defined
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26984 a1c6a512-1295-4272-9138-f99709370657
2010-06-20 12:34:08 +00:00
Michael Sparmann
3b97fbd91e Add a STORAGE_ALIGN_ATTR macro, similar to CACHEALIGN_ATTR, for consistency
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26982 a1c6a512-1295-4272-9138-f99709370657
2010-06-20 12:23:57 +00:00
Michael Sevakis
b7a8935dff iPod 3G: Implement wheel acceleration and repeats. Chosen settings feel pretty decent but can be tweaked.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26962 a1c6a512-1295-4272-9138-f99709370657
2010-06-19 20:09:37 +00:00
Rafaël Carré
b3e27a80e3 fix endif wrongly removed (should have been moved) in r26927
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26928 a1c6a512-1295-4272-9138-f99709370657
2010-06-18 17:47:06 +00:00
Rafaël Carré
23387e2759 as3525*: enable USB stack in bootloader (but not USE_ROCKBOX_USB yet)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26927 a1c6a512-1295-4272-9138-f99709370657
2010-06-18 17:39:22 +00:00
Rafaël Carré
fd715fa95c as3525*: enable MMU in bootloader
Reserve 1MB of DRAM for loading rockbox and use the rest as BSS
Write sdram setup in assembler and move it to a separate file, together
with MMU init code

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26926 a1c6a512-1295-4272-9138-f99709370657
2010-06-18 17:33:51 +00:00
Rafaël Carré
b812465bff as3525: bootloader USB mode
not working yet : an empty drive is detected
won't link on fuzev1: drivers allocated in usb_storage.c are too large

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26905 a1c6a512-1295-4272-9138-f99709370657
2010-06-18 01:47:39 +00:00
Michael Sevakis
2b640ba4b8 Switch iPod 3G to use EABI toolchain. Make necessary threading changes to avoid use of stack after switching to idle stack.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26898 a1c6a512-1295-4272-9138-f99709370657
2010-06-17 20:15:58 +00:00
Bertrik Sikken
ff8e76e9e5 The mystery FM chip in some Sansa Clip+ players has been identified as a RDA5802, so rename files and functions. Also fix several bugs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26871 a1c6a512-1295-4272-9138-f99709370657
2010-06-16 20:29:08 +00:00
Rafaël Carré
46e1231a44 FS#11402 by me : sd_enable for Sansa AMSv2
Gets a bit more battery life
Adjust current usage, it was a bit too low for Clipv2/Clip+

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26866 a1c6a512-1295-4272-9138-f99709370657
2010-06-16 06:08:04 +00:00
Bertrik Sikken
fcea117d21 Support for mystery FM chip in some Sansa Clip+, FS #11403 by me
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26864 a1c6a512-1295-4272-9138-f99709370657
2010-06-15 20:57:48 +00:00
Thomas Martitz
0cca15c6d0 Get rid of the STATICIRAM hack for eabi builds.
Once all targets are converted we should probably remove all traces of it entirely.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26791 a1c6a512-1295-4272-9138-f99709370657
2010-06-11 19:42:21 +00:00
Michael Sevakis
60f843bf18 Configure Gigabeat S with EABI compiler by default. Implement the INIT section that this enables (due to selective need for long calls). Remove pcm_postinit from INIT section since it's asynchronous. Disable strict aliasing on SPC codec for now just to shut it up.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26779 a1c6a512-1295-4272-9138-f99709370657
2010-06-11 14:39:35 +00:00
Rafaël Carré
95ef367854 drop 'req' from gas macro, not available in binutils 2.16
The build will error out anyway if regs are left blank

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26758 a1c6a512-1295-4272-9138-f99709370657
2010-06-11 04:50:51 +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é
c75b713bef c200v2: reduce the plugin even further
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26749 a1c6a512-1295-4272-9138-f99709370657
2010-06-10 19:30:59 +00:00
Rafaël Carré
2c9f4fad72 c200v2: reduce plugin buffer size nearly to minimum
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26745 a1c6a512-1295-4272-9138-f99709370657
2010-06-10 18:28:35 +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
Jonathan Gordon
863891ce9a Enable the hotkey feature on the touchscreen targets who now have a hotkey touchregion settable in the wps (todo: touchregions in the sbs!)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26742 a1c6a512-1295-4272-9138-f99709370657
2010-06-10 15:05:14 +00:00
Jonathan Gordon
10e24d22c4 rename HAVE_PICTUREFLOW to HAVE_PICTUREFLOW_INTEGRATION to make it more clear what it is needed for
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26716 a1c6a512-1295-4272-9138-f99709370657
2010-06-09 08:51:29 +00:00
Jonathan Gordon
881a5b9759 reclaim most of the delta from the pictureflow commit
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26715 a1c6a512-1295-4272-9138-f99709370657
2010-06-09 08:14:41 +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
Rafaël Carré
82e40076d1 CPU_PP implies CPU_ARM is defined
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26690 a1c6a512-1295-4272-9138-f99709370657
2010-06-08 14:24:07 +00:00
Rafaël Carré
9730755fc7 Remove CORELOCK_SWAP (unused since r16981)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26664 a1c6a512-1295-4272-9138-f99709370657
2010-06-07 16:23:21 +00:00
Frank Gevaerts
d39ac31877 Make disk_init() non-static again. I forgot to look at the bootloaders
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26629 a1c6a512-1295-4272-9138-f99709370657
2010-06-06 13:28:13 +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
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
Torne Wuff
2eb0142587 New USB charging system, part 2 - "Force" charging mode
Enable support for the "force" mode of USB charging. This should work on Gigabeat S and Nano2g (and any other future target which has a RB usb stack and supports charging) - if a host connection is not detected within 10 seconds of USB insertion, assume that the connected device is an AC charger and charge anyway, if the user has specified "force" as the mode.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26594 a1c6a512-1295-4272-9138-f99709370657
2010-06-05 20:43:30 +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
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
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é
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
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
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
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é
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é
7ad50c6f59 as3525: write irq/fiq handlers in C
Declare VIC registers holding function pointers as volatile pointers to
function pointers and access them directly without casting
UIRQ() is an IRQ handler too, even if it doesn't return

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26313 a1c6a512-1295-4272-9138-f99709370657
2010-05-26 16:03:01 +00:00
Rafaël Carré
4876a44e7a Clipv1 battery capacity is 330mAh
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26261 a1c6a512-1295-4272-9138-f99709370657
2010-05-24 18:12:31 +00:00
Michael Sevakis
d56999890f Make PCM->driver interface about as simple as it will get. Registered callback, zero data, alignment and stops are handled entirely inside pcm.c; driver merely calls fixed pcm.c callback. Remove pcm_record_more and do it just like playback; the original reason behind it isn't very practical in general. Everything checks out on supported targets. There wer some compat changes I can't check out on many unsupoorted but if there's a problem it will be a minor oops. Plugins become incompatible due to recording tweak-- full update. Sorted API.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26253 a1c6a512-1295-4272-9138-f99709370657
2010-05-24 16:42:32 +00:00
Rafaël Carré
ba46c88c6f rtc_enable_alarm() needs no return value
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26245 a1c6a512-1295-4272-9138-f99709370657
2010-05-22 00:28:26 +00:00
Rafaël Carré
172fc967b0 as3525v2: RTC alarm
A specific poweroff function needs to be used for wake-up to work
Disable RTC in bootloaders for consistency with other Sansas

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26243 a1c6a512-1295-4272-9138-f99709370657
2010-05-22 00:28:03 +00:00
Rafaël Carré
2e004fd404 fuzev1: don't enable RTC in the bootloader
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26242 a1c6a512-1295-4272-9138-f99709370657
2010-05-22 00:27:53 +00:00
Rafaël Carré
bae0756acf as3525: don't use IRAM for usb, and avoid usb storage using uncached addresses behind our back
No need for special address handling, all addresses are equal to their physical address

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26176 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 17:56:47 +00:00
Thomas Martitz
0b28594036 Revert r26060. A better fix was found. The acceleration should be fixed once for all now.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26175 a1c6a512-1295-4272-9138-f99709370657
2010-05-19 17:34:12 +00:00