]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - tas2557sw-android/tas2557dm-ftc.git/blob - tas2557.h
update the FTC of TAS2557 Dual Mono to support different speaker
[tas2557sw-android/tas2557dm-ftc.git] / tas2557.h
1 /*\r
2 ** =============================================================================\r
3 ** Copyright (c) 2016  Texas Instruments Inc.\r
4 **\r
5 ** This program is free software; you can redistribute it and/or modify it under\r
6 ** the terms of the GNU General Public License as published by the Free Software \r
7 ** Foundation; version 2.\r
8 **\r
9 ** This program is distributed in the hope that it will be useful, but WITHOUT\r
10 ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
11 ** FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\r
12 **\r
13 ** You should have received a copy of the GNU General Public License along with\r
14 ** this program; if not, write to the Free Software Foundation, Inc., 51 Franklin\r
15 ** Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
16 **\r
17 ** File:\r
18 **     tas2557.h\r
19 **\r
20 ** Description:\r
21 **     header file for tas2557.c\r
22 **\r
23 ** =============================================================================\r
24 */\r
25 \r
26 #ifndef TAS2557_H_\r
27 #define TAS2557_H_\r
28 \r
29 #include <stdint.h>\r
30 \r
31 #define TILOAD_IOC_MAGIC   0xE0\r
32 \r
33 #define CONFIGURATION 0\r
34 #define CONFIGURATION_CALIBRATION 2\r
35 \r
36 #define TILOAD_IOCTL_SET_CHL                    _IOW(TILOAD_IOC_MAGIC, 5, int)\r
37 #define TILOAD_IOCTL_SET_CONFIG                 _IOW(TILOAD_IOC_MAGIC, 6, int)\r
38 #define TILOAD_IOCTL_SET_CALIBRATION    _IOW(TILOAD_IOC_MAGIC, 7, int)\r
39 \r
40 extern void tas2557_load_configuration(int nConfiguration);\r
41 extern void tas2557_load_calibration(int nCalibration);\r
42 extern uint32_t tas2557_switch_device(uint8_t i2cslave);\r
43 extern uint32_t tas2557_coeff_read(uint8_t book, uint8_t page, uint8_t reg);\r
44 extern void tas2557_coeff_write(uint8_t book, uint8_t page, uint8_t reg, uint32_t data);\r
45 extern void tas2557_save_cal(double dev_a_re, uint32_t dev_a_rms_pow, uint32_t dev_a_t_limit, \r
46         double dev_b_re, uint32_t dev_b_rms_pow, uint32_t dev_b_t_limit, \r
47         double t_cal,  char * pFileName);\r
48 extern void tas2557_open_bin(char * pFileName, unsigned int nConfiguration, \r
49         unsigned char dev_a, unsigned char dev_b);\r
50 extern void tas2557_close_bin(void);\r
51 \r
52 #endif /* TAS2557_H_ */\r