Cleanup the C200 keymap a bit, fixes the time settings screen for now.
[Rockbox.git] / firmware / export / as3514.h
blob8df228f1057a65daeb50b2ad5f5f8dfa901e3cc7
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 by Daniel Ankers
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.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef _AS3514_H
21 #define _AS3514_H
23 #include <stdbool.h>
25 extern int tenthdb2master(int db);
27 extern void audiohw_reset(void);
28 extern void audiohw_enable_output(bool enable);
29 extern int audiohw_set_master_vol(int vol_l, int vol_r);
30 extern int audiohw_set_lineout_vol(int vol_l, int vol_r);
31 extern void audiohw_set_sample_rate(int sampling_control);
33 extern void audiohw_enable_recording(bool source_mic);
34 extern void audiohw_disable_recording(void);
35 extern void audiohw_set_recvol(int left, int right, int type);
36 extern void audiohw_set_monitor(int enable);
38 /* Register Descriptions */
39 #define LINE_OUT_R 0x00
40 #define LINE_OUT_L 0x01
41 #define HPH_OUT_R 0x02
42 #define HPH_OUT_L 0x03
43 #define LSP_OUT_R 0x04
44 #define LSP_OUT_L 0x05
45 #define MIC1_R 0x06
46 #define MIC1_L 0x07
47 #define MIC2_R 0x08
48 #define MIC2_L 0x09
49 #define LINE_IN1_R 0x0a
50 #define LINE_IN1_L 0x0b
51 #define LINE_IN2_R 0x0c
52 #define LINE_IN2_L 0x0d
53 #define DAC_R 0x0e
54 #define DAC_L 0x0f
55 #define ADC_R 0x10
56 #define ADC_L 0x11
57 #define AUDIOSET1 0x14
58 #define AUDIOSET2 0x15
59 #define AUDIOSET3 0x16
60 #define PLLMODE 0x1d
62 #define IRQ_ENRD0 0x25
63 #define IRQ_ENRD1 0x26
64 #define IRQ_ENRD2 0x27
66 #define ADC_0 0x2e
67 #define ADC_1 0x2f
69 /* Headphone volume goes from -73.5 ... +6dB */
70 #define VOLUME_MIN -735
71 #define VOLUME_MAX 60
73 #if defined(SANSA_E200) || defined(SANSA_C200)
74 #define AS3514_I2C_ADDR 0x46
75 #endif
77 #endif /* _AS3514_H */