summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-03-29 22:26:58 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-03-29 22:26:58 +0000
commited0c5edd6280b58755736700b95a3e65034d52b4 (patch)
tree6238c9efe1f34ca36e021b45e006d8797a03f459 /firmware/export
parentef41ad91dbf5b6a5b4e23a70ac0e9a4824e940d3 (diff)
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.h23
-rw-r--r--firmware/export/config/sansaclipplus.h15
-rw-r--r--firmware/export/config/sansaclipv2.h14
-rw-r--r--firmware/export/config/sansafuzev2.h10
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 @@
#ifndef _AS3514_H
#define _AS3514_H
+#include "config.h"
+
extern int tenthdb2master(int db);
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);
#define AS3514_LSP_OUT_L 0x05
#define AS3514_MIC1_R 0x06
#define AS3514_MIC1_L 0x07
+#ifndef HAVE_AS3543
#define AS3514_MIC2_R 0x08
#define AS3514_MIC2_L 0x09
+#endif
#define AS3514_LINE_IN1_R 0x0a
#define AS3514_LINE_IN1_L 0x0b
+#ifndef HAVE_AS3543
#define AS3514_LINE_IN2_R 0x0c
#define AS3514_LINE_IN2_L 0x0d
+#endif
#define AS3514_DAC_R 0x0e
#define AS3514_DAC_L 0x0f
#define AS3514_ADC_R 0x10
#define AS3514_ADC_L 0x11
-#define AS3543_DAC_IF 0x12 /* only in as3543 */
+#ifdef HAVE_AS3543
+#define AS3543_DAC_IF 0x12
+#endif
#define AS3514_AUDIOSET1 0x14
#define AS3514_AUDIOSET2 0x15
#define AS3514_AUDIOSET3 0x16
#define AS3517_USB_UTIL 0x17 /* only in as3517+ */
-#define AS3543_BACKLIGHT 0x1b /* only in as3543 */
-#define AS3543_PMU_ENABLE 0x1c /* only in as3543 */
+#ifdef HAVE_AS3543
+#define AS3543_BACKLIGHT 0x1b
+#define AS3543_PMU_ENABLE 0x1c
+#endif
#define AS3514_PLLMODE 0x1d
@@ -161,6 +171,9 @@ extern void audiohw_set_lineout_vol(int vol_l, int vol_r);
/* Use AS3514_VOL_MASK */
/* LINE_IN1_R (0Ah) */
+#ifdef HAVE_AS3543
+#define LINE_IN_R_LINE_SELECT (0x1 << 6)
+#endif
#define LINE_IN1_R_LI1R_MUTE_off (0x1 << 5)
/* Use AS3514_VOL_MASK */
@@ -201,8 +214,12 @@ extern void audiohw_set_lineout_vol(int vol_l, int vol_r);
/* Use AS3514_VOL_MASK */
/* ADC_L (11h) */
+#ifdef HAVE_AS3543
+#define ADC_L_ADC_MUTE_off (0x1 << 5)
+#else
#define ADC_L_FS_2 (0x1 << 7)
#define ADC_L_ADC_MUTE_off (0x1 << 6)
+#endif
/* Use AS3514_VOL_MASK */
/* 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 @@
#define HAVE_HOTSWAP
#endif
-
-#if 0 /* disabled since there is no driver (yet) */
-
-#define HW_SAMPR_CAPS (SAMPR_CAP_44)
+#define HW_SAMPR_CAPS SAMPR_CAP_ALL
/* define this if you have recording possibility */
#define HAVE_RECORDING
-#define REC_SAMPR_CAPS (SAMPR_CAP_22)
-#define REC_FREQ_DEFAULT REC_FREQ_22 /* Default is not 44.1kHz */
-#define REC_SAMPR_DEFAULT SAMPR_22
-
-#endif
+#define REC_SAMPR_CAPS SAMPR_CAP_ALL
/* Define bitmask of input sources - recordable bitmask can be defined
explicitly if different */
@@ -104,9 +97,9 @@
/* There is no hardware tone control */
#define HAVE_SW_TONE_CONTROLS
-/* We're working on the assumption that the AS3525 has something
- similar to the AS3514 for audio codec etc */
+/* AS3514 or newer */
#define HAVE_AS3514
+#define HAVE_AS3543
/* define this if you have a real-time clock */
#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 @@
#define FIRMWARE_OFFSET_FILE_DATA 8
#define FIRMWARE_OFFSET_FILE_CRC 0
-#if 0 /* disabled since there is no driver (yet) */
-
-#define HW_SAMPR_CAPS (SAMPR_CAP_44)
+#define HW_SAMPR_CAPS SAMPR_CAP_ALL
/* define this if you have recording possibility */
#define HAVE_RECORDING
-#define REC_SAMPR_CAPS (SAMPR_CAP_22)
-#define REC_FREQ_DEFAULT REC_FREQ_22 /* Default is not 44.1kHz */
-#define REC_SAMPR_DEFAULT SAMPR_22
-
-#endif
+#define REC_SAMPR_CAPS SAMPR_CAP_ALL
/* Define bitmask of input sources - recordable bitmask can be defined
explicitly if different */
@@ -99,9 +93,9 @@
/* There is no hardware tone control */
#define HAVE_SW_TONE_CONTROLS
-/* We're working on the assumption that the AS3525 has something
- similar to the AS3514 for audio codec etc */
+/* AS3514 or newer */
#define HAVE_AS3514
+#define HAVE_AS3543
/* define this if you have a real-time clock */
#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 @@
/*
- * This config file is for the Sandisk Sansa Fuze
+ * This config file is for the Sandisk Sansa Fuze v2
*/
#define TARGET_TREE /* this target is using the target tree system */
@@ -10,9 +10,9 @@
#define HW_SAMPR_CAPS SAMPR_CAP_ALL
/* define this if you have recording possibility */
-//#define HAVE_RECORDING
+#define HAVE_RECORDING
-//#define REC_SAMPR_CAPS SAMPR_CAP_ALL
+#define REC_SAMPR_CAPS SAMPR_CAP_ALL
/* Default recording levels */
#define DEFAULT_REC_MIC_GAIN 23
@@ -89,9 +89,9 @@
#define LCD_PIXELFORMAT RGB565 /* rgb565 */
-/* We're working on the assumption that the AS3525 has something
- similar to the AS3514 for audio codec etc */
+/* AS3514 or newer */
#define HAVE_AS3514
+#define HAVE_AS3543
/* Define this if you have a software controlled poweroff */
#define HAVE_SW_POWEROFF