summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorMichael Chicoine <mc2739@gmail.com>2010-06-27 23:27:54 +0000
committerMichael Chicoine <mc2739@gmail.com>2010-06-27 23:27:54 +0000
commit908271594a1a5a181a410e89b36fc10477256ac4 (patch)
treed3928eafe1529b6c912e642d49ac2f3e392d92a9 /firmware
parent48b3de028e174cc42d9c8bba6e36f0a0f9e52e16 (diff)
Part of FS#11367 by me: e200v2 enable line out
Should also work for Fuzev1, although not tested. Connect dock after booting Rockbox. Connecting dock with power off will boot into OF. TODO: enable/disable line out based on dock connection status, add additional devices (Fuzev2 and c200v2) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27162 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/audio/as3514.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/firmware/drivers/audio/as3514.c b/firmware/drivers/audio/as3514.c
index 957aba8dbb..9b1359df3d 100644
--- a/firmware/drivers/audio/as3514.c
+++ b/firmware/drivers/audio/as3514.c
@@ -164,9 +164,16 @@ void audiohw_preinit(void)
#else
/* as3514/as3515 */
+#if defined(SANSA_E200V2) || defined(SANSA_FUZE)
+ /* Set ADC off, mixer on, DAC on, line out on, line in off, mic off */
+ /* Turn on SUM, DAC */
+ as3514_write(AS3514_AUDIOSET1, AUDIOSET1_DAC_on | AUDIOSET1_LOUT_on |
+ AUDIOSET1_SUM_on);
+#else
/* Set ADC off, mixer on, DAC on, line out off, line in off, mic off */
/* Turn on SUM, DAC */
as3514_write(AS3514_AUDIOSET1, AUDIOSET1_DAC_on | AUDIOSET1_SUM_on);
+#endif /* SANSA_E200V2 || SANSA_FUZE */
/* Set BIAS on, DITH off, AGC off, IBR_DAC max reduction, LSP_LP on,
IBR_LSP max reduction (50%), taken from c200v2 OF
@@ -215,6 +222,12 @@ void audiohw_preinit(void)
/* Headphone ON, MUTE, Min volume */
as3514_write(AS3514_HPH_OUT_L, HPH_OUT_L_HP_ON | HPH_OUT_L_HP_MUTE | 0x00);
+#if defined(SANSA_E200V2) || defined(SANSA_FUZE)
+ /* Line Out Stereo, MUTE, Min volume */
+ as3514_write(AS3514_LINE_OUT_L, LINE_OUT_L_LO_SES_DM_SE_ST |
+ LINE_OUT_L_LO_SES_DM_MUTE | 0x00);
+#endif /* SANSA_E200V2 || SANSA_FUZE */
+
/* DAC_Mute_off */
as3514_set(AS3514_DAC_L, DAC_L_DAC_MUTE_off);
}
@@ -223,8 +236,14 @@ static void audiohw_mute(bool mute)
{
if (mute) {
as3514_set(AS3514_HPH_OUT_L, HPH_OUT_L_HP_MUTE);
+#if defined(SANSA_E200V2) || defined(SANSA_FUZE)
+ as3514_set(AS3514_LINE_OUT_L, LINE_OUT_L_LO_SES_DM_MUTE);
+#endif /* SANSA_E200V2 || SANSA_FUZE */
} else {
as3514_clear(AS3514_HPH_OUT_L, HPH_OUT_L_HP_MUTE);
+#if defined(SANSA_E200V2) || defined(SANSA_FUZE)
+ as3514_clear(AS3514_LINE_OUT_L, LINE_OUT_L_LO_SES_DM_MUTE);
+#endif /* SANSA_E200V2 || SANSA_FUZE */
}
}
@@ -237,6 +256,12 @@ void audiohw_postinit(void)
ascodec_suppressor_on(false);
#endif
+#if defined(SANSA_E200V2) || defined(SANSA_FUZE)
+ /* Set line out volume to 0dB */
+ as3514_write_masked(AS3514_LINE_OUT_R, 0x1b, AS3514_VOL_MASK);
+ as3514_write_masked(AS3514_LINE_OUT_L, 0x1b, AS3514_VOL_MASK);
+#endif /* SANSA_E200V2 || SANSA_FUZE */
+
audiohw_mute(false);
}