Bertrik Sikken
8d1d2f8982
AMS: consistently use bitclr32/bitset32/bitmod32 for register CCU_IO (instead of using |= or &= )
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29748 a1c6a512-1295-4272-9138-f99709370657
2011-04-18 21:13:40 +00:00
Bertrik Sikken
c2ca4bec9d
AMSv1 sd: work-around for detection problem with some sd cards (delay after switching to high-speed)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29746 a1c6a512-1295-4272-9138-f99709370657
2011-04-18 20:08:47 +00:00
Bertrik Sikken
59e37cbccb
AMS sd: use defines instead of direct values for drive number
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29696 a1c6a512-1295-4272-9138-f99709370657
2011-04-09 07:57:53 +00:00
Bertrik Sikken
67a4e9befc
Sansa Clip v2: there's no need to use |= or &= to manipulate a GPIO for the button light
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29695 a1c6a512-1295-4272-9138-f99709370657
2011-04-08 21:51:46 +00:00
Bertrik Sikken
f608229f32
Sansa clip+: do not set GPIO B7 in the display driver, it's already used for FM radio I2C
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29668 a1c6a512-1295-4272-9138-f99709370657
2011-04-02 08:24:14 +00:00
Bertrik Sikken
eab630a1e1
AMSv2: fix dependency between button light and sd card control for fuze v2 variant 0
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29667 a1c6a512-1295-4272-9138-f99709370657
2011-04-01 21:29:08 +00:00
Bertrik Sikken
8351a1aa9d
AMSv2 sd: do not try to switch sd cards into high-speed mode.
...
High-speed mode is only half implemented (sd controller still uses normal speed) and causes card detection problems.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29660 a1c6a512-1295-4272-9138-f99709370657
2011-03-29 20:37:40 +00:00
Bertrik Sikken
5c4c691cd3
AMSv2 sd: correct CLKENA settings (to stop sd clock when idle) for AMSv2 variant 1 players
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29657 a1c6a512-1295-4272-9138-f99709370657
2011-03-28 20:46:56 +00:00
Bertrik Sikken
7d74fdec02
AMSv2 sd: do sd slot switching with GPIO B5 only for AMSv2 variant 1
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29656 a1c6a512-1295-4272-9138-f99709370657
2011-03-28 18:08:03 +00:00
Bertrik Sikken
86c4ec7277
AMSv2 SD: use INTERNAL_AS3525 and SD_SLOT_AS3525 defines instead of a direct value
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29652 a1c6a512-1295-4272-9138-f99709370657
2011-03-26 23:31:29 +00:00
Bertrik Sikken
502e9e97b6
AMSv2 SD: wait for response to command SD_STOP_TRANSMISSION instead of ignoring the response
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29651 a1c6a512-1295-4272-9138-f99709370657
2011-03-26 21:22:30 +00:00
Bertrik Sikken
6512f0fb52
AMSv2 SD: reorganise code to select 4-bit mode data transfer mode a bit and add comments
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29648 a1c6a512-1295-4272-9138-f99709370657
2011-03-26 21:12:16 +00:00
Bertrik Sikken
2543340bf4
AMSv2 SD: sd card communication speed can be changed back to full speed after CMD3 (SEND_RCA)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29647 a1c6a512-1295-4272-9138-f99709370657
2011-03-26 19:52:42 +00:00
Rafaël Carré
688545ea16
fix warning, use unsigned variable
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29638 a1c6a512-1295-4272-9138-f99709370657
2011-03-24 10:54:30 +00:00
Rafaël Carré
669313a11d
SD AMSv2: fix r29625
...
The number of blocks could have been checked while the card was not initialized yet.
See FS#11870 for details
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29637 a1c6a512-1295-4272-9138-f99709370657
2011-03-24 10:43:47 +00:00
Bertrik Sikken
d3c796d20e
AMSv2 SD: send 80 idle clocks before sending initial CMD0 (go idle state)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29630 a1c6a512-1295-4272-9138-f99709370657
2011-03-21 23:24:59 +00:00
Bertrik Sikken
fc0ad4c01e
AMSv2 SD: receive sd card command responses during initialisation instead of ignoring them
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29629 a1c6a512-1295-4272-9138-f99709370657
2011-03-21 22:04:25 +00:00
Bertrik Sikken
3d3c0c51ec
AMSv2 SD: wait for previous data transfer completion before sending a command
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29628 a1c6a512-1295-4272-9138-f99709370657
2011-03-21 21:41:50 +00:00
Bertrik Sikken
6bf0f65388
AMSv2 SD: use a sleep instead of a udelay for 100 ms delay
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29627 a1c6a512-1295-4272-9138-f99709370657
2011-03-21 20:41:53 +00:00
Rafaël Carré
82f2bb99ae
SD AMSv2: fix r29169
...
Restore access to the last AMS_OF_SIZE == 0xF000 sectors of internal drive
Mostly visible when using USB (or database?)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29625 a1c6a512-1295-4272-9138-f99709370657
2011-03-20 17:04:31 +00:00
Rafaël Carré
1675e98925
SD amsv2: remove double assignement
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29624 a1c6a512-1295-4272-9138-f99709370657
2011-03-20 17:04:19 +00:00
Bertrik Sikken
faeb4d6aef
Add another delay in the AMSv2 sd controller driver as a work-around for SD initialisation problems, see FS#11870
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29619 a1c6a512-1295-4272-9138-f99709370657
2011-03-20 09:57:43 +00:00
Michael Sevakis
12375d1d3a
Merge functionality of wakeups and semaphores-- fewer APIs and object types. semaphore_wait takes a timeout now so codecs and plugins have to be made incompatible. Don't make semaphores for targets not using them.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29492 a1c6a512-1295-4272-9138-f99709370657
2011-03-02 08:49:38 +00:00
Michael Chicoine
f9b05adc91
Return valid tuner ID even when tuner is not detected properly. Fixes FS#11791
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29378 a1c6a512-1295-4272-9138-f99709370657
2011-02-22 13:58:06 +00:00
Michael Sevakis
a2e4a51825
AMSv2 USB: Remove usb_enable call that occurs after core is already initialized and the usb_disable call while in ISR. Also, no point in panicing over a disconnect.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29205 a1c6a512-1295-4272-9138-f99709370657
2011-02-04 05:46:55 +00:00
Andree Buschmann
adf7224538
Fix red. Replace remaining MEM's mit MEMORYSIZE.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29190 a1c6a512-1295-4272-9138-f99709370657
2011-02-02 17:55:04 +00:00
Andree Buschmann
5d849a963e
Clean up multiple definitions of RAM size. Remove -DMEM (make) and MEM (code), use the already defined MEMORYSIZE instead.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29189 a1c6a512-1295-4272-9138-f99709370657
2011-02-02 17:43:32 +00:00
Michael Sevakis
e9749d1b93
AMSv2 SD: Fix card insert lockups in USB mode. First, get rid of infinite loops and retry those a limited number of times-- no explaination for their dubious existence was offered in the source. Second, SD thread was no longer monitoring inserts (and it wouldn't really matter if it were). Thus, .initialized was reported as '1' despite the new card needing reinit.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29169 a1c6a512-1295-4272-9138-f99709370657
2011-01-29 16:54:36 +00:00
Michael Sevakis
3f709eada2
Convert AMS target USB detection to event-based (no more polling in a tick). Seems well on my Clip v1 and Fuze v2.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29156 a1c6a512-1295-4272-9138-f99709370657
2011-01-29 00:44:59 +00:00
Michael Sevakis
a575ffb271
AMSv2 USB: Delay after sftdiscon should be far longer.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29154 a1c6a512-1295-4272-9138-f99709370657
2011-01-29 00:25:42 +00:00
Michael Sevakis
ac7fe5fb82
AS3525v2 USB: Set disconnect before stopping module clock. Seems to cure reconnect weirdness for me and is probably the proper method anyway since otherwise the module will still be running when the clock is cut (bad).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29149 a1c6a512-1295-4272-9138-f99709370657
2011-01-28 02:30:03 +00:00
Amaury Pouly
3a1bc3cfdd
as3525v2-usb: fix logf format, don't mask the interrupt using the VIC as it seems to trigger spurious irq
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29146 a1c6a512-1295-4272-9138-f99709370657
2011-01-27 12:15:46 +00:00
Amaury Pouly
9b02ce9e49
as3525v2-usb: mask usb interrupt when setting up a transfer
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29130 a1c6a512-1295-4272-9138-f99709370657
2011-01-24 15:34:14 +00:00
Amaury Pouly
297ca4b1af
as3525v2-usb: only call wakeup_signal when a thread is actually waiting
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29129 a1c6a512-1295-4272-9138-f99709370657
2011-01-24 15:03:56 +00:00
Michael Sevakis
2da0f9bcfd
Fuze v2: Do button reading more efficiently by mapping button codes directly to the GPIO pin states where possible (all but 'home' and hold). This makes plugins incompatible; up the min version and sort things.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29097 a1c6a512-1295-4272-9138-f99709370657
2011-01-20 17:11:23 +00:00
Michael Sevakis
5f52f6ee01
Fuze V2: Fix hold switch behavior. Add a GPIOx_PIN_MASK macro to AS3525.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29096 a1c6a512-1295-4272-9138-f99709370657
2011-01-20 14:26:58 +00:00
Michael Sevakis
c04f1a23c7
AS3525: Implement a true audio pause and full-resolution audio tick. Take care of a few atomic hotspots.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29088 a1c6a512-1295-4272-9138-f99709370657
2011-01-19 09:15:23 +00:00
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
bb54c8f315
Fix problem with AMS PCM driver that caused mpegplayer lockup. It pre-decremented the size remaining where it is supposed to be post-decremented by the last transfer size in the callback. Pending callbacks also must be cleared when stopping or pausing a channel if they happened before the lock flag was set.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29059 a1c6a512-1295-4272-9138-f99709370657
2011-01-15 12:13:56 +00:00
Fred Bauer
e541c98a7e
revert r28834 because it causes problems with uSD
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28925 a1c6a512-1295-4272-9138-f99709370657
2010-12-29 16:07:15 +00:00
Bertrik Sikken
92b849d3bf
Apply FS#11798 (Files in MicroSD card aren't being shown in File Browser or Database on Clip+) by Will Sowerbutts
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28903 a1c6a512-1295-4272-9138-f99709370657
2010-12-26 12:55:28 +00:00
Frank Gevaerts
303aefc406
Make usb_detect() return USB_UNPOWERED instead of USB_EXTRACTED. Without that, not all needed disconnect handling is done in usb.c
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28874 a1c6a512-1295-4272-9138-f99709370657
2010-12-21 17:24:00 +00:00
Fred Bauer
279dff1c21
FS#11765: Improve AMSv1 Battery Life by Lowering CPU and Peripheral clocks. Unboosted CPU and peripheral clock is now 31MHz. Boosted CPU and pclk are 186MHz and 62MHz, respectively.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28834 a1c6a512-1295-4272-9138-f99709370657
2010-12-14 22:08:43 +00:00
Frank Gevaerts
866a822ac6
Only return USB_POWERED if USB_DETECT_BY_DRV is actually defined, which might not be the case for e.g. bootloaders (also fix red)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28820 a1c6a512-1295-4272-9138-f99709370657
2010-12-12 20:20:12 +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
Bertrik Sikken
2a0a9a5f2a
AMSv2: handle sd card ACMDs similar to how it's done for AMSv1
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28814 a1c6a512-1295-4272-9138-f99709370657
2010-12-12 15:30:58 +00:00
Bertrik Sikken
9da76f3031
AMSv2: only switch sd cards to high speed mode for for v2 sd cards, just like is done for AMSv1
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28808 a1c6a512-1295-4272-9138-f99709370657
2010-12-12 14:04:07 +00:00
Fred Bauer
9b2e9472ea
FS#11608: switch cpu to async operation in boosted mode
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28616 a1c6a512-1295-4272-9138-f99709370657
2010-11-18 16:37:56 +00:00
Bertrik Sikken
19c048344d
Apply FS#11729 - Remove unneeded I2SIN clock configuration for AS3525 and AS3525v2
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28541 a1c6a512-1295-4272-9138-f99709370657
2010-11-09 21:53:44 +00:00
Marcin Bukat
8a16f1ba00
fix yellow and red from r28522
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28523 a1c6a512-1295-4272-9138-f99709370657
2010-11-06 14:49:53 +00:00