summaryrefslogtreecommitdiff
path: root/firmware/target/arm/s5l8702/pcm-s5l8702.c
AgeCommit message (Collapse)Author
2015-10-07ipod Classic: implement HAVE_RECORDINGCástor Muñoz
This patch has been tested on iPod 80 and 160slim, actually it works but some updates must be done to the final version: - unlimitted input buffer - decrease CHUNK_SIZE - use non-cached addresses instead of discard d-cache ??? Capture hardware versions: Ver iPod models capture support --- ----------- --------------- 0 80/160fat dock line-in 1 120/160slim dock line-in + jack mic HW version 1 includes an amplifier for the jack plug mic. Capture HW detection only tested on iPod 80 and 160slim. CODEC power: AFAIK, OF powers CS42L55 at VA=2.4V for capture (1.8V for playback) and turns on the ADC charge pump. CODEC datasheet recommmends to disable the charge pump for VA>2.1V. CS42L55 DS, s4.13 (Required Initialization Settings): for VA>2.1V, some adjustments "must" be done using undocummented "control port compensation" registers. OF does not modifies these registers when VA=2.4V. This patch configures capture HW in the same way as OF does. TODO: - ADC full scale voltage depends on VA, perform tests to find clipping levels for VA=1.8V and VA=2.4V Change-Id: I7e20fd3ecaa83b1c58d5c746f5153fe5c3891d75
2015-10-07iPod Classic: use new PL080 DMA driverCástor Muñoz
This patch uses the new pl080 DMA driver for I2S playback and LCD update. I have tried to be as fiel as possible to the current behaviour, algorithms and configurations are the same, but using the new driver. Other modifications: Playback: - CHUNK_SIZE is decreased from 42988 to 8188 bytes, it does not affect normal playback (block size 1024), was tested using metronome (block size 46080). This change is needed because the new code commits d-cache range instead of commiting the whole d-cache, maximum time spent commiting the range should be limited, CHUNK_SIZE can be decreased even more if necessary. - pcm_play_dma_start() calls pcm_play_dma_stop() to stop the channel when it is running (metronome replays the tick sound without stopping the channel). - pcm_play_dma_get_peak_buffer(): same as actual SVN function but returns samples count instead of bytes count. TODO: AFAIK, actually this function is not used in RB. Not tested, but probably this function will fail because it returns pointers to the internal double buffer. LCD update: - suppresses lcd_wakeup semaphore and uses yield() Change-Id: I79b8aa47a941e0dd91847150618f3f7f676c26ef
2014-11-18iPod Classic: fix HW_FREQ_32Cástor Muñoz
Change-Id: I1e1b4e6ceb92eb793affaefc61ab082d5da735b4
2013-01-09iPod Classic/6G: PCM support for all CS42L55 ratesCástor Muñoz
pcm_dma_apply_settings(): sets the configured PCM frequency, all native CS42L55 sample rates are available. Change-Id: I2fcd5581457a669c3044516804cb64fb972218d0
2012-03-04Tweak some PCM drivers for less typecasting with the data pointer.Michael Sevakis
Yeah, sizeof (void) here with GCC is 1. If something has a problem with that, we'll set it straight. Change-Id: I9ad3eee75dd440f6404a04a501d1533c8bc18ba9
2012-03-03Fix errors in unintentionally merged gerrit commit.Michael Sevakis
It proved the system work as unintended, even if slightly prematurely. It was almost ready anyway. Change-Id: Ic4de2b925bd26b094eaf65a120591569923954d1
2012-03-03Revise the PCM callback system after adding multichannel audio.Michael Sevakis
Additional status callback is added to pcm_play/rec_data instead of using a special function to set it. Status includes DMA error reporting to the status callback. Playback and recording callback become more alike except playback uses "const void **addr" (because the data should not be altered) and recording uses "void **addr". "const" is put in place throughout where appropriate. Most changes are fairly trivial. One that should be checked in particular because it isn't so much is telechips, if anyone cares to bother. PP5002 is not so trivial either but that tested as working. Change-Id: I4928d69b3b3be7fb93e259f81635232df9bd1df2 Reviewed-on: http://gerrit.rockbox.org/166 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
2012-02-25FS#12519 - iPod Classic/6G: swap L-R audio channels by Cástor MuñozCástor Muñoz
Fixes swapped left and right channels on ipod 6g and changes the i2s config to send samples as 16 bits instead of 16 zero padded to 24 bits to the dac. Change-Id: Icfecfdf0f6868bdb01c11dced604ebfceb874aa1 Signed-off-by: Nils Wallménius <nils@rockbox.org>
2011-12-17Swap red and yellow for green on r31339's cranky builds.Michael Sevakis
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31340 a1c6a512-1295-4272-9138-f99709370657
2011-11-06Bulk convert all DOS line endings to UNIX.Torne Wuff
For the git migration we want a nice clean repository with UNIX line endings. git does not use svn:eol-style, we just need the file contents to be sane. Sorry everybody. I know this messes up blame. Scumbag *NIX developer says migrating to git will make line ending issues go away; commits giant change to svn which changes line endings anyway. :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30924 a1c6a512-1295-4272-9138-f99709370657
2011-09-01Shuffle some functions around so that interfacing with playback.c in ↵Michael Sevakis
particular isn't required. Though playback does finish the audio init, pcm doesn't care who does it. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30403 a1c6a512-1295-4272-9138-f99709370657
2011-06-29Commit FS#12150 - Fully-functional audio mixer - and finally whip old ↵Michael Sevakis
limitations about playback of voice and other sounds when paused. Channels are independent in state and amplitude. Fade on stop/pause is handled by the channel's volume control rather than global volume which means it now works from anywhere. Opens up the possibility of plugin sounds during music playback by merely adding an additional channel enum. If any PCM drivers were not properly modified, see one of the last comments in the task for a description of the simple change that is expected. Some params are tunable in firmware/export/pcm-mixer.h as well. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30097 a1c6a512-1295-4272-9138-f99709370657
2011-01-07iPod Classic: Fix remaining PCM issues and add DMA information to the HW ↵Michael Sparmann
debug screen git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28991 a1c6a512-1295-4272-9138-f99709370657
2011-01-07Fix yellowMichael Sparmann
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28990 a1c6a512-1295-4272-9138-f99709370657
2011-01-07Fix iPod Classic playback slownessMichael Sparmann
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28989 a1c6a512-1295-4272-9138-f99709370657
2011-01-02New port: iPod Classic (also known as iPod 6G/6.5G/7G)Michael Sparmann
Major known issues: - No bootloader yet - No support for the first-generation 160GB CE-ATA hard disk drive yet - Audio playback is slow, only FLAC seems to reach realtime git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28953 a1c6a512-1295-4272-9138-f99709370657