When setting a cache path also enable the cache implicitly.
[Rockbox.git] / firmware / export / as3514.h
blobf6f759b75c29e30a50246a31e4419cc8ee92421e
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_set_master_vol(int vol_l, int vol_r);
28 extern void audiohw_set_lineout_vol(int vol_l, int vol_r);
29 extern void audiohw_set_sample_rate(int sampling_control);
31 /* Register Descriptions */
32 #define AS3514_LINE_OUT_R 0x00
33 #define AS3514_LINE_OUT_L 0x01
34 #define AS3514_HPH_OUT_R 0x02
35 #define AS3514_HPH_OUT_L 0x03
36 #define AS3514_LSP_OUT_R 0x04
37 #define AS3514_LSP_OUT_L 0x05
38 #define AS3514_MIC1_R 0x06
39 #define AS3514_MIC1_L 0x07
40 #define AS3514_MIC2_R 0x08
41 #define AS3514_MIC2_L 0x09
42 #define AS3514_LINE_IN1_R 0x0a
43 #define AS3514_LINE_IN1_L 0x0b
44 #define AS3514_LINE_IN2_R 0x0c
45 #define AS3514_LINE_IN2_L 0x0d
46 #define AS3514_DAC_R 0x0e
47 #define AS3514_DAC_L 0x0f
48 #define AS3514_ADC_R 0x10
49 #define AS3514_ADC_L 0x11
50 #define AS3514_AUDIOSET1 0x14
51 #define AS3514_AUDIOSET2 0x15
52 #define AS3514_AUDIOSET3 0x16
53 #define AS3514_PLLMODE 0x1d
55 #define AS3514_SYSTEM 0x20
56 #define AS3514_CVDD_DCDC3 0x21
57 #define AS3514_CHARGER 0x22
58 #define AS3514_DCDC15 0x23
59 #define AS3514_SUPERVISOR 0x24
61 #define AS3514_IRQ_ENRD0 0x25
62 #define AS3514_IRQ_ENRD1 0x26
63 #define AS3514_IRQ_ENRD2 0x27
65 #define AS3514_RTCV 0x28
66 #define AS3514_RTCT 0x29
67 #define AS3514_RTC_0 0x2a
68 #define AS3514_RTC_1 0x2b
69 #define AS3514_RTC_2 0x2c
70 #define AS3514_RTC_3 0x2d
71 #define AS3514_ADC_0 0x2e
72 #define AS3514_ADC_1 0x2f
74 #define AS3514_UID_0 0x30
76 /* Headphone volume goes from -73.5 ... +6dB */
77 #define VOLUME_MIN -735
78 #define VOLUME_MAX 60
80 #if defined(SANSA_E200) || defined(SANSA_C200)
81 #define AS3514_I2C_ADDR 0x46
82 #endif
84 #endif /* _AS3514_H */