Commit graph

158 commits

Author SHA1 Message Date
Michael Sevakis
e2a25592f8 Gigabeat S has no need for a USB tick. Put in a simple framework that allows USB monitoring by event. Also add a couple missed usb_enable calls when the connection is not for 'slave mode'.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19768 a1c6a512-1295-4272-9138-f99709370657
2009-01-14 07:01:49 +00:00
Michael Sevakis
09484db740 Fix more red. Missed one other place it needed #ifdef HAVE_USB_POWER.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19764 a1c6a512-1295-4272-9138-f99709370657
2009-01-13 17:04:31 +00:00
Michael Sevakis
6645e9b109 Fix red. Forgot to add a #ifdef HAVE_USB_POWER in one spot.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19763 a1c6a512-1295-4272-9138-f99709370657
2009-01-13 16:45:36 +00:00
Michael Sevakis
6da8b4eb49 USB retweaking: Take out the USB_REQUEST/RELEASE_DISK scheme and simply ask the USB core whether or not any drivers require exclusive access at the moment of connect. Doing anthing else just produces nasty effects on Windows because it expects some communication just for enabling the PHY and not allowing it to mount volumes if a thread doesn't ack causes annoying error message boxes. Make behavior of each USB type identical from the system perspective. Some miscellaneous changes (simplify, ata->storage naming, define only used USB_* enums values were possible).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19762 a1c6a512-1295-4272-9138-f99709370657
2009-01-13 16:27:35 +00:00
Michael Sevakis
93572e2a9e Keyclick fixup take two. It is only 88 samples (2msec) long so keep a small static buffer around for beeps less than or equal to keyclick duration. This way it operates no matter the buffer state and still won't interfere with alternate PCM operations like recording or plugin playback.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19415 a1c6a512-1295-4272-9138-f99709370657
2008-12-13 06:01:08 +00:00
Michael Sevakis
826688e699 PCM buffer beeping needs the audio buffer reset in order to work after operations that trash the buffer or keyclick won't be audible until playback is restarted.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19413 a1c6a512-1295-4272-9138-f99709370657
2008-12-13 02:48:36 +00:00
Michael Sevakis
f2f394793c Fix red and a couple other things I somehow missed.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19378 a1c6a512-1295-4272-9138-f99709370657
2008-12-10 09:11:43 +00:00
Michael Sevakis
8cfbd3604f Use cookies for thread identification instead of pointers directly which gives a buffer against wrongly identifying a thread when the slot is recycled (which has been nagging me for awhile). A slot gets 255 uses before it repeats. Everything gets incompatible so a full update is required.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19377 a1c6a512-1295-4272-9138-f99709370657
2008-12-10 08:57:10 +00:00
Michael Sevakis
bc963c34ae Hopefully mop-up remaining red.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19317 a1c6a512-1295-4272-9138-f99709370657
2008-12-03 21:15:44 +00:00
Michael Sevakis
58eb784a5d Straighten out some powermanagement stuff. Give target complete control over how power inputs are sensed. Clean SIMULATOR stuff out of target files. Get rid of USB charging option on targets that don't support it or don't implement it yet. Menu string remains to avoid language incompatibility but should be removed on next cleanup for targets not using it (notice in english.lang). global_settings becomes incompatible for some builds and so plugin API version is incremented.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19315 a1c6a512-1295-4272-9138-f99709370657
2008-12-03 19:54:25 +00:00
Frank Gevaerts
ca123a1ad3 don't waste time and binsize enabling the usb controller just before rebooting
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19277 a1c6a512-1295-4272-9138-f99709370657
2008-11-30 20:39:53 +00:00
Maurus Cuelenaere
c0b43a5ac2 Commit some USB and ATA rework/refactoring (+ USB GPIO detection).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19165 a1c6a512-1295-4272-9138-f99709370657
2008-11-21 12:50:06 +00:00
Frank Gevaerts
c0ff14afe3 Properly guard usb_mmc_countdown with the proper #ifs everywhere
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19053 a1c6a512-1295-4272-9138-f99709370657
2008-11-09 14:40:42 +00:00
Frank Gevaerts
2f8a0081c6 Apply FS#9500. This adds a storage_*() abstraction to replace ata_*(). To do that, it also introduces sd_*, nand_*, and mmc_*.
This should be a good first step to allow multi-driver targets, like the Elio (ATA/SD), or the D2 (NAND/SD).


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18960 a1c6a512-1295-4272-9138-f99709370657
2008-11-01 16:14:28 +00:00
Frank Gevaerts
19d1cacb1a cleanup storage defines
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18950 a1c6a512-1295-4272-9138-f99709370657
2008-10-31 21:25:04 +00:00
Vitja Makarov
91b9c6139b telechips usb: not ready for use but, something is working, needs improvement.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18806 a1c6a512-1295-4272-9138-f99709370657
2008-10-14 05:13:21 +00:00
Frank Gevaerts
46573019a5 add HAVE_DISK_STORAGE, and use that instead of HAVE_FLASH_STORAGE when checking for an actual disk (i.e. related to spindown, skipping,...)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18735 a1c6a512-1295-4272-9138-f99709370657
2008-10-07 19:37:33 +00:00
Jens Arnold
e823b2e488 Fix red.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18633 a1c6a512-1295-4272-9138-f99709370657
2008-09-24 21:17:53 +00:00
Jens Arnold
938ef22c02 Repair bootbox on the archoses (that bug went undetected for >2.5 years), and get rid of some old debug cruft in order to save space.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18631 a1c6a512-1295-4272-9138-f99709370657
2008-09-24 21:09:46 +00:00
Jens Arnold
cf978b9fa3 Fix wrong #endif placement.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18534 a1c6a512-1295-4272-9138-f99709370657
2008-09-16 21:59:01 +00:00
Frank Gevaerts
b3bebc73d5 properly remount the filesystem after usb disconnect with software usb
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18323 a1c6a512-1295-4272-9138-f99709370657
2008-08-20 20:32:12 +00:00
Daniel Stenberg
2acc0ac542 Updated our source code header to explicitly mention that we are GPL v2 or
later. We still need to hunt down snippets used that are not. 1324 modified
files...
http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-28 18:10:04 +00:00
Maurus Cuelenaere
e031db4b87 1) Use a separate config-<target>.h for Zen Vision(:M) (60GB)
2) Other unrelated cleanups


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17503 a1c6a512-1295-4272-9138-f99709370657
2008-05-14 18:55:19 +00:00
Michael Sevakis
80278e45aa Bring Gigabeat S bootloader one step close to a release version.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17442 a1c6a512-1295-4272-9138-f99709370657
2008-05-10 18:00:11 +00:00
Maurus Cuelenaere
95167e0177 Commit whole Creative Zen Vision:M target tree + all related firmware/
changes.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17241 a1c6a512-1295-4272-9138-f99709370657
2008-04-24 20:08:28 +00:00
Michael Sevakis
94f7d0f290 UMS for the Gigabeat S. Bootloader USB mode. Has a couple quirks 1) First plug has problems if cold. Replug if it doesn't connect or not at high speed 2) Linux doesn't like the odd bootable flag value used in the partitions so it won't mount but Windows works. Fix minor OTG driver bugs and clean up device memory handling. Generic name for ARC controller driver.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17154 a1c6a512-1295-4272-9138-f99709370657
2008-04-18 16:42:50 +00:00
Jonathan Gordon
95f7b4db01 Hopefully fix FS#8506 (OF cant be loaded on some PP targets). also hopefully fixes usb detection for at least e200
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17017 a1c6a512-1295-4272-9138-f99709370657
2008-04-07 13:00:28 +00:00
Michael Sevakis
af395f4db6 Do core interrupt masking in a less general fashion and save some instructions to decrease size and speed things up a little bit. Small fix to a few places where interrupts would get enabled again where they shouldn't have been (context switching calls when disabled).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16811 a1c6a512-1295-4272-9138-f99709370657
2008-03-26 01:50:41 +00:00
Frank Gevaerts
7e56df03bf Set usb_state to USB_POWERED on plugin for software usb device. Otherwise, the state would remain USB_EXTRACTED when connected to a charger
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16752 a1c6a512-1295-4272-9138-f99709370657
2008-03-22 22:37:26 +00:00
Frank Gevaerts
7ee63e22c5 fix H10 not rebooting on usb connect. Apologies to H10 users who enjoyed their free but unintended USB stack.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16734 a1c6a512-1295-4272-9138-f99709370657
2008-03-21 20:22:04 +00:00
Frank Gevaerts
1544b36966 move an #endif to its proper place. This should not actually change anything
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16732 a1c6a512-1295-4272-9138-f99709370657
2008-03-21 19:34:46 +00:00
Frank Gevaerts
ea5903dbf1 move boosting for usb around a bit, so the cpu is boosted for the entire duration of actual use of storage. On some setups just boosting for the actual transfers doesn't seem to work
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16726 a1c6a512-1295-4272-9138-f99709370657
2008-03-20 22:05:11 +00:00
Frank Gevaerts
a0290607e0 remember to test a bit more when doing larger changes...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16621 a1c6a512-1295-4272-9138-f99709370657
2008-03-10 21:16:31 +00:00
Frank Gevaerts
745133014e make the usb storage driver handle hotswap correctly, and exit the usb screen once all drives are "ejected" (either as a command from the OS or physically)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16617 a1c6a512-1295-4272-9138-f99709370657
2008-03-10 20:55:24 +00:00
Frank Gevaerts
f0b4a32d6f reorganise the usb stack to provide a clean separation between core and class drivers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16541 a1c6a512-1295-4272-9138-f99709370657
2008-03-06 21:25:09 +00:00
Frank Gevaerts
776d015cc4 implement logf over usb-serial. Needs USB_SERIAL defined in usb_core.h to work, and needs to be enabled in the debug menu.
It stops sending data after a while for unknown reasons.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16486 a1c6a512-1295-4272-9138-f99709370657
2008-03-02 20:45:33 +00:00
Frank Gevaerts
bf03c3cc9d don't do small cleanups just before going to sleep...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16474 a1c6a512-1295-4272-9138-f99709370657
2008-03-02 00:53:24 +00:00
Frank Gevaerts
b879afd600 small cleanup
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16473 a1c6a512-1295-4272-9138-f99709370657
2008-03-02 00:43:45 +00:00
Frank Gevaerts
014568590d Make it not reboot when plugged into a wall charger with USE_ROCKBOX_USB diabled as well...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16472 a1c6a512-1295-4272-9138-f99709370657
2008-03-02 00:32:20 +00:00
Frank Gevaerts
f18d20ee36 Only show the usb screen once a real usb connection is established. In case other threads are slow in acknowledging the SYS_USB_CONNECTED message, tell the OS that the disk is not ready yet (the OS interprets this as "spinning up")
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16471 a1c6a512-1295-4272-9138-f99709370657
2008-03-02 00:15:02 +00:00
Barry Wardell
8867c6a1cb HAVE_POWER isn't defined for any target. It should be HAVE_USB_POWER.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16442 a1c6a512-1295-4272-9138-f99709370657
2008-02-28 10:11:29 +00:00
Frank Gevaerts
dcae188c95 check for HAVE_POWER outside all uses of USBPOWER_BUTTON
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16436 a1c6a512-1295-4272-9138-f99709370657
2008-02-27 19:23:16 +00:00
Frank Gevaerts
6e7fac7c34 move the usb_core thread functionality to the main usb thread
fix button-detection so screenshots and charge-only mode work without enabling UMS
firewire detection is now handled separately from usb detection
increase the usb thread priority while an UMS connection is active


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16435 a1c6a512-1295-4272-9138-f99709370657
2008-02-27 19:08:30 +00:00
Björn Stenberg
b4e5123e5d New USB stack
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15758 a1c6a512-1295-4272-9138-f99709370657
2007-11-22 20:51:00 +00:00
Michael Sevakis
84f5c5c3e3 Take out some NOCACHEBSS_ATTR's that were accidentally left. Put some threading code in IRAM that should be there on PP502x.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15155 a1c6a512-1295-4272-9138-f99709370657
2007-10-16 22:00:51 +00:00
Michael Sevakis
a9b2fb5ee3 Finally full multicore support for PortalPlayer 502x targets with an eye towards the possibility of other types. All SVN targets the low-lag code to speed up blocking operations. Most files are modified here simple due to a name change to actually support a real event object and a param change to create_thread. Add some use of new features but just sit on things for a bit and leave full integration for later. Work will continue on to address size on sensitive targets and simplify things if possible. Any PP target having problems with SWP can easily be changed to sw corelocks with one #define change in config.h though only PP5020 has shown an issue and seems to work without any difficulties.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15134 a1c6a512-1295-4272-9138-f99709370657
2007-10-16 01:25:17 +00:00
Michael Sevakis
7914e90738 Commit a subset of the dual core changes that have to do with cache handling, stacks, firmware startup and thread startup. Tested on e200, H10-20GB, iPod Color and 5.5G. Thread function return implemented for all targets. Some changes to plugins to follow shortly.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14879 a1c6a512-1295-4272-9138-f99709370657
2007-09-28 10:20:02 +00:00
Dave Chapman
1672350378 FS #7691 - improved USB detection on PP devices. This patch modifies the target-tree function usb_detect() on all targets from bool to int, returning USB_INSERTED or USB_EXTRACTED instead of true or false. This was done to enable the PP usb_detect() to check for USB_POWER (either a connection to a USB wall charger, or the user holding "charge mode" button) and return that as a third value.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14600 a1c6a512-1295-4272-9138-f99709370657
2007-09-04 08:03:07 +00:00
Michael Sevakis
1167e3c72f Accept FS#7134 - Sansa: external sd card support by Antonius Hellmann with some tweaks. All testers have given the green light. (Now for the RED ?? ;).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13741 a1c6a512-1295-4272-9138-f99709370657
2007-06-30 02:08:27 +00:00
Jens Arnold
fad79dc636 Moved archos USB handling to target tree. Minor simplification for coldfire (only one usb-target.h).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13110 a1c6a512-1295-4272-9138-f99709370657
2007-04-11 20:44:32 +00:00