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/as3514.h | |
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/as3514.h')
-rw-r--r-- | firmware/export/as3514.h | 23 |
1 files changed, 20 insertions, 3 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)*/ |