summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2008-12-31 01:38:44 +0000
committerMichael Sevakis <jethead71@rockbox.org>2008-12-31 01:38:44 +0000
commit2e99b3d9318dbc98c242c9ddbbf23d2fcc5bf2bd (patch)
tree53587fff24b5da8c717cf2e052e16942501a78c4 /firmware/export
parent9ac7af749bceb67916b3179a3b7c7eee6ee6443a (diff)
Gigabeat S: Allow recording from FM. Give FM the same volume range as playback. NOTE: This bumps the si4700 output volume to -0dB so other players with that may need a minor adjustment.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19619 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/config-gigabeat-s.h13
-rwxr-xr-xfirmware/export/imx31l.h4
-rw-r--r--firmware/export/wm8978.h33
3 files changed, 31 insertions, 19 deletions
diff --git a/firmware/export/config-gigabeat-s.h b/firmware/export/config-gigabeat-s.h
index 69028822f0..64f351c1ce 100644
--- a/firmware/export/config-gigabeat-s.h
+++ b/firmware/export/config-gigabeat-s.h
@@ -79,12 +79,25 @@
/* Define this if you have the WM8978 audio codec */
#define HAVE_WM8978
+/* Define bitmask of input sources - recordable bitmask can be defined
+ explicitly if different */
#define INPUT_SRC_CAPS SRC_CAP_FMRADIO
+/* define the bitmask of hardware sample rates */
#define HW_SAMPR_CAPS (SAMPR_CAP_48 | SAMPR_CAP_44 | SAMPR_CAP_32 | \
SAMPR_CAP_24 | SAMPR_CAP_22 | SAMPR_CAP_16 | \
SAMPR_CAP_12 | SAMPR_CAP_11 | SAMPR_CAP_8)
+/* define the bitmask of recording sample rates */
+#define REC_SAMPR_CAPS HW_SAMPR_CAPS /* Same as playback */
+
+/* define default recording levels */
+#define DEFAULT_REC_LEFT_GAIN 0
+#define DEFAULT_REC_RIGHT_GAIN 0
+
+/* Define this if you have recording capability */
+#define HAVE_RECORDING
+
/* Define this if your LCD can be put to sleep. */
#define HAVE_LCD_SLEEP
/* We don't use a setting but a fixed delay after the backlight has
diff --git a/firmware/export/imx31l.h b/firmware/export/imx31l.h
index 5a964b8e2e..b572c788a9 100755
--- a/firmware/export/imx31l.h
+++ b/firmware/export/imx31l.h
@@ -777,7 +777,7 @@
#define AUDMUX_PTCR_TCSEL_PORT6 (0x5 << 22)
#define AUDMUX_PTCR_TCSEL_PORT7 (0x6 << 22)
-#define AUDMUX_PTCR_RFSDIR (1 << 21)
+#define AUDMUX_PTCR_RFS_DIR (1 << 21)
#define AUDMUX_PTCR_RFSSEL (0xf << 17)
#define AUDMUX_PTCR_RFSSEL_TXFS (0x0 << 17)
@@ -922,7 +922,7 @@
#define SSI_SIER_TLS (0x1 << 5)
#define SSI_SIER_RLS (0x1 << 4)
#define SSI_SIER_RFF1 (0x1 << 3)
-#define SSI_SIER_RFF2 (0x1 << 2)
+#define SSI_SIER_RFF0 (0x1 << 2)
#define SSI_SIER_TFE1 (0x1 << 1)
#define SSI_SIER_TFE0 (0x1 << 0)
diff --git a/firmware/export/wm8978.h b/firmware/export/wm8978.h
index f444c96a29..5d9c0d01e7 100644
--- a/firmware/export/wm8978.h
+++ b/firmware/export/wm8978.h
@@ -29,6 +29,7 @@
int tenthdb2master(int db);
void audiohw_set_headphone_vol(int vol_l, int vol_r);
void audiohw_set_frequency(int fsel);
+void audiohw_set_recsrc(int source, bool recording);
void wmc_set(unsigned int reg, unsigned int bits);
void wmc_clear(unsigned int reg, unsigned int bits);
@@ -108,8 +109,8 @@ void wmc_clear(unsigned int reg, unsigned int bits);
/* Volums masks and macros for analogue volumes */
#define WMC_AVOL 0x3f
-#define WMC_AVOLr(x) ((x) & WMC_AVOLUME_MASK)
-#define WMC_AVOLw(x) ((x) & WMC_AVOLUME_MASK)
+#define WMC_AVOLr(x) ((x) & WMC_AVOL)
+#define WMC_AVOLw(x) ((x) & WMC_AVOL)
/* WMC_SOFTWARE_RESET (0x00) */
#define WMC_RESET
@@ -457,8 +458,8 @@ void wmc_clear(unsigned int reg, unsigned int bits);
#define WMC_PGABOOSTL (1 << 8)
/* 000=disabled, 001=-12dB, 010=-9dB...111=+6dB */
#define WMC_L2_2BOOSTVOL (7 << 4)
- #define WMC_L2_2BOOSTVOLr(x) ((x) & WMC_L2_2_BOOSTVOL) >> 4)
- #define WMC_L2_2BOOSTVOLw(x) ((x) << 4) & WMC_L2_2_BOOSTVOL)
+ #define WMC_L2_2BOOSTVOLr(x) (((x) & WMC_L2_2BOOSTVOL) >> 4)
+ #define WMC_L2_2BOOSTVOLw(x) (((x) << 4) & WMC_L2_2BOOSTVOL)
/* 000=disabled, 001=-12dB, 010=-9dB...111=+6dB */
#define WMC_AUXL2BOOSTVOL (7 << 0)
#define WMC_AUXL2BOOSTVOLr(x) ((x) & WMC_AUXL2BOOSTVOL)
@@ -467,9 +468,9 @@ void wmc_clear(unsigned int reg, unsigned int bits);
/* WMC_RIGHT_ADC_BOOST_CTRL (0x30) */
#define WMC_PGABOOSTR (1 << 8)
/* 000=disabled, 001=-12dB, 010=-9dB...111=+6dB */
-#define WMC_R2_2_BOOSTVOL (7 << 4)
- #define WMC_R2_2BOOSTVOLr(x) ((x) & WMC_R2_2_BOOSTVOL) >> 4)
- #define WMC_R2_2BOOSTVOLw(x) ((x) << 4) & WMC_R2_2_BOOSTVOL)
+#define WMC_R2_2BOOSTVOL (7 << 4)
+ #define WMC_R2_2BOOSTVOLr(x) (((x) & WMC_R2_2BOOSTVOL) >> 4)
+ #define WMC_R2_2BOOSTVOLw(x) (((x) << 4) & WMC_R2_2BOOSTVOL)
/* 000=disabled, 001=-12dB, 010=-9dB...111=+6dB */
#define WMC_AUXR2BOOSTVOL (7 << 0)
#define WMC_AUXR2BOOSTVOLr(x) ((x) & WMC_AUXR2BOOSTVOL)
@@ -487,26 +488,26 @@ void wmc_clear(unsigned int reg, unsigned int bits);
/* WMC_LEFT_MIXER_CTRL (0x32) */
/* 000=-15dB, 001=-12dB...101=0dB, 110=+3dB, 111=+6dB */
#define WMC_AUXLMIXVOL (7 << 6)
- #define WMC_AUXLMIXVOLr(x) ((x) & WMC_AUXLMIXVOL) >> 6)
- #define WMC_AUXLMIXVOLw(x) ((x) << 6) & WMC_AUXLMIXVOL)
+ #define WMC_AUXLMIXVOLr(x) (((x) & WMC_AUXLMIXVOL) >> 6)
+ #define WMC_AUXLMIXVOLw(x) (((x) << 6) & WMC_AUXLMIXVOL)
#define WMC_AUXL2LMIX (1 << 5)
/* 000=-15dB, 001=-12dB...101=0dB, 110=+3dB, 111=+6dB */
#define WMC_BYPLMIXVOL (7 << 2)
- #define WMC_BYPLMIXVOLr(x) ((x) & WMC_BYPLMIXVOL) >> 2)
- #define WMC_BYPLMIXVOLw(x) ((x) << 2) & WMC_BYPLMIXVOL)
+ #define WMC_BYPLMIXVOLr(x) (((x) & WMC_BYPLMIXVOL) >> 2)
+ #define WMC_BYPLMIXVOLw(x) (((x) << 2) & WMC_BYPLMIXVOL)
#define WMC_BYPL2LMIX (1 << 1)
#define WMC_DACL2LMIX (1 << 0)
/* WMC_RIGHT_MIXER_CTRL (0x33) */
/* 000=-15dB, 001=-12dB...101=0dB, 110=+3dB, 111=+6dB */
#define WMC_AUXRMIXVOL (7 << 6)
- #define WMC_AUXRMIXVOLr(x) ((x) & WMC_AUXRMIXVOL) >> 6)
- #define WMC_AUXRMIXVOLw(x) ((x) << 6) & WMC_AUXRMIXVOL)
+ #define WMC_AUXRMIXVOLr(x) (((x) & WMC_AUXRMIXVOL) >> 6)
+ #define WMC_AUXRMIXVOLw(x) (((x) << 6) & WMC_AUXRMIXVOL)
#define WMC_AUXR2RMIX (1 << 5)
/* 000=-15dB, 001=-12dB...101=0dB, 110=+3dB, 111=+6dB */
#define WMC_BYPRMIXVOL (7 << 2)
- #define WMC_BYPRMIXVOLr(x) ((x) & WMC_BYPRMIXVOL) >> 2)
- #define WMC_BYPRMIXVOLw(x) ((x) << 2) & WMC_BYPRMIXVOL)
+ #define WMC_BYPRMIXVOLr(x) (((x) & WMC_BYPRMIXVOL) >> 2)
+ #define WMC_BYPRMIXVOLw(x) (((x) << 2) & WMC_BYPRMIXVOL)
#define WMC_BYPR2RMIX (1 << 1)
#define WMC_DACR2RMIX (1 << 0)
@@ -518,14 +519,12 @@ void wmc_clear(unsigned int reg, unsigned int bits);
/* Uses WMC_AVOL* macros */
/* WMC_OUT3_MIXER_CTRL (0x38) */
-#define WMC_OUT3MUTE (1 << 6)
#define WMC_OUT42OUT3 (1 << 3)
#define WMC_BYPL2OUT3 (1 << 2)
#define WMC_LMIX2OUT3 (1 << 1)
#define WMC_LDAC2OUT3 (1 << 0)
/* WMC_OUT4_MONO_MIXER_CTRL (0x39) */
-#define WMC_OUT4MUTE (1 << 6)
#define WMC_HALFSIG (1 << 5)
#define WMC_LMIX2OUT4 (1 << 4)
#define WMC_LDAC2OUT4 (1 << 3)