From b15a523870d6aa45b38b92547053beb986b92d9a Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sat, 26 Jun 2010 10:07:17 +0000 Subject: e200v1/c200v1: Implement limited samplerate switching. Rates 24kHz and below are being a bear as far as minor crackling at higher amplitude-- leave them out for the time being since no solution is currently evident. 48, 44, 32 (rec rates 24, 22, 16) seem perfectly fine. I'm betting c200 is ok to include because it uses the same setup as e200. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27139 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/pcm.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'firmware/export/pcm.h') diff --git a/firmware/export/pcm.h b/firmware/export/pcm.h index 02fa04cb7e..e388e29f0c 100644 --- a/firmware/export/pcm.h +++ b/firmware/export/pcm.h @@ -54,9 +54,16 @@ typedef void (*pcm_play_callback_type)(unsigned char **start, size_t *size); typedef void (*pcm_rec_callback_type)(int status, void **start, size_t *size); -/* set the pcm frequency - use values in hw_sampr_list - * use -1 for the default frequency - */ +/* set the pcm frequency - use values in hw_sampr_list + * when CONFIG_SAMPR_TYPES is #defined, or-in SAMPR_TYPE_* fields with + * frequency value. SAMPR_TYPE_PLAY is 0 and the default if none is + * specified. */ +#ifdef CONFIG_SAMPR_TYPES +#ifdef SAMPR_TYPE_REC +unsigned int pcm_sampr_type_rec_to_play(unsigned int samplerate); +#endif +#endif /* CONFIG_SAMPR_TYPES */ + void pcm_set_frequency(unsigned int samplerate); /* apply settings to hardware immediately */ void pcm_apply_settings(void); -- cgit v1.2.3