blob: 43d99411a65d3226c552315db225ec4d542e9d11 [file] [log] [blame]
ehgrace.kim253e0222012-06-18 23:41:07 -07001/* include/sound/tpa2028d.h
2 *
3 * Copyright (C) 2009 LGE, Inc.
4 *
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 */
15
16/*
17 * Revision 0.1 -- BJB -- 3/18/10 -- Original Version
18 * Revision 0.2 -- BJB -- 3/19/10 -- Corrected dB to DB in Register 0x01, Added function prototypes.
19 * Revision 0.3 -- AME -- 5/17/10 -- No changes to TPA2055D3_FDK.h file.
20 *
21 */
22
23/* ---- I2C ADDR -----*/
24#define IC_CONTROL (char) 0x01
25#define AGC_ATTACK_CONTROL (char) 0x02
26#define AGC_RELEASE_CONTROL (char) 0x03
27#define AGC_HOLD_TIME_CONTROL (char) 0x04
28#define AGC_FIXED_GAIN_CONTROL (char) 0x05
29#define AGC1_CONTROL (char) 0x06
30#define AGC2_CONTROL (char) 0x07
31
32struct amp_cal {
33 u8 dev_type;
34 u8 gain_type;
35 u8 data;
36};
37
38void set_amp_gain(int num);
39
40struct audio_amp_platform_data {
41 int (*enable)(int);
42 int (*power)(bool);
43 char agc_compression_rate;
44 char agc_output_limiter_disable;
45 char agc_fixed_gain;
46};
47
48/* SPK FUNCTION */
49#define SPK_ON 1
50#define SPK_OFF 0