summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-06-05 07:03:30 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-06-05 07:03:30 +0000
commitbcb8a884ee256e31d45a46bdeb83423457ac48d2 (patch)
tree5452ef9fa0b3f968a30835d44360f35951f2a0d5 /firmware/export
parentfea88888f0bc271b57a6d6dfab387fddc1cbd20d (diff)
downloadrockbox-bcb8a884ee256e31d45a46bdeb83423457ac48d2.tar.gz
rockbox-bcb8a884ee256e31d45a46bdeb83423457ac48d2.zip
e200: Add recording. Just from MIC right now and FM integration will happen 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
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/audio.h3
-rw-r--r--firmware/export/audiohw.h3
-rw-r--r--firmware/export/config-e200.h15
-rw-r--r--firmware/export/pcm_sampr.h15
4 files changed, 23 insertions, 13 deletions
diff --git a/firmware/export/audio.h b/firmware/export/audio.h
index a0da846215..a79a734e29 100644
--- a/firmware/export/audio.h
+++ b/firmware/export/audio.h
@@ -139,6 +139,9 @@ enum audio_sources
139 AUDIO_SRC_DEFAULT = AUDIO_SRC_PLAYBACK 139 AUDIO_SRC_DEFAULT = AUDIO_SRC_PLAYBACK
140}; 140};
141 141
142extern int audio_channels;
143extern int audio_output_source;
144
142#ifdef HAVE_RECORDING 145#ifdef HAVE_RECORDING
143/* Recordable source implies it has the input as well */ 146/* Recordable source implies it has the input as well */
144 147
diff --git a/firmware/export/audiohw.h b/firmware/export/audiohw.h
index 3838b007d0..65a2466dfc 100644
--- a/firmware/export/audiohw.h
+++ b/firmware/export/audiohw.h
@@ -58,7 +58,8 @@ enum {
58 SOUND_SUPERBASS, 58 SOUND_SUPERBASS,
59#endif 59#endif
60#if CONFIG_CODEC == MAS3587F || defined(HAVE_UDA1380) || defined(HAVE_TLV320)\ 60#if CONFIG_CODEC == MAS3587F || defined(HAVE_UDA1380) || defined(HAVE_TLV320)\
61 || defined(HAVE_WM8975) || defined(HAVE_WM8758) || defined(HAVE_WM8731) 61 || defined(HAVE_WM8975) || defined(HAVE_WM8758) || defined(HAVE_WM8731) \
62 || defined(HAVE_AS3514)
62 SOUND_LEFT_GAIN, 63 SOUND_LEFT_GAIN,
63 SOUND_RIGHT_GAIN, 64 SOUND_RIGHT_GAIN,
64 SOUND_MIC_GAIN, 65 SOUND_MIC_GAIN,
diff --git a/firmware/export/config-e200.h b/firmware/export/config-e200.h
index 9d4fb1ccef..001c89b7d7 100644
--- a/firmware/export/config-e200.h
+++ b/firmware/export/config-e200.h
@@ -7,11 +7,22 @@
7#define MODEL_NUMBER 16 7#define MODEL_NUMBER 16
8#define MODEL_NAME "Sandisk Sansa e200" 8#define MODEL_NAME "Sandisk Sansa e200"
9 9
10#define HW_SAMPR_CAPS (SAMPR_CAP_44)
11
10/* define this if you have recording possibility */ 12/* define this if you have recording possibility */
11/*#define HAVE_RECORDING*/ /* TODO: add support for this */ 13#define HAVE_RECORDING
14
15#define DEFAULT_REC_MIC_GAIN 23
16#define DEFAULT_REC_LEFT_GAIN 23
17#define DEFAULT_REC_RIGHT_GAIN 23
18
19#define REC_SAMPR_CAPS (SAMPR_CAP_22)
20#define REC_FREQ_DEFAULT REC_FREQ_22 /* Default is not 44.1kHz */
21#define REC_SAMPR_DEFAULT SAMPR_22
22
12/* Define bitmask of input sources - recordable bitmask can be defined 23/* Define bitmask of input sources - recordable bitmask can be defined
13 explicitly if different */ 24 explicitly if different */
14/* #define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_FMRADIO) */ 25#define INPUT_SRC_CAPS (SRC_CAP_MIC)
15 26
16/* define this if you have a bitmap LCD display */ 27/* define this if you have a bitmap LCD display */
17#define HAVE_LCD_BITMAP 28#define HAVE_LCD_BITMAP
diff --git a/firmware/export/pcm_sampr.h b/firmware/export/pcm_sampr.h
index 27a300d645..b27050ec60 100644
--- a/firmware/export/pcm_sampr.h
+++ b/firmware/export/pcm_sampr.h
@@ -292,18 +292,13 @@ enum rec_freq_indexes
292#define REC_HAVE_8_(...) 292#define REC_HAVE_8_(...)
293#endif 293#endif
294 REC_NUM_FREQ, 294 REC_NUM_FREQ,
295 /* This should always come out I reckon */
296 REC_FREQ_DEFAULT = REC_FREQ_44,
297 /* Get the minimum bitcount needed to save the range of values */
298 REC_FREQ_CFG_NUM_BITS = (REC_NUM_FREQ > 8 ?
299 4 : (REC_NUM_FREQ > 4 ?
300 3 : (REC_NUM_FREQ > 2 ?
301 2 : 1
302 )
303 )
304 ),
305}; /* enum rec_freq_indexes */ 295}; /* enum rec_freq_indexes */
306 296
297/* Default to 44.1kHz if not otherwise specified */
298#ifndef REC_FREQ_DEFAULT
299#define REC_FREQ_DEFAULT REC_FREQ_44
300#endif
301
307#define REC_FREQ_CFG_VAL_LIST &REC_HAVE_96_(",96") REC_HAVE_88_(",88") \ 302#define REC_FREQ_CFG_VAL_LIST &REC_HAVE_96_(",96") REC_HAVE_88_(",88") \
308 REC_HAVE_64_(",64") REC_HAVE_48_(",48") \ 303 REC_HAVE_64_(",64") REC_HAVE_48_(",48") \
309 REC_HAVE_44_(",44") REC_HAVE_32_(",32") \ 304 REC_HAVE_44_(",44") REC_HAVE_32_(",32") \