Commit graph

25 commits

Author SHA1 Message Date
Rafaël Carré
685209d907 as3525: add some comments in the microphone channel copy loop
Indent the asm constraints at the same level than instructions

Also add a trick to reduce the number of instructions outputted by gcc
in the commented C version of the loop

The difference between C and asm is now 1 instruction

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26027 a1c6a512-1295-4272-9138-f99709370657
2010-05-14 16:47:58 +00:00
Rafaël Carré
ac43fd367a as3525v1: duplicate the right channel into the left channel when recording microphone
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26023 a1c6a512-1295-4272-9138-f99709370657
2010-05-14 12:59:54 +00:00
Rafaël Carré
90963dcc0b as3525: retain & release DMA engine when starting and stopping recording
This fixes the error introduced in r25989, where it would release the
DMA engine when uninitializing recording.
The real bug has been fixed instead (in pitch_detector)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26003 a1c6a512-1295-4272-9138-f99709370657
2010-05-13 21:32:10 +00:00
Rafaël Carré
cd8ed00dfe as3525: use the correct uncached address for rec peak buffer
also avoid disabling completely the DMA engine in pitch_detector

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25989 a1c6a512-1295-4272-9138-f99709370657
2010-05-13 08:21:04 +00:00
Rafaël Carré
bc0434d63a as3525: use a table for mclk dividers, get rid of a division
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25981 a1c6a512-1295-4272-9138-f99709370657
2010-05-13 05:58:52 +00:00
Rafaël Carré
d556f26820 as3525: use DMA for recording
Flyspray: FS#11257

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25980 a1c6a512-1295-4272-9138-f99709370657
2010-05-13 05:26: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
Bertrik Sikken
ba9040a82b Sansa AMS: allow use of PLL B for more accurate audio sample rate (0.04% instead 0.15% error)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24211 a1c6a512-1295-4272-9138-f99709370657
2010-01-10 14:24:45 +00:00
Rafaël Carré
231e54d80f Sansa AMS : fix recording
Flyspray: FS#10371
Authors: Fred Bauer and myself

Only enabled on e200v2 and Fuze (crashes on clipv1)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23739 a1c6a512-1295-4272-9138-f99709370657
2009-11-24 17:59:25 +00:00
Rafaël Carré
ed13fd6dca Sansa AMS: VIC_INT_ENABLE register is not a mask
When read it returns all enabled interrupt sources
When written it enables interrupt sources for each bit set
So just like VIC_INT_EN_CLEAR, we don't have to read the previous value
before writing to it (VIC_INT_EN_CLEAR is write-only anyway)

Thanks to Fred Bauer for spotting

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23734 a1c6a512-1295-4272-9138-f99709370657
2009-11-24 12:05:53 +00:00
Rafaël Carré
9b46960baf Sansa AMS PCM : cleanup
Init CGU_AUDIO with correct clock source (for play & rec)
Do not disable recording clocks when starting playback, they are already disabled
Move clock enable/disable code from dma callback to init

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23493 a1c6a512-1295-4272-9138-f99709370657
2009-11-03 08:14:28 +00:00
Rafaël Carré
f64a3fe149 Sansa AMS PCM: remove runtime sanity checks
Unaligned memory ops will cause a data abort anyway
Make the check for samplerate at buildtime

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23480 a1c6a512-1295-4272-9138-f99709370657
2009-11-01 23:35:34 +00:00
Rafaël Carré
9b4057bbd4 Sansa AMS recording support (Microphone and FM)
Still disabled on all targets:
- Fuze and e200v2 see spurious interrupts with no source defined
- Clip/m200v4 deadlock instantly when starting recording (perhaps due to low memory size)

Having the code in SVN will make working on this feature easier

Also add keymaps for Fuze, and correct Frequency section of recording
options : the 22.05kHz limitation of e200v1 and c200v1 doesn't apply to
Sansa AMS (different I2S hardware, unrelated to as3514)

Flyspray: FS#10371
Authors: Fred Bauer and myself

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23476 a1c6a512-1295-4272-9138-f99709370657
2009-11-01 22:51:31 +00:00
Rafaël Carré
0290094d8a Sansa AMS PCM : replace buggy and confusing one-liner
The bits which are not divider (i2si/i2so enable and clock selection)
would be unset.
This is not a problem in the current code since this function was always
called before starting playback (and setting those bits) but this might
be a problem when recording is enabled.

Finally it is simpler to read.

Thanks to Fred Bauer for pointing this.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23156 a1c6a512-1295-4272-9138-f99709370657
2009-10-13 16:41:20 +00:00
Rafaël Carré
f504153857 FS#10048 : enable MMU and data cache on Sansa AMS to give a major speed up
- cache IRAM and DRAM
- map IRAM just next to DRAM to remove the need for -mlong-calls and reduce binsize
- tweak delays in Fuze button code
- tweak delays in Clip button code (down button sometimes doesn't respond anyway : an alternate driver is being worked on)

Before reporting any problem, please check your filesystem or format your player from the OF

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21228 a1c6a512-1295-4272-9138-f99709370657
2009-06-08 23:05:33 +00:00
Bertrik Sikken
9ab84b073f Patch by Rafaël Carré - Sansa AMS : inform pcm.c when playback stopped, use pcm_play_dma_stopped_callback()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20644 a1c6a512-1295-4272-9138-f99709370657
2009-04-07 17:11:55 +00:00
Björn Stenberg
511a8690c6 Fixed compiler warnings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19512 a1c6a512-1295-4272-9138-f99709370657
2008-12-20 20:48:27 +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
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
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
Rafaël Carré
6b566568eb Fix Clip firmware building by adding missing symbols
Implement some of the new functions
Use as3514 rtc
Add AS3525 case in rolo.c
Copy card_get_info_target() from ata-sd-pp.c , and use the correct 32bits words order

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19064 a1c6a512-1295-4272-9138-f99709370657
2008-11-10 11:04:43 +00:00