summaryrefslogtreecommitdiff
path: root/firmware/export/pcm_sampr.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2011-12-08 19:20:00 +0000
committerMichael Sevakis <jethead71@rockbox.org>2011-12-08 19:20:00 +0000
commite42a3194de3b4fb9cd3e7cbd2e0ff17fea804b72 (patch)
tree71ddb9c8a927ac4b4a2ba962cd92f935eb1ba445 /firmware/export/pcm_sampr.h
parent2c7379757cb20ac9731c98847c6f6309d32607f3 (diff)
downloadrockbox-e42a3194de3b4fb9cd3e7cbd2e0ff17fea804b72.tar.gz
rockbox-e42a3194de3b4fb9cd3e7cbd2e0ff17fea804b72.zip
AS3525v1/v2:
Fix problems with volume of recorded material by converting 14-bit samples to 16-bit. Remove duplicate samples from recorded data and support proper samplerate since ADC runs 1/2 the codec clock. Support monitoring mono on both output channels by feeding data manually to I2SOUT under the right conditions. DMA is no longer used for recording since frames must be processed as described above but it does allow full-duplex audio. Miscellaneous change includes a proper constant (HW_SAMPR_DEFAULT) to reset the hardware samplerate when recording is closed. PP5024 and AS3525 have different default recording rates (22kHz and 44kHz respectively) but both have half-speed ADC. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31180 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/pcm_sampr.h')
-rw-r--r--firmware/export/pcm_sampr.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/export/pcm_sampr.h b/firmware/export/pcm_sampr.h
index 62bfd0068b..01a8ed428e 100644
--- a/firmware/export/pcm_sampr.h
+++ b/firmware/export/pcm_sampr.h
@@ -305,6 +305,8 @@ enum rec_freq_indexes
305#define REC_SAMPR_DEFAULT SAMPR_44 305#define REC_SAMPR_DEFAULT SAMPR_44
306#endif 306#endif
307 307
308#define HW_SAMPR_RESET 0
309
308#define REC_FREQ_CFG_VAL_LIST &REC_HAVE_96_(",96") REC_HAVE_88_(",88") \ 310#define REC_FREQ_CFG_VAL_LIST &REC_HAVE_96_(",96") REC_HAVE_88_(",88") \
309 REC_HAVE_64_(",64") REC_HAVE_48_(",48") \ 311 REC_HAVE_64_(",64") REC_HAVE_48_(",48") \
310 REC_HAVE_44_(",44") REC_HAVE_32_(",32") \ 312 REC_HAVE_44_(",44") REC_HAVE_32_(",32") \
@@ -324,7 +326,8 @@ extern const unsigned long rec_freq_sampr[REC_NUM_FREQ];
324#define SAMPR_TYPE_REC (0x01 << 24) 326#define SAMPR_TYPE_REC (0x01 << 24)
325#endif 327#endif
326 328
327unsigned int pcm_sampr_type_rec_to_play(unsigned int samplerate); 329unsigned int pcm_sampr_to_hw_sampr(unsigned int samplerate,
330 unsigned int type);
328 331
329#else /* ndef CONFIG_SAMPR_TYPES */ 332#else /* ndef CONFIG_SAMPR_TYPES */
330 333