diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-03-29 22:26:58 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-03-29 22:26:58 +0000 |
commit | ed0c5edd6280b58755736700b95a3e65034d52b4 (patch) | |
tree | 6238c9efe1f34ca36e021b45e006d8797a03f459 /firmware/export | |
parent | ef41ad91dbf5b6a5b4e23a70ac0e9a4824e940d3 (diff) | |
download | rockbox-ed0c5edd6280b58755736700b95a3e65034d52b4.tar.gz rockbox-ed0c5edd6280b58755736700b95a3e65034d52b4.zip |
as3525v2 : recording (FM only, no microphone yet)
Add HAVE_AS3543 config define to differentiate the bits changed since as3514/as3517
Enable recording on Fuzev2/Clipv2/Clip+, although it was tested on Clip+ only
Note: storage is still read-only so I tested by listening to headphones loopback and watching the recording level in recscreen
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25390 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/as3514.h | 23 | ||||
-rw-r--r-- | firmware/export/config/sansaclipplus.h | 15 | ||||
-rw-r--r-- | firmware/export/config/sansaclipv2.h | 14 | ||||
-rw-r--r-- | firmware/export/config/sansafuzev2.h | 10 |
4 files changed, 33 insertions, 29 deletions
diff --git a/firmware/export/as3514.h b/firmware/export/as3514.h index afc982da39..2db28397f1 100644 --- a/firmware/export/as3514.h +++ b/firmware/export/as3514.h | |||
@@ -22,6 +22,8 @@ | |||
22 | #ifndef _AS3514_H | 22 | #ifndef _AS3514_H |
23 | #define _AS3514_H | 23 | #define _AS3514_H |
24 | 24 | ||
25 | #include "config.h" | ||
26 | |||
25 | extern int tenthdb2master(int db); | 27 | extern int tenthdb2master(int db); |
26 | 28 | ||
27 | extern void audiohw_set_master_vol(int vol_l, int vol_r); | 29 | extern void audiohw_set_master_vol(int vol_l, int vol_r); |
@@ -36,24 +38,32 @@ extern void audiohw_set_lineout_vol(int vol_l, int vol_r); | |||
36 | #define AS3514_LSP_OUT_L 0x05 | 38 | #define AS3514_LSP_OUT_L 0x05 |
37 | #define AS3514_MIC1_R 0x06 | 39 | #define AS3514_MIC1_R 0x06 |
38 | #define AS3514_MIC1_L 0x07 | 40 | #define AS3514_MIC1_L 0x07 |
41 | #ifndef HAVE_AS3543 | ||
39 | #define AS3514_MIC2_R 0x08 | 42 | #define AS3514_MIC2_R 0x08 |
40 | #define AS3514_MIC2_L 0x09 | 43 | #define AS3514_MIC2_L 0x09 |
44 | #endif | ||
41 | #define AS3514_LINE_IN1_R 0x0a | 45 | #define AS3514_LINE_IN1_R 0x0a |
42 | #define AS3514_LINE_IN1_L 0x0b | 46 | #define AS3514_LINE_IN1_L 0x0b |
47 | #ifndef HAVE_AS3543 | ||
43 | #define AS3514_LINE_IN2_R 0x0c | 48 | #define AS3514_LINE_IN2_R 0x0c |
44 | #define AS3514_LINE_IN2_L 0x0d | 49 | #define AS3514_LINE_IN2_L 0x0d |
50 | #endif | ||
45 | #define AS3514_DAC_R 0x0e | 51 | #define AS3514_DAC_R 0x0e |
46 | #define AS3514_DAC_L 0x0f | 52 | #define AS3514_DAC_L 0x0f |
47 | #define AS3514_ADC_R 0x10 | 53 | #define AS3514_ADC_R 0x10 |
48 | #define AS3514_ADC_L 0x11 | 54 | #define AS3514_ADC_L 0x11 |
49 | #define AS3543_DAC_IF 0x12 /* only in as3543 */ | 55 | #ifdef HAVE_AS3543 |
56 | #define AS3543_DAC_IF 0x12 | ||
57 | #endif | ||
50 | #define AS3514_AUDIOSET1 0x14 | 58 | #define AS3514_AUDIOSET1 0x14 |
51 | #define AS3514_AUDIOSET2 0x15 | 59 | #define AS3514_AUDIOSET2 0x15 |
52 | #define AS3514_AUDIOSET3 0x16 | 60 | #define AS3514_AUDIOSET3 0x16 |
53 | #define AS3517_USB_UTIL 0x17 /* only in as3517+ */ | 61 | #define AS3517_USB_UTIL 0x17 /* only in as3517+ */ |
54 | 62 | ||
55 | #define AS3543_BACKLIGHT 0x1b /* only in as3543 */ | 63 | #ifdef HAVE_AS3543 |
56 | #define AS3543_PMU_ENABLE 0x1c /* only in as3543 */ | 64 | #define AS3543_BACKLIGHT 0x1b |
65 | #define AS3543_PMU_ENABLE 0x1c | ||
66 | #endif | ||
57 | 67 | ||
58 | #define AS3514_PLLMODE 0x1d | 68 | #define AS3514_PLLMODE 0x1d |
59 | 69 | ||
@@ -161,6 +171,9 @@ extern void audiohw_set_lineout_vol(int vol_l, int vol_r); | |||
161 | /* Use AS3514_VOL_MASK */ | 171 | /* Use AS3514_VOL_MASK */ |
162 | 172 | ||
163 | /* LINE_IN1_R (0Ah) */ | 173 | /* LINE_IN1_R (0Ah) */ |
174 | #ifdef HAVE_AS3543 | ||
175 | #define LINE_IN_R_LINE_SELECT (0x1 << 6) | ||
176 | #endif | ||
164 | #define LINE_IN1_R_LI1R_MUTE_off (0x1 << 5) | 177 | #define LINE_IN1_R_LI1R_MUTE_off (0x1 << 5) |
165 | /* Use AS3514_VOL_MASK */ | 178 | /* Use AS3514_VOL_MASK */ |
166 | 179 | ||
@@ -201,8 +214,12 @@ extern void audiohw_set_lineout_vol(int vol_l, int vol_r); | |||
201 | /* Use AS3514_VOL_MASK */ | 214 | /* Use AS3514_VOL_MASK */ |
202 | 215 | ||
203 | /* ADC_L (11h) */ | 216 | /* ADC_L (11h) */ |
217 | #ifdef HAVE_AS3543 | ||
218 | #define ADC_L_ADC_MUTE_off (0x1 << 5) | ||
219 | #else | ||
204 | #define ADC_L_FS_2 (0x1 << 7) | 220 | #define ADC_L_FS_2 (0x1 << 7) |
205 | #define ADC_L_ADC_MUTE_off (0x1 << 6) | 221 | #define ADC_L_ADC_MUTE_off (0x1 << 6) |
222 | #endif | ||
206 | /* Use AS3514_VOL_MASK */ | 223 | /* Use AS3514_VOL_MASK */ |
207 | 224 | ||
208 | /* AUDIOSET1 (14h)*/ | 225 | /* AUDIOSET1 (14h)*/ |
diff --git a/firmware/export/config/sansaclipplus.h b/firmware/export/config/sansaclipplus.h index 310df3a115..462c0a76e8 100644 --- a/firmware/export/config/sansaclipplus.h +++ b/firmware/export/config/sansaclipplus.h | |||
@@ -16,19 +16,12 @@ | |||
16 | #define HAVE_HOTSWAP | 16 | #define HAVE_HOTSWAP |
17 | #endif | 17 | #endif |
18 | 18 | ||
19 | 19 | #define HW_SAMPR_CAPS SAMPR_CAP_ALL | |
20 | #if 0 /* disabled since there is no driver (yet) */ | ||
21 | |||
22 | #define HW_SAMPR_CAPS (SAMPR_CAP_44) | ||
23 | 20 | ||
24 | /* define this if you have recording possibility */ | 21 | /* define this if you have recording possibility */ |
25 | #define HAVE_RECORDING | 22 | #define HAVE_RECORDING |
26 | 23 | ||
27 | #define REC_SAMPR_CAPS (SAMPR_CAP_22) | 24 | #define REC_SAMPR_CAPS SAMPR_CAP_ALL |
28 | #define REC_FREQ_DEFAULT REC_FREQ_22 /* Default is not 44.1kHz */ | ||
29 | #define REC_SAMPR_DEFAULT SAMPR_22 | ||
30 | |||
31 | #endif | ||
32 | 25 | ||
33 | /* Define bitmask of input sources - recordable bitmask can be defined | 26 | /* Define bitmask of input sources - recordable bitmask can be defined |
34 | explicitly if different */ | 27 | explicitly if different */ |
@@ -104,9 +97,9 @@ | |||
104 | /* There is no hardware tone control */ | 97 | /* There is no hardware tone control */ |
105 | #define HAVE_SW_TONE_CONTROLS | 98 | #define HAVE_SW_TONE_CONTROLS |
106 | 99 | ||
107 | /* We're working on the assumption that the AS3525 has something | 100 | /* AS3514 or newer */ |
108 | similar to the AS3514 for audio codec etc */ | ||
109 | #define HAVE_AS3514 | 101 | #define HAVE_AS3514 |
102 | #define HAVE_AS3543 | ||
110 | 103 | ||
111 | /* define this if you have a real-time clock */ | 104 | /* define this if you have a real-time clock */ |
112 | #ifndef BOOTLOADER | 105 | #ifndef BOOTLOADER |
diff --git a/firmware/export/config/sansaclipv2.h b/firmware/export/config/sansaclipv2.h index d9f3cf2142..20196dc72f 100644 --- a/firmware/export/config/sansaclipv2.h +++ b/firmware/export/config/sansaclipv2.h | |||
@@ -9,18 +9,12 @@ | |||
9 | #define FIRMWARE_OFFSET_FILE_DATA 8 | 9 | #define FIRMWARE_OFFSET_FILE_DATA 8 |
10 | #define FIRMWARE_OFFSET_FILE_CRC 0 | 10 | #define FIRMWARE_OFFSET_FILE_CRC 0 |
11 | 11 | ||
12 | #if 0 /* disabled since there is no driver (yet) */ | 12 | #define HW_SAMPR_CAPS SAMPR_CAP_ALL |
13 | |||
14 | #define HW_SAMPR_CAPS (SAMPR_CAP_44) | ||
15 | 13 | ||
16 | /* define this if you have recording possibility */ | 14 | /* define this if you have recording possibility */ |
17 | #define HAVE_RECORDING | 15 | #define HAVE_RECORDING |
18 | 16 | ||
19 | #define REC_SAMPR_CAPS (SAMPR_CAP_22) | 17 | #define REC_SAMPR_CAPS SAMPR_CAP_ALL |
20 | #define REC_FREQ_DEFAULT REC_FREQ_22 /* Default is not 44.1kHz */ | ||
21 | #define REC_SAMPR_DEFAULT SAMPR_22 | ||
22 | |||
23 | #endif | ||
24 | 18 | ||
25 | /* Define bitmask of input sources - recordable bitmask can be defined | 19 | /* Define bitmask of input sources - recordable bitmask can be defined |
26 | explicitly if different */ | 20 | explicitly if different */ |
@@ -99,9 +93,9 @@ | |||
99 | /* There is no hardware tone control */ | 93 | /* There is no hardware tone control */ |
100 | #define HAVE_SW_TONE_CONTROLS | 94 | #define HAVE_SW_TONE_CONTROLS |
101 | 95 | ||
102 | /* We're working on the assumption that the AS3525 has something | 96 | /* AS3514 or newer */ |
103 | similar to the AS3514 for audio codec etc */ | ||
104 | #define HAVE_AS3514 | 97 | #define HAVE_AS3514 |
98 | #define HAVE_AS3543 | ||
105 | 99 | ||
106 | /* define this if you have a real-time clock */ | 100 | /* define this if you have a real-time clock */ |
107 | #ifndef BOOTLOADER | 101 | #ifndef BOOTLOADER |
diff --git a/firmware/export/config/sansafuzev2.h b/firmware/export/config/sansafuzev2.h index b42a0d1bb8..ddf42d9563 100644 --- a/firmware/export/config/sansafuzev2.h +++ b/firmware/export/config/sansafuzev2.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * This config file is for the Sandisk Sansa Fuze | 2 | * This config file is for the Sandisk Sansa Fuze v2 |
3 | */ | 3 | */ |
4 | #define TARGET_TREE /* this target is using the target tree system */ | 4 | #define TARGET_TREE /* this target is using the target tree system */ |
5 | 5 | ||
@@ -10,9 +10,9 @@ | |||
10 | #define HW_SAMPR_CAPS SAMPR_CAP_ALL | 10 | #define HW_SAMPR_CAPS SAMPR_CAP_ALL |
11 | 11 | ||
12 | /* define this if you have recording possibility */ | 12 | /* define this if you have recording possibility */ |
13 | //#define HAVE_RECORDING | 13 | #define HAVE_RECORDING |
14 | 14 | ||
15 | //#define REC_SAMPR_CAPS SAMPR_CAP_ALL | 15 | #define REC_SAMPR_CAPS SAMPR_CAP_ALL |
16 | 16 | ||
17 | /* Default recording levels */ | 17 | /* Default recording levels */ |
18 | #define DEFAULT_REC_MIC_GAIN 23 | 18 | #define DEFAULT_REC_MIC_GAIN 23 |
@@ -89,9 +89,9 @@ | |||
89 | #define LCD_PIXELFORMAT RGB565 /* rgb565 */ | 89 | #define LCD_PIXELFORMAT RGB565 /* rgb565 */ |
90 | 90 | ||
91 | 91 | ||
92 | /* We're working on the assumption that the AS3525 has something | 92 | /* AS3514 or newer */ |
93 | similar to the AS3514 for audio codec etc */ | ||
94 | #define HAVE_AS3514 | 93 | #define HAVE_AS3514 |
94 | #define HAVE_AS3543 | ||
95 | 95 | ||
96 | /* Define this if you have a software controlled poweroff */ | 96 | /* Define this if you have a software controlled poweroff */ |
97 | #define HAVE_SW_POWEROFF | 97 | #define HAVE_SW_POWEROFF |