Commit graph

55 commits

Author SHA1 Message Date
Michael Sevakis
d56999890f Make PCM->driver interface about as simple as it will get. Registered callback, zero data, alignment and stops are handled entirely inside pcm.c; driver merely calls fixed pcm.c callback. Remove pcm_record_more and do it just like playback; the original reason behind it isn't very practical in general. Everything checks out on supported targets. There wer some compat changes I can't check out on many unsupoorted but if there's a problem it will be a minor oops. Plugins become incompatible due to recording tweak-- full update. Sorted API.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26253 a1c6a512-1295-4272-9138-f99709370657
2010-05-24 16:42:32 +00:00
Michael Sevakis
cc7457e788 Fix r25970 red and yellow *and* a bug uncovered for pp5002 where pcm_play_dma_start wasn't actually initializing the dma_play_data with the first buffer info (must've happened during pp502x DMA conversion).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25971 a1c6a512-1295-4272-9138-f99709370657
2010-05-12 14:31:12 +00:00
Michael Sevakis
4d04132c76 PCM bottom layer simplification. pcm_rec_peak_addr variable no longer has to be handled there. Driver can just return current pointer for recording peaks. A new define, HAVE_PCM_REC_DMA_ADDRESS, specifies that physical addresses are being used for recording and translation is needed before starting a new block. The drivers need not worry about aligning start and size nor should care if either will be zero. All this will be checked in the logical layer first.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25970 a1c6a512-1295-4272-9138-f99709370657
2010-05-12 14:05:36 +00:00
Michael Sevakis
44c15ee923 Fix FS#9949 - Song not playing, noise instead. Stale code was left from before transferring in segments and one calculation was just wrong for limiting trasfer size. Make buffer aligning consistent, change <= 0 on size_t variable to == 0 and remove pointless limit on overall buffer size.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20227 a1c6a512-1295-4272-9138-f99709370657
2009-03-07 05:21:58 +00:00
Michael Sevakis
b1dccc47fd PP502x: Improve accuracy of header file. It looks as though DMA channels share the same interrupt enable (tested that 0 and 2 do at least).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20089 a1c6a512-1295-4272-9138-f99709370657
2009-02-23 04:33:33 +00:00
Michael Sevakis
6c399b8254 Use DMA for audio playback on PP502x (FS#9910 + some further mods). I can't say at this point about any change in battery life but it frees up a percent or two of CPU cycles as measured in the buffering screen. No change in recording transfers yet. Testing seemed to check out so put it out for general use and see what happens.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20052 a1c6a512-1295-4272-9138-f99709370657
2009-02-19 20:40:03 +00:00
Michael Sevakis
b6e78acc5e Get rid of some pcm_apply_settings cruft at the low level I somehow missed. Move the ones in pcm.c around to better spots. Remove a variable from pcm-pnx0101.c that should no longer be there.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19402 a1c6a512-1295-4272-9138-f99709370657
2008-12-12 12:46:57 +00:00
Michael Sevakis
e69d567d9e Bring consistency to pcm implementation and samplerate handling. Less low-level duplication. A small test_sampr fix so it works on coldfire again.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19400 a1c6a512-1295-4272-9138-f99709370657
2008-12-12 11:01:07 +00:00
Michael Sevakis
2e8266df12 Fix a PortalPlayer PCM bug that made keyclick malfunction. Should fix FS#8836. Move FIQ banked register init out of crt0-pp.S and into pcm-pp.c to keep setups local to PCM driver.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19388 a1c6a512-1295-4272-9138-f99709370657
2008-12-11 01:48:31 +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
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
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
Peter D'Hoye
66f5eec8f0 Fix samplerate setting for mini 1g/2g
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18673 a1c6a512-1295-4272-9138-f99709370657
2008-09-30 20:26:25 +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
6938083e4f iPod Video: Fix playback after recording (FS #7402). Implement recording gain adjustment. * Enable timeout for zero-crossing detection (SLOWCLK), avoids hanging volume/ gain due to DC offsets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18509 a1c6a512-1295-4272-9138-f99709370657
2008-09-13 19:34:16 +00:00
Jens Arnold
3656382f7d iPod G4, Color/Photo and Nano audio driver rework: Fix playback after recording (FS #7402). Implement recording gain adjustment. * Fix slightly off Bass/Treble scale.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18490 a1c6a512-1295-4272-9138-f99709370657
2008-09-10 23:50:26 +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
Bertrik Sikken
a5d3029c82 Update source files to include the header file for the functions they implement, to make sure the header and the implementation is consistent (and fix it for a case where it wasn't).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17275 a1c6a512-1295-4272-9138-f99709370657
2008-04-28 10:22:05 +00:00
Jens Arnold
a73b13cfff Fix ticking noise on PP5002 introduced with tthe transfer optimisation in r17097.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17158 a1c6a512-1295-4272-9138-f99709370657
2008-04-18 18:52:11 +00:00
Andree Buschmann
b90a766d01 ASM optimization for fiq_playback(). Saves about 0.4MHz of CPU while playback on PP502x/PP5002.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17097 a1c6a512-1295-4272-9138-f99709370657
2008-04-13 17:03:24 +00:00
Michael Sevakis
05099149f1 Enable nocache sections using the linker. PP5022/4 must use SW_CORELOCK now with shared variables in DRAM (it seems swp(b) is at least partially broken on all PP or I'm doing something very wrong here :\). For core-shared data use SHAREDBSS/DATA_ATTR. NOCACHEBSS/DATA_ATTR is available whether or not single core is forced for static peripheral-DMA buffer allocation without use of the UNCACHED_ADDR macro in code and is likely useful on a non-PP target with a data cache (although not actually enabled in config.h and the .lds's in this commit).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16981 a1c6a512-1295-4272-9138-f99709370657
2008-04-06 04:34:57 +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
Robert Kukla
47cfed1f1b audio on the m:robe 100
- using the existing wm8751 driver (from gigabeat port) integrated into the portal player environment
- only 44.1kHz at the moment
- for some reason the output is very quiet
- due to the lack of usable buttons the easiest (?) way to start an audio file is to copy the .playlist_control, config.cfg and nvram.bin files from another target, where auto resume is enabled.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16117 a1c6a512-1295-4272-9138-f99709370657
2008-01-20 12:59:23 +00:00
Michael Sevakis
782aae4402 Finish the conversion to packed i2s for PP502x. Karl Kurbjun-approved for Mini-1G. Simplify the pcm format selection #ifdefs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15137 a1c6a512-1295-4272-9138-f99709370657
2007-10-16 04:19:18 +00:00
Dave Chapman
1092edf3e1 Packed I2S for ipod Color (tested) and ipod 4G (untested, but assumed to be the same as the Color - everything else is).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15053 a1c6a512-1295-4272-9138-f99709370657
2007-10-09 20:57:31 +00:00
Jens Arnold
6c98c8c6cb Packed I2S for iPod Mini G2.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15050 a1c6a512-1295-4272-9138-f99709370657
2007-10-09 19:59:00 +00:00
Thom Johansen
8500f485b6 FS #7917 by Andree Buschmann. Packed I2S also for Ipod Video.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15049 a1c6a512-1295-4272-9138-f99709370657
2007-10-09 19:24:18 +00:00
Michael Sevakis
3fd073ed4d Unbloat the PCM changes on PortalPlayer
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15041 a1c6a512-1295-4272-9138-f99709370657
2007-10-09 00:09:28 +00:00
Thom Johansen
eb1e35f6af Make Ipod Nano use packed 16 bit IIS FIFO transfers as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15040 a1c6a512-1295-4272-9138-f99709370657
2007-10-08 21:20:06 +00:00
Michael Sevakis
4512f1a14f Finally get packed samples to work in a nice way on H10 in IIS mode. Add some more register defs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15026 a1c6a512-1295-4272-9138-f99709370657
2007-10-07 20:14:32 +00:00
Michael Sevakis
856ca78110 Use halfword IIS FIFO mode for H10. Won't save interrupts but seems it should be the DMA compatible mode. Setup pcm-pp.c to ease evaluating setting up PortalPlayer targets for DMA audio and for building an inventory of proper I2S settings and transfer sizes for all.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15009 a1c6a512-1295-4272-9138-f99709370657
2007-10-07 06:10:08 +00:00
Michael Sevakis
6077e5b7c8 Unify PCM interface just above the hardware driver level for all targets including the sims. Perform lockout of audio callback when changing states. Weird new playback or recording trouble? Check before and after this revision first though things seem quite sound.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15006 a1c6a512-1295-4272-9138-f99709370657
2007-10-06 22:27:27 +00:00
Michael Sevakis
84d28e8f78 Fix up the recording monitoring for e200 and I expect for c200 as well whenever recording is enabled there.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14980 a1c6a512-1295-4272-9138-f99709370657
2007-10-04 12:55:46 +00:00
Michael Sevakis
4748dc305e Fix a little bug I introduced earier than can cause i2s to fail to start with voice running on pp5020.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14961 a1c6a512-1295-4272-9138-f99709370657
2007-10-02 20:23:42 +00:00
Michael Sevakis
15b7321fe1 Split wm8731 and wm8721 drivers. wm8721 can be much simpler since it has no recording. Provide reg bit definitions for those. Add some temporary hacks pcm-pp to prevent crashing when playing after recording. Make playback start after recording on pp5020. Get wm8731 to monitor recording but plans are to do that digitally.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14948 a1c6a512-1295-4272-9138-f99709370657
2007-10-02 07:48:50 +00:00
Michael Sevakis
31cf7e95b4 Reenable scaling on Sansa since a reasonable solution to clicks has been found.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13995 a1c6a512-1295-4272-9138-f99709370657
2007-07-26 10:46:17 +00:00
Robert Keevil
7785d6949e Temporary fix for FS#7257 and FS#7261 - playback resumes while paused when seeking
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13795 a1c6a512-1295-4272-9138-f99709370657
2007-07-05 10:19:06 +00:00
Jens Arnold
fe23dc8f15 Improved CPU clock setup for PP502x. PP5020 and PP5022 are not register compatible here, so define the PP5022 targets properly, and introduce a CPU_PP502x macro for easier family check. Improves stability on PP5020 (less freezing, tested with Mini G1) and reduces clock change penalty (500us on PP5020; uses the relock bit on PP5022).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13763 a1c6a512-1295-4272-9138-f99709370657
2007-07-02 05:16:40 +00:00
Michael Sevakis
21a4a87ca2 Accept FS#7178 - Sansa e200 FM tuner support by Ivan Zupan. Do the needed integration work into recording and the AS3514 audio driver. Do a little AS3514 fiq_record tweak to have it all work nicely from the start.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13573 a1c6a512-1295-4272-9138-f99709370657
2007-06-06 19:23:48 +00:00
Michael Sevakis
bcb8a884ee e200: Add recording. Just from MIC right now and FM integration will happen soon. Most every bit of weirdness is nescessary and no problems seem to exist that the retailos doesn't exhibit too (namely noise when LCD is on when recording from MIC).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13557 a1c6a512-1295-4272-9138-f99709370657
2007-06-05 07:03:30 +00:00
Michael Sevakis
e7075db2a7 e200: Use 16-16 L-R pairs when writing to the TX FIFO. Kill the channel swapping and clicks. Reduce number of FIQs. Should be adaptable to iPods and other PP targets in a few minutes work, eh?
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13463 a1c6a512-1295-4272-9138-f99709370657
2007-05-22 15:34:24 +00:00
Jens Arnold
705d2f879f Reset the pcm_paused flag in the PP FIQ as well to complement the fix for FS #7187. Now it also works on Mini G2.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13428 a1c6a512-1295-4272-9138-f99709370657
2007-05-19 20:37:12 +00:00
Marcoen Hirschberg
eb7603f1c5 always reset the pcm_paused flag when stopping playback. fixes FS #7187
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13423 a1c6a512-1295-4272-9138-f99709370657
2007-05-19 19:30:08 +00:00
Daniel Ankers
dfad406aa1 Sound for Sansa E200 - based on work by myself, Rene Peinthor, Barry Wardell and Christian Gmeiner from the AS3514 datasheet.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12727 a1c6a512-1295-4272-9138-f99709370657
2007-03-11 17:38:08 +00:00
Michael Sevakis
c2d2106fd7 Audio Init: Just can't stand that heirarchy. Add one level of abstraction. Might come in handy anyhow. Use sound.h instead of the conditional includes for audio hardware headers. If someone doesn't like that, yell at my evil twin. :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12718 a1c6a512-1295-4272-9138-f99709370657
2007-03-11 06:21:43 +00:00
Michael Sevakis
c5cd27f5d1 Pop a stub in there for the e200 until playback is ready. Move it to the proper place at that time.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12717 a1c6a512-1295-4272-9138-f99709370657
2007-03-11 05:48:58 +00:00
Barry Wardell
38b64f7b4b Get rid of C99 style variable declaration. Also, add one more use of #define instead of inl/outl that I missed last time.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12591 a1c6a512-1295-4272-9138-f99709370657
2007-03-04 16:06:54 +00:00
Barry Wardell
169ebdbda7 Some more replacing of inl/outl with register #define's (doesn't change end-result binary). Add lots more #define's based on the ipodlinux wiki and some extrapolation.
Also add PortalPlayer SoC version to the HW info debug screen.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12575 a1c6a512-1295-4272-9138-f99709370657
2007-03-03 23:37:17 +00:00
Barry Wardell
f05b9e3bd5 Get rid of some outl/inl in favour of #define.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12442 a1c6a512-1295-4272-9138-f99709370657
2007-02-21 22:25:14 +00:00