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
per seconds apparently don't very well.
Not sure if it's the hardware or our threading that doesn't play well enough
here (UI isn't less response despite of the audio drop outs).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28144 a1c6a512-1295-4272-9138-f99709370657
* Until BUTTON_REPEAT was started, coordinate changes were not exposed. Change
that (post on every coordinate change) so that wiping over the screen does actually
something between the first touch and BUTTON_REPEAT
* Once BUTTON_REPEAT is active, further repeats are posted in an acceleration
fashion (slow at the begginning), which smoothes list scrolling. But this has
the contrary effect on touchscreen, as it makes swiping appear very laggy. So,
remove that acceleration for touchscreen and make it equally fast at all times
so the scrollbar is better usable.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28143 a1c6a512-1295-4272-9138-f99709370657
Exclude compilation of firmware/debug.c for hosted platforms.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28125 a1c6a512-1295-4272-9138-f99709370657
This is related to gdb, and gdb can only work on SH and ifp
This was mistakenly kept when app.lds was forked for each SoC
Side-effect: fix DEBUG builds when the rockbox binary is expected to
be loaded at the start of DRAM and there is no runtime relocation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28124 a1c6a512-1295-4272-9138-f99709370657
- %s was missing the argument (function name)
- add %p to print the function argument
- also don't call strlen() to test string nullity (and strlen() can't return a negative result)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28123 a1c6a512-1295-4272-9138-f99709370657
This doesn't change the value with the current HZ=100,
but makes it easy to change HZ in custome builds and still have buttons be usable
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28086 a1c6a512-1295-4272-9138-f99709370657
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
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
IN & OUT interrupts have not much in common so move each to its own
function
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28043 a1c6a512-1295-4272-9138-f99709370657
- reorder members (largest members first)
- int status -> int8_t status (we only use 0 or -1)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28042 a1c6a512-1295-4272-9138-f99709370657
- use a single table to store endpoints numbers (1 table by direction)
- drop __ prefix since the table isn't meant to be hidden (it is used in
reset_endpoints()
- the tables won't change at runtime: mark const
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28038 a1c6a512-1295-4272-9138-f99709370657
set status to failure before signaling usb_drv_send_nonblocking() in
reset_endpoints()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28037 a1c6a512-1295-4272-9138-f99709370657
Use ep0_setup_pkt as a pointer
Fix comment for CGU_USB clk source
Remove comment about physical address, the macro handles that for us
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28035 a1c6a512-1295-4272-9138-f99709370657
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
Since we'll receive data from DMA in this buffer we don't need to write-back
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28032 a1c6a512-1295-4272-9138-f99709370657
- don't use *_dcache_range() on uncached memory
- remove unused struct endpoint->buffer
- use correct *_dcache_range() in usb_drv_transfer() for each direction
- halve FIFO size
sometimes mounts / sometimes fails
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28031 a1c6a512-1295-4272-9138-f99709370657
- implement request_endpoint
- setup nextep chain for in endpoints
- remove useless dcache operation on IN transfer completion
- fix transfers to use correct max packet size
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28028 a1c6a512-1295-4272-9138-f99709370657
- use uncached address to access setup packet
- implement driver exit
- stop forcing full speed
- change fifo sizes on init
- don't call invalid_dache() on setup packet because it makes everything fail
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28027 a1c6a512-1295-4272-9138-f99709370657
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
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
- 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
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
Instead implement a bit of battery monitoring. Currently it only fetches the battery level (in %) every 30s,
but it could do more like battery status, charger connected, voltage...
Theoretically, we could also exit/quit after some time of inactivity too
(perhaps not a bad idea since Rockbox puts a slight but still non-zero CPU load even if doing nothing).
Ironically, Rockbox is now the only way to get the exact battery level (at least I haven't found anything yet) on my phone :-)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27974 a1c6a512-1295-4272-9138-f99709370657
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
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
Without this change the backlight would be enabled but the screen would
show the last content displayed before the screen went off
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27957 a1c6a512-1295-4272-9138-f99709370657
This is the first step to allowing a single build which will work on any ipodvideo.
A global variable, probed_ramsize, is initialised to either 32 or 64 early in boot.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27937 a1c6a512-1295-4272-9138-f99709370657
ata-meg-fx: use unsigned line number, so % (modulo) is optimized
tcc7*: use proper printf format and remove casting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27935 a1c6a512-1295-4272-9138-f99709370657
The driver is stable so we can use error codes for debugging
Fix 2 problems in error code path:
- release sd mutex
- release dma module when needed
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27915 a1c6a512-1295-4272-9138-f99709370657
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
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
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
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
%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
fix DMA buffers when the src/dst is in IRAM
It worked fine because all the buffers are in DRAM, and the virtual
address happens to be the physical address
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27876 a1c6a512-1295-4272-9138-f99709370657
(USB stack is not used by default)
This makes debugging the USB driver easier
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27847 a1c6a512-1295-4272-9138-f99709370657
Users will have to reboot to OF manually or to power off, and then plug USB
No message is displayed because usb_detect() is run from a tick
This lacks documentation but should be OK for Unstable devices, and
will hopefully prevent clueless users from opening their devices and
breaking them definitely, instead of waiting for the battery to power
off.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27837 a1c6a512-1295-4272-9138-f99709370657
* 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
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
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
the activity only attaches to the framebuffer for displaying it. An icon
in the notification area is displayed (it could be prettier I guess).
Note: Some HTC phones won't, includng mine, get enough CPU time to do background decoding
fluently, see: http://code.google.com/p/android/issues/detail?id=9663
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27686 a1c6a512-1295-4272-9138-f99709370657
Android can now be built with CPU_ARM defined
Needs investigation (and test_codec) to see if/how this helps
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27684 a1c6a512-1295-4272-9138-f99709370657
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
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
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
- 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
If the card is not actively deselected on newer Fuzev2, frequent
switches between internal storage and µSD will lock up.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27500 a1c6a512-1295-4272-9138-f99709370657
playing from µSD now works to some degree
database update or copy between the 2 drives lock up
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27496 a1c6a512-1295-4272-9138-f99709370657
fuzev2 button_read_device() runs in interrupt context so writes are atomic
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27494 a1c6a512-1295-4272-9138-f99709370657
- Revert BUTTON_HOME
- Modifications to SD driver (µSD not working yet)
TODO: µSD and FM radio
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27492 a1c6a512-1295-4272-9138-f99709370657
Remove four remaining uses of %z, three of which were in DEBUGF
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27479 a1c6a512-1295-4272-9138-f99709370657
SIMVER was really only used to detect a simulator build. With APP_TYPE you can
now differentiate between simulator, application, checkwps and database builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27372 a1c6a512-1295-4272-9138-f99709370657
BUTTON_LEFT is a rockbox define, we must use SDL_BUTTON_LEFT
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27367 a1c6a512-1295-4272-9138-f99709370657
- remove infinite loop after exit()
- make sure picture_surface is initialized, and free it
- split gui_message_loop() in 3 functions and change prototype
- some code is only used in simulator
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27366 a1c6a512-1295-4272-9138-f99709370657
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
The new controller framebuffer (different from what is in clipv1/clipv2 and some clip+) has 128 columns, the old has 132 columns and is centered on the screen.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27257 a1c6a512-1295-4272-9138-f99709370657
There was a stupid bug in endpoint listing which caused random cancelling of EP0 transfers. The new scheme to handle EP0 transfers should avoid an unexpected setup packet which might cause a deadlock or confuse the core.
There is still an issue with the cancel_transfers function is still.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27178 a1c6a512-1295-4272-9138-f99709370657
Should also work for Fuzev1, although not tested. Connect dock after booting Rockbox. Connecting dock with power off will boot into OF.
TODO: enable/disable line out based on dock connection status, add additional devices (Fuzev2 and c200v2)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27162 a1c6a512-1295-4272-9138-f99709370657
There is still a problem after the set address request which makes the driver working randomly.
I still didn't manage do get a proper disconnect interrupt.
From time to time, when unplugging cable, neither rockbox nor usb driver reports disconnect even.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27161 a1c6a512-1295-4272-9138-f99709370657
On tx underruns, a write is aborted early, leaving the dma channel active.
We didn't explicitly disable it, so there were still 4 words in the dma
controller fifo, corrupting the retried write.
To chase this bug I added verify after write, if no one sees write errors in
the next week or so this can be removed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27113 a1c6a512-1295-4272-9138-f99709370657
We always need to write MCI_ARGUMENT register so if the command expects
no argument just set the function argument to 0
Code is now similar to as3525v2
hint: merging the 2 and/or all the SD drivers would be nice
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27088 a1c6a512-1295-4272-9138-f99709370657
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