summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/as3514.h78
-rw-r--r--firmware/export/config-e200.h7
2 files changed, 82 insertions, 3 deletions
diff --git a/firmware/export/as3514.h b/firmware/export/as3514.h
new file mode 100644
index 0000000000..0bf87dbc46
--- /dev/null
+++ b/firmware/export/as3514.h
@@ -0,0 +1,78 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 by Daniel Ankers
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#ifndef _AS3514_H
21#define _AS3514_H
22
23extern int tenthdb2master(int db);
24extern int tenthdb2mixer(int db);
25
26extern void audiohw_reset(void);
27extern int audiohw_init(void);
28extern void audiohw_enable_output(bool enable);
29extern int audiohw_set_master_vol(int vol_l, int vol_r);
30extern int audiohw_set_lineout_vol(int vol_l, int vol_r);
31extern int audiohw_set_mixer_vol(int channel1, int channel2);
32extern void audiohw_set_bass(int value);
33extern void audiohw_set_treble(int value);
34extern int audiohw_mute(int mute);
35extern void audiohw_close(void);
36extern void audiohw_set_nsorder(int order);
37extern void audiohw_set_sample_rate(int sampling_control);
38
39extern void audiohw_enable_recording(bool source_mic);
40extern void audiohw_disable_recording(void);
41extern void audiohw_set_recvol(int left, int right, int type);
42extern void audiohw_set_monitor(int enable);
43
44extern void audiohw_set_equalizer_band(int band, int freq, int bw, int gain);
45
46/* Register Descriptions */
47#define LINE_OUT_R 0x00
48#define LINE_OUT_L 0x01
49#define HPH_OUT_R 0x02
50#define HPH_OUT_L 0x03
51#define LSP_OUT_R 0x04
52#define LSP_OUT_L 0x05
53#define MIC1_R 0x06
54#define MIC1_L 0x07
55#define MIC2_R 0x08
56#define MIC2_L 0x09
57#define LINE_IN1_R 0x0a
58#define LINE_IN1_L 0x0b
59#define LINE_IN2_R 0x0c
60#define LINE_IN2_L 0x0d
61#define DAC_R 0x0e
62#define DAC_L 0x0f
63#define ADC_R 0x10
64#define ADC_L 0x11
65#define AUDIOSET1 0x14
66#define AUDIOSET2 0x15
67#define AUDIOSET3 0x16
68#define PLLMODE 0x1d
69
70/* Headphone volume goes from -45.43 - 1.07dB */
71#define VOLUME_MIN -454
72#define VOLUME_MAX 10
73
74#ifdef SANSA_E200
75#define AS3514_I2C_ADDR 0x46
76#endif
77
78#endif /* _AS3514_H */
diff --git a/firmware/export/config-e200.h b/firmware/export/config-e200.h
index afe2ebec89..1b3404a148 100644
--- a/firmware/export/config-e200.h
+++ b/firmware/export/config-e200.h
@@ -40,6 +40,10 @@
40 40
41/* Define this if you do software codec */ 41/* Define this if you do software codec */
42#define CONFIG_CODEC SWCODEC 42#define CONFIG_CODEC SWCODEC
43/* There is no hardware tone control */
44#define HAVE_SW_TONE_CONTROLS
45/* The PP5024 has a built-in AustriaMicrosystems AS3514 */
46#define HAVE_AS3514
43 47
44/* define this if you have a real-time clock */ 48/* define this if you have a real-time clock */
45#ifndef BOOTLOADER 49#ifndef BOOTLOADER
@@ -58,9 +62,6 @@
58/* The number of bytes reserved for loadable plugins */ 62/* The number of bytes reserved for loadable plugins */
59#define PLUGIN_BUFFER_SIZE 0x80000 63#define PLUGIN_BUFFER_SIZE 0x80000
60 64
61/* Use the built-in DAC on the PP5024 */
62#define HAVE_PP5024_CODEC
63
64#define AB_REPEAT_ENABLE 1 65#define AB_REPEAT_ENABLE 1
65 66
66/* FM Tuner */ 67/* FM Tuner */