summaryrefslogtreecommitdiff
path: root/firmware/target/arm/pcm-pp.c
AgeCommit message (Collapse)Author
2009-03-07Fix FS#9949 - Song not playing, noise instead. Stale code was left from ↵Michael Sevakis
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-02-23PP502x: Improve accuracy of header file. It looks as though DMA channels ↵Michael Sevakis
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-19Use DMA for audio playback on PP502x (FS#9910 + some further mods). I can't ↵Michael Sevakis
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
2008-12-12Get rid of some pcm_apply_settings cruft at the low level I somehow missed. ↵Michael Sevakis
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-12Bring consistency to pcm implementation and samplerate handling. Less ↵Michael Sevakis
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-11Fix a PortalPlayer PCM bug that made keyclick malfunction. Should fix ↵Michael Sevakis
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-08Have drivers merged for WM8711/21/31 since they are so similar but respect ↵Michael Sevakis
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-11-26Get rid of remaining audiohw_enable_output style codec setup and use ↵Michael Sevakis
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-25Add register bit defines for as3514 and clean stuff up. Reduce poppiness at ↵Michael Sevakis
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-09-30Fix samplerate setting for mini 1g/2gPeter D'Hoye
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18673 a1c6a512-1295-4272-9138-f99709370657
2008-09-29Codepolice: the patch I accepted contained some tabs. OopsPeter D'Hoye
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18668 a1c6a512-1295-4272-9138-f99709370657
2008-09-28Accept FS #9394 by Christian Lees and extend it to all PP targets with a ↵Peter D'Hoye
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-13iPod Video: Fix playback after recording (FS #7402). Implement recording ↵Jens Arnold
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-10iPod G4, Color/Photo and Nano audio driver rework: Fix playback after ↵Jens Arnold
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-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg
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-04-28Update source files to include the header file for the functions they ↵Bertrik Sikken
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-18Fix ticking noise on PP5002 introduced with tthe transfer optimisation in ↵Jens Arnold
r17097. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17158 a1c6a512-1295-4272-9138-f99709370657
2008-04-13ASM optimization for fiq_playback(). Saves about 0.4MHz of CPU while ↵Andree Buschmann
playback on PP502x/PP5002. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17097 a1c6a512-1295-4272-9138-f99709370657
2008-04-06Enable nocache sections using the linker. PP5022/4 must use SW_CORELOCK now ↵Michael Sevakis
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-03-26Do core interrupt masking in a less general fashion and save some ↵Michael Sevakis
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-01-20audio on the m:robe 100 Robert Kukla
- 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
2007-10-16Finish the conversion to packed i2s for PP502x. Karl Kurbjun-approved for ↵Michael Sevakis
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-09Packed I2S for ipod Color (tested) and ipod 4G (untested, but assumed to be ↵Dave Chapman
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-09Packed I2S for iPod Mini G2.Jens Arnold
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15050 a1c6a512-1295-4272-9138-f99709370657
2007-10-09FS #7917 by Andree Buschmann. Packed I2S also for Ipod Video.Thom Johansen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15049 a1c6a512-1295-4272-9138-f99709370657
2007-10-09Unbloat the PCM changes on PortalPlayerMichael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15041 a1c6a512-1295-4272-9138-f99709370657
2007-10-08Make Ipod Nano use packed 16 bit IIS FIFO transfers as well.Thom Johansen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15040 a1c6a512-1295-4272-9138-f99709370657
2007-10-07Finally get packed samples to work in a nice way on H10 in IIS mode. Add ↵Michael Sevakis
some more register defs. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15026 a1c6a512-1295-4272-9138-f99709370657
2007-10-07Use halfword IIS FIFO mode for H10. Won't save interrupts but seems it ↵Michael Sevakis
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-06Unify PCM interface just above the hardware driver level for all targets ↵Michael Sevakis
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-04Fix up the recording monitoring for e200 and I expect for c200 as well ↵Michael Sevakis
whenever recording is enabled there. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14980 a1c6a512-1295-4272-9138-f99709370657
2007-10-02Fix a little bug I introduced earier than can cause i2s to fail to start ↵Michael Sevakis
with voice running on pp5020. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14961 a1c6a512-1295-4272-9138-f99709370657
2007-10-02Split wm8731 and wm8721 drivers. wm8721 can be much simpler since it has no ↵Michael Sevakis
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-07-26Reenable scaling on Sansa since a reasonable solution to clicks has been found.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13995 a1c6a512-1295-4272-9138-f99709370657
2007-07-05Temporary fix for FS#7257 and FS#7261 - playback resumes while paused when ↵Robert Keevil
seeking git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13795 a1c6a512-1295-4272-9138-f99709370657
2007-07-02Improved CPU clock setup for PP502x. PP5020 and PP5022 are not register ↵Jens Arnold
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-06-06Accept FS#7178 - Sansa e200 FM tuner support by Ivan Zupan. Do the needed ↵Michael Sevakis
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-05e200: Add recording. Just from MIC right now and FM integration will happen ↵Michael Sevakis
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-05-22e200: Use 16-16 L-R pairs when writing to the TX FIFO. Kill the channel ↵Michael Sevakis
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-19Reset the pcm_paused flag in the PP FIQ as well to complement the fix for FS ↵Jens Arnold
#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-19always reset the pcm_paused flag when stopping playback. fixes FS #7187Marcoen Hirschberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13423 a1c6a512-1295-4272-9138-f99709370657
2007-03-11Sound for Sansa E200 - based on work by myself, Rene Peinthor, Barry Wardell ↵Daniel Ankers
and Christian Gmeiner from the AS3514 datasheet. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12727 a1c6a512-1295-4272-9138-f99709370657
2007-03-11Audio Init: Just can't stand that heirarchy. Add one level of abstraction. ↵Michael Sevakis
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-11Pop a stub in there for the e200 until playback is ready. Move it to the ↵Michael Sevakis
proper place at that time. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12717 a1c6a512-1295-4272-9138-f99709370657
2007-03-04Get rid of C99 style variable declaration. Also, add one more use of #define ↵Barry Wardell
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-03Some more replacing of inl/outl with register #define's (doesn't change ↵Barry Wardell
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-02-21Get rid of some outl/inl in favour of #define.Barry Wardell
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12442 a1c6a512-1295-4272-9138-f99709370657
2007-01-01Split the enable_fiq(fiq_handler) function into separate ↵Dave Chapman
set_fiq_handler(fiq_handler) and enable_fiq(void) functions. This allows temporary disabling of the FIQ without knowing which fiq handler is in use. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11875 a1c6a512-1295-4272-9138-f99709370657
2006-12-18Fix more warnings. Don't compile PortalPlayer pcm code in bootloader builds.Barry Wardell
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11799 a1c6a512-1295-4272-9138-f99709370657
2006-12-18Fix more compile errors/warnings.Barry Wardell
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11798 a1c6a512-1295-4272-9138-f99709370657