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
Nils Wallménius
65f61d6cce
FS#9609 FM radio support for the Gigabeat S, seeking/scanning is not yet
...
implemented but manual tuning works nicely. Thanks to Rafaël Carré,
Bertrik Sikken and Robert Menes for suggestions and debugging help.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19372 a1c6a512-1295-4272-9138-f99709370657
2008-12-09 20:48:04 +00:00
Dominik Wenger
02184a242e
make fmradio-i2c code from clip more generic, so it works for m200v4 and hopefully all other as3525 targets.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19370 a1c6a512-1295-4272-9138-f99709370657
2008-12-09 17:21:16 +00:00
Michael Sevakis
cb06108024
Meg-FX: Enable a real tick in the bootloader. Do cleanups before switching to firmware and cache handling. Put proper main return address in lr.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19368 a1c6a512-1295-4272-9138-f99709370657
2008-12-08 23:31:05 +00:00
Michael Sevakis
ea929a3e45
Have drivers merged for WM8711/21/31 since they are so similar but respect all register differences between codecs. Change minis to #define the actual codec type. If anything breaks check if OSCPD and CLKOUTPD need to be clear for the target- H10 is fine. A nice naming convention suggestion for WM codec multidrivers would be welcome rather than naming for a specific chip.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19367 a1c6a512-1295-4272-9138-f99709370657
2008-12-08 21:09:56 +00:00
Bertrik Sikken
ed96b2a4dd
Sansa Clip: implement the fmradio_i2c interface using generic_i2c
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19366 a1c6a512-1295-4272-9138-f99709370657
2008-12-08 19:32:05 +00:00
Rafaël Carré
9856a37de3
Sansa Clip: revert 19353
...
If we don't set pin B6 to 1, display can go off at random times
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19364 a1c6a512-1295-4272-9138-f99709370657
2008-12-08 16:39:55 +00:00
Michael Sevakis
528ec2a555
Meg F/X: Radically changing divider settings messed up the fake sleep in the bootloader. They aren't reset even after powering off. Make sure they are always specified. Move that code to target tree as well.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19358 a1c6a512-1295-4272-9138-f99709370657
2008-12-07 17:48:42 +00:00
Michael Sevakis
89da4328a0
Meg F/X can beep and click using a hardware timer so let us try it out. To match things up better, fix PCM beeping to give correct frequency (and get a pointer wrap bug too). Do some minor adjustments to compensate for corrections.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19355 a1c6a512-1295-4272-9138-f99709370657
2008-12-07 00:07:47 +00:00
Frank Gevaerts
3648e87054
Add small delays before lcd_write_data() and lcd_write_command(). This seems to be needed on some clips (i.e. mine)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19354 a1c6a512-1295-4272-9138-f99709370657
2008-12-06 16:39:49 +00:00
Rafaël Carré
8956f2b7f5
Sansa Clip: No need to use GPIO pin B6 in LCD
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19353 a1c6a512-1295-4272-9138-f99709370657
2008-12-06 01:30:46 +00:00
Rafaël Carré
68be3b15a5
Sansa Clip: No need to use GPIO pin B5 in LCD - it's likely used in FM
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19352 a1c6a512-1295-4272-9138-f99709370657
2008-12-05 21:57:49 +00:00
Rafaël Carré
ab64424598
Sansa AMS: use vectored interrupts
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19351 a1c6a512-1295-4272-9138-f99709370657
2008-12-05 17:10:11 +00:00
Rafaël Carré
f07aa65117
Sansa AMS: correct VIC registers usage
...
* Do not use |= on write only registers
* Do use it in when setting kernel tick timer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19350 a1c6a512-1295-4272-9138-f99709370657
2008-12-05 14:37:28 +00:00
Rafaël Carré
e3a970f4eb
Sansa AMS "High Mem" : fix main binary linking broken by r19342
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19346 a1c6a512-1295-4272-9138-f99709370657
2008-12-04 23:03:05 +00:00
Bertrik Sikken
894dbfac18
pcm-as3525.c : don't use |= on a write-only register (VIC_INT_EN_CLEAR).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19345 a1c6a512-1295-4272-9138-f99709370657
2008-12-04 22:56:11 +00:00
Rafaël Carré
e97191faa7
Sansa AMS: Disable DMA clocks when not in use
...
Add dma_retain() and dma_release() to reference count the users
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19344 a1c6a512-1295-4272-9138-f99709370657
2008-12-04 22:54:06 +00:00
Rafaël Carré
3e4f3fe70e
Sansa AMS: disable I2SOUT clocks when playback is stopped
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19343 a1c6a512-1295-4272-9138-f99709370657
2008-12-04 22:54:02 +00:00
Rafaël Carré
6aa807d321
Sansa AMS: PCM driver (FS#9592)
...
Note that on low memory targets (Clip/m200v4 tested) you will encounter
random crashes. Applying FS#9332 seems to help a lot.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19342 a1c6a512-1295-4272-9138-f99709370657
2008-12-04 22:27:48 +00:00
Rafaël Carré
38e97057a9
Sansa AMS: Don't allocate stack in irq_handler
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19338 a1c6a512-1295-4272-9138-f99709370657
2008-12-04 21:55:20 +00:00
Rafaël Carré
8e19a739be
Sansa AMS SD driver: don't check non fatal flags of MCI_STATUS
...
Correct the logic when enabling interrupt line (multivolume)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19337 a1c6a512-1295-4272-9138-f99709370657
2008-12-04 21:55:09 +00:00
Rafaël Carré
1ab08e6879
Sansa AMS: updates DMA API
...
* Adds a callback to be called on end of transfer
* Add a function to disable a channel
* Services the 2 channels if both are active in the isr
SD driver: panics on error
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19333 a1c6a512-1295-4272-9138-f99709370657
2008-12-04 20:48:19 +00:00
Rafaël Carré
76617c8f94
Sansa Clip: remove unused variable
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19332 a1c6a512-1295-4272-9138-f99709370657
2008-12-04 20:37:23 +00:00
Rafaël Carré
45711ac286
Sansa AMS: centralize clock settings in clock-target.h
...
Reorder system_init() to initialize peripherals not only in bootloader
Use a 65MHz PCLK (and memclk) which will be needed for realtime decoding
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19330 a1c6a512-1295-4272-9138-f99709370657
2008-12-04 20:04:31 +00:00
Michael Sevakis
a1ab7a55ff
Meg-FX: s3c register definitions really should be unsigned. Switch from 'int' to 'unsigned long' like other targets.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19325 a1c6a512-1295-4272-9138-f99709370657
2008-12-04 15:06:48 +00:00
Michael Sevakis
1616e66e55
Gigabeat S: Turn off backlight LED supply after a 2-second delay and save a little power. Hardware fading required keeping supply enabled during fade out. Let fade happen at poweroff (might as well~~~).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19322 a1c6a512-1295-4272-9138-f99709370657
2008-12-04 04:16:53 +00:00
Michael Sevakis
add677fca8
Fix some red. The stubs in bootloaders are giving some trouble.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19316 a1c6a512-1295-4272-9138-f99709370657
2008-12-03 20:43:10 +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
Dominik Wenger
0d0cc039f8
fix hold-button handling for m200v4.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19314 a1c6a512-1295-4272-9138-f99709370657
2008-12-03 18:41:02 +00:00
Rafaël Carré
874f4376ff
Sansa AMS: ignore buttons when hold switch is on
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19311 a1c6a512-1295-4272-9138-f99709370657
2008-12-03 11:30:18 +00:00
Bertrik Sikken
d9116da5de
Move Clip specific power management stuff (specifically the battery discarge curve) to powermgmt-clip.c
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19303 a1c6a512-1295-4272-9138-f99709370657
2008-12-02 19:50:31 +00:00
Rafaël Carré
6840cd1277
Sansa Clip: Do not return HOLD status in button_read_device()
...
It is read separately, and so backlight/buttonlight can be disabled
while hold switch is on
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19302 a1c6a512-1295-4272-9138-f99709370657
2008-12-02 17:37:23 +00:00
Michael Sevakis
c96c2f476d
Meg-FX: Do a bit of LED service simplification and save a tiny bit of code size.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19300 a1c6a512-1295-4272-9138-f99709370657
2008-12-02 12:43:20 +00:00
Michael Sevakis
8c442b6b12
Oops. Should subtract one from actual default value.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19299 a1c6a512-1295-4272-9138-f99709370657
2008-12-02 03:15:02 +00:00
Michael Sevakis
cd8c87e74a
Fix another bug spotted in LED service. Default setting should also use log_brightness values.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19298 a1c6a512-1295-4272-9138-f99709370657
2008-12-02 03:08:47 +00:00
Michael Sevakis
9eabf8fb8b
Fix FS#9599 - LCD Brightness setting broken by software fading. Patch by Thomas Martitz (kugel). The internal code requires log_brightness values.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19297 a1c6a512-1295-4272-9138-f99709370657
2008-12-02 02:56:46 +00:00
Rob Purchase
e70096ea5c
Telechips I2C: Scale the busy-wait delay based on FREQ, reducing wasted CPU cycles when unboosted (eg. when reading from the D2 touchscreen).
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19293 a1c6a512-1295-4272-9138-f99709370657
2008-12-01 21:02:00 +00:00
Rob Purchase
8da8159f74
D2: Disable IRQs when writing to the LCD 3-wire interface, and re-instate the previous delay value.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19292 a1c6a512-1295-4272-9138-f99709370657
2008-12-01 20:55:33 +00:00
Rafaël Carré
a783453ff9
Sansa AMS: sd_enable() isn't available in the bootloader
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19281 a1c6a512-1295-4272-9138-f99709370657
2008-12-01 08:18:22 +00:00
Rafaël Carré
ce851c0c67
Sansa AMS: disable SD clocks when not in use (copied from FS#9570)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19280 a1c6a512-1295-4272-9138-f99709370657
2008-12-01 04:17:39 +00:00
Rafaël Carré
50519416ca
Sansa Clip : save one instruction per 8 pixels loop in lcd_grey_data
...
We set directly the needed bits to write into DBOP_DOUT (15:13 and 3:0)
Since we can't set the mask 0xf00f with one mov instruction, revert the
logic and use orrne instead of biceq (in the whole function for consistency)
Fix suggested by Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19279 a1c6a512-1295-4272-9138-f99709370657
2008-12-01 04:07:13 +00:00
Rafaël Carré
c9ba3adf0d
Sansa AMS: do not load stack and bss inside the rockbox binary (FS#9593)
...
Define _loadaddress to fix RAM usage reported by mkinfo.pl
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19278 a1c6a512-1295-4272-9138-f99709370657
2008-12-01 03:54:27 +00:00
Rafaël Carré
0b6d65b09e
Sansa AMS: Use a valid PLL setting (248MHz aka maximum fclk)
...
Fix lcd drivers which stopped working after changing the PLL.
Move set_cpu_frequency() to a place where it is actually used.
Remove enable_irq() call already done by the bootloader
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19276 a1c6a512-1295-4272-9138-f99709370657
2008-11-30 16:36:32 +00:00
Frank Gevaerts
f235f1d4c0
Remove usb_drv_wait from the public usb api, and remove the implementation from usb-drv-arc.c, as it is not actually used
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19275 a1c6a512-1295-4272-9138-f99709370657
2008-11-30 15:56:49 +00:00
Frank Gevaerts
b9c49fd474
Replace USE_HIGH_SPEED with USB_NO_HIGH_SPEED, as high speed support is the normal case
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19274 a1c6a512-1295-4272-9138-f99709370657
2008-11-30 15:53:36 +00:00
Frank Gevaerts
caaf3c0b97
Move tcc77x/usb-tcc77x.c to usb-tcc.c as it is more general than just tcc77x (even usb-tcc is too specific, but I don't know anything better)
...
Add #if0ed USB defines to config-cowond2.h, so experimenting with USB is easy
Add dummy set_serial_descriptor() implementation to usb_core.c. This one doesn't generate a unique serial, so it must never be used for non-testing purposes. When usaed, a compiler warning will be generated
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19273 a1c6a512-1295-4272-9138-f99709370657
2008-11-30 15:43:15 +00:00
Dominik Wenger
fbb80b00db
Init the ata_sd mutex before use.
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19266 a1c6a512-1295-4272-9138-f99709370657
2008-11-30 11:38:26 +00:00
Jonathan Gordon
15671aa476
do not modify the CCU_IO register since we don't use GPIOD (from FS#9569)
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19263 a1c6a512-1295-4272-9138-f99709370657
2008-11-30 00:35:25 +00:00
Frank Gevaerts
d158a6d0c9
D2 also needs audiohw_preinit()
...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19259 a1c6a512-1295-4272-9138-f99709370657
2008-11-28 23:44:06 +00:00
Rafaël Carré
4a4c3c5cb0
Sansa Fuze: do not modify the CCU_IO register since we don't use GPIOD
...
Finding by Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19257 a1c6a512-1295-4272-9138-f99709370657
2008-11-28 11:51:09 +00:00