Commit graph

1598 commits

Author SHA1 Message Date
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
bbb1f89043 * combine i2c_ack and i2c_outb
* do not switch sda back and forth between input and output when reading a byte


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19365 a1c6a512-1295-4272-9138-f99709370657
2008-12-08 19:01:00 +00:00
Rafaël Carré
95d58d3058 Generic I2C: fix various problems with this (now) unused driver
Explicit if SDA is input or output in static functions
Do not use logf() but return codes
Check for overflow when adding an interface
Indent on 4 spaces
Rewrite i2c_read_data() and i2c_write_data() using goto for error cases
Make subaddress optional (not sent if == -1)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19360 a1c6a512-1295-4272-9138-f99709370657
2008-12-07 19:25:51 +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
Bertrik Sikken
75da103c52 Keep codec HPCM (headphone common mode) enabled for Sansa Clip and Sansa m200v4 so the headphone output produces stereo instead of an L-R signal.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19340 a1c6a512-1295-4272-9138-f99709370657
2008-12-04 22:03:37 +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
Michael Sevakis
888c3477bb Fix yellow and red. Maybe create some new.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19231 a1c6a512-1295-4272-9138-f99709370657
2008-11-26 14:52:31 +00:00
Michael Sevakis
888451fb0f Get rid of remaining audiohw_enable_output style codec setup and use pre/post split initialization. Move some SoC-specific code like i2s_reset out of the codec drivers. Helps to unify drivers and it was only ever used to enable. I cannot possibly test everything so report (I'll be on call ;) or fix problems if any crop up.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19228 a1c6a512-1295-4272-9138-f99709370657
2008-11-26 14:25:45 +00:00
Michael Sevakis
756bcc4bd5 Fix misspelled function name. Thanks to Jens Arnold for noticing.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19220 a1c6a512-1295-4272-9138-f99709370657
2008-11-26 05:46:33 +00:00
Michael Sevakis
3511d94031 Add register bit defines for as3514 and clean stuff up. Reduce poppiness at startup and shutdown (and even powerup for e200). Really, I can't honestly say it will help anything but an e200v1 but I'm sick of the noises. ;)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19214 a1c6a512-1295-4272-9138-f99709370657
2008-11-25 16:16:06 +00:00
Michael Sevakis
7bf4e7bda7 Simplify the wm8731 driver by adding a masked write function. Change _write_or/and to _set/clear. Reduce init sequence by initializing shadows to hardware defaults.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19197 a1c6a512-1295-4272-9138-f99709370657
2008-11-24 15:26:39 +00:00
Michael Sevakis
5dfde5c80b Gigabeat S samplerate control: Fix really dumb mistake made when doing cleanup. Add some more correctness.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19180 a1c6a512-1295-4272-9138-f99709370657
2008-11-22 14:39:42 +00:00
Michael Sevakis
5dec3b34aa Oops. Used wrong constant.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19179 a1c6a512-1295-4272-9138-f99709370657
2008-11-22 12:23:31 +00:00
Michael Sevakis
7c007f5d87 Audio samplerate control for Gigabeat S: 8, 11.025, 12, 16, 22.050, 24, 32, 44.1 and 48 kHz.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19178 a1c6a512-1295-4272-9138-f99709370657
2008-11-22 12:17:26 +00:00
Michael Sevakis
20477d024e Gigabeat S: Fix PCM being cut off at the beginning. The DAC L-R swapping isn't needed now either. Fixes voice clips on the Gigabeat S.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19141 a1c6a512-1295-4272-9138-f99709370657
2008-11-19 03:12:34 +00:00
Michael Sevakis
db5965ff9e Gigabeat S/WM8978: Fix problem of volume getting silenced after settings are applied. There still seems to be a problem of cutting of voice samples from the beggining of clips when music isn't playing-- next to be investigated.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19109 a1c6a512-1295-4272-9138-f99709370657
2008-11-15 23:48:19 +00:00
Karl Kurbjun
59d4d2025c Revert last commit (accidentally committed the whole tree)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19095 a1c6a512-1295-4272-9138-f99709370657
2008-11-12 04:15:34 +00:00
Karl Kurbjun
d42041043b Add in the needed crt0.S code for the wakeup alarm also
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19094 a1c6a512-1295-4272-9138-f99709370657
2008-11-12 03:57:32 +00:00
Karl Kurbjun
68c686957b Make the wakeup alarm code work (Needs the flashed bootloader)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19093 a1c6a512-1295-4272-9138-f99709370657
2008-11-12 03:52:33 +00:00
Dave Chapman
e25c1c6e43 Add more driver stubs to make the Fuze and e200v2 main builds compile; Correct the memory definition for the Fuze (8MB)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19090 a1c6a512-1295-4272-9138-f99709370657
2008-11-11 14:46:13 +00:00
Maurus Cuelenaere
4af26e7e98 Onda VX747:
* Commit (premature) SD, USB & audio drivers
 * Fix ramdisk.c mistake
 * Add battery readout


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19011 a1c6a512-1295-4272-9138-f99709370657
2008-11-05 00:24:46 +00:00
Frank Gevaerts
6f32dab2ae *_hard_reset() is only used inside ata.c, so there's no need to export it to the world
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19004 a1c6a512-1295-4272-9138-f99709370657
2008-11-04 19:37:28 +00:00
Frank Gevaerts
d5a5f37a6a ramdisk needs to be non-extern
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18994 a1c6a512-1295-4272-9138-f99709370657
2008-11-03 21:21:48 +00:00
Frank Gevaerts
214cd81f08 Add ramdisk storage driver. It will be useful for developing multi-driver storage
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18993 a1c6a512-1295-4272-9138-f99709370657
2008-11-03 20:52:27 +00:00
Frank Gevaerts
430343bca7 implement single-driver storage layer with macros instead of inlines
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18975 a1c6a512-1295-4272-9138-f99709370657
2008-11-02 01:14:46 +00:00
Frank Gevaerts
19eb800f75 conditionalise *_get_info() to get some binsize back
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18965 a1c6a512-1295-4272-9138-f99709370657
2008-11-01 17:33:21 +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
Dave Chapman
42f77d4eb0 Abstract the PortalPlayer AS3514 handling with an "ascodec" API - inspired by the wmcodec API used with the Wolfson codecs. The intention is to implement this API for the AS3525 and then share code with the Sansa V2 ports.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18940 a1c6a512-1295-4272-9138-f99709370657
2008-10-31 00:16:42 +00:00
Peter D'Hoye
695c39bc9c Remove the audiohw_set_nsorder() function since it is not used, only implemented on WM8731 and not wanted/used there.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18829 a1c6a512-1295-4272-9138-f99709370657
2008-10-18 22:37:41 +00:00
Frank Gevaerts
49ec9ea190 Make the meizu m3 load from flash, so interrupts work. More work is needed to get the m6sl "working" again
(patch by Denes Balatoni, FS#9499)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18827 a1c6a512-1295-4272-9138-f99709370657
2008-10-18 22:28:59 +00:00
Peter D'Hoye
d8b2645a64 Accept FS #9496 by Przemysław Hołubowski: disable deemphasis in WM8731. This fixes FS #9489 (nonlinear frequency response). Verified on H10-5gb
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18826 a1c6a512-1295-4272-9138-f99709370657
2008-10-18 21:57:43 +00:00
Frank Gevaerts
9e0ebcc4e6 Simplify preprocessor symbols a bit (FS#9457). Thanks to Alexander Levin
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18816 a1c6a512-1295-4272-9138-f99709370657
2008-10-15 19:05:00 +00:00
Björn Stenberg
9cf024c5a8 Red build fix: Moved PCM #defines from pcm_record.h to pcm.h. Added necessary #includes to statusbar.c and s1a0903x01.c.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18808 a1c6a512-1295-4272-9138-f99709370657
2008-10-14 11:43:32 +00:00
Björn Stenberg
9558c4956d Moved pcm_record from firmware to apps. Cleaned up some. Now all code using struct mp3entry is in apps.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18807 a1c6a512-1295-4272-9138-f99709370657
2008-10-14 11:12:20 +00:00
Frank Gevaerts
d16fe2d36a implement usb_drv_release_endpoint() and usb_drv_request_endpoint() (a.k.a. fix red)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18705 a1c6a512-1295-4272-9138-f99709370657
2008-10-03 23:08:11 +00:00
Frank Gevaerts
7fc446263f fix yellow. Don't do the spindown/usb things in the bootloader
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18696 a1c6a512-1295-4272-9138-f99709370657
2008-10-03 11:56:01 +00:00
Nils Wallménius
c42f22cb87 Correct test to avoid drawing outside display, fixes a problem in sim with spacerocks, could possibly fix things on target too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18691 a1c6a512-1295-4272-9138-f99709370657
2008-10-03 08:10:38 +00:00
Frank Gevaerts
fcdffd68af Accept FS#8943, allow disk spindown during USB connection for software usb
Implementation by Linus Nielsen Feltzing


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18685 a1c6a512-1295-4272-9138-f99709370657
2008-10-02 20:51:14 +00:00
Peter D'Hoye
f60c1ae050 More samplerates for playback for ipod 1g/2g, and fix the ipod mini 1g/2g which also use WM8721.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18669 a1c6a512-1295-4272-9138-f99709370657
2008-09-29 21:41:38 +00:00
Peter D'Hoye
b297eb9d9d Codepolice: the patch I accepted contained some tabs. Oops
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18668 a1c6a512-1295-4272-9138-f99709370657
2008-09-29 20:50:26 +00:00
Peter D'Hoye
11ef4ce1f9 Accept FS #9394 by Christian Lees and extend it to all PP targets with a WM8731: More samplerates for playback and recording. Only tested on H10 but should work on the others too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18662 a1c6a512-1295-4272-9138-f99709370657
2008-09-28 23:25:07 +00:00
Jens Arnold
f748d3b49f Some more size optimisations, giving a tiny write speedup as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18552 a1c6a512-1295-4272-9138-f99709370657
2008-09-19 20:17:17 +00:00
Jens Arnold
5b17f37e84 Change the way send_cmd() returns data to make it cleaner and save binsize. Also change the command composition for the same reasons.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18551 a1c6a512-1295-4272-9138-f99709370657
2008-09-19 07:27:08 +00:00
Jens Arnold
3655a32a3e Further MMC driver touchup: * Save a tiny amount of power by not enabling the internal flash clock when accessing the MMC. * R2W factors > 32 are valid in newer MMC specs, so don't limit to 32 anymore. * Revise the port setup, and only do the basic setup once.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18541 a1c6a512-1295-4272-9138-f99709370657
2008-09-17 18:53:11 +00:00
Frank Gevaerts
d29faf07a3 set svn properties
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18540 a1c6a512-1295-4272-9138-f99709370657
2008-09-17 18:50:34 +00:00
Frank Gevaerts
95bc9fd596 fix off-by-one error when reading spi data
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18530 a1c6a512-1295-4272-9138-f99709370657
2008-09-16 16:47:13 +00:00
Jens Arnold
e42a7373f6 Fix error handling in multiple block read and multiple block write state. When an error occurs, the host still needs to send CMD_STOP_TRANSMISSION resp. the STOP_TRAN token.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18524 a1c6a512-1295-4272-9138-f99709370657
2008-09-15 21:10:08 +00:00
Bertrik Sikken
f13184e472 Fix some more #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18522 a1c6a512-1295-4272-9138-f99709370657
2008-09-15 19:50:55 +00:00
Frank Gevaerts
816eea85de use bitwise operators to manipulate bits
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18521 a1c6a512-1295-4272-9138-f99709370657
2008-09-15 18:48:11 +00:00