1 /*
2 ** =============================================================================
3 ** Copyright (c) 2016 Texas Instruments Inc.
4 **
5 ** This program is free software; you can redistribute it and/or modify it under
6 ** the terms of the GNU General Public License as published by the Free Software
7 ** Foundation; version 2.
8 **
9 ** This program is distributed in the hope that it will be useful, but WITHOUT
10 ** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 ** FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
12 **
13 ** You should have received a copy of the GNU General Public License along with
14 ** this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
15 ** Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 **
17 ** File:
18 ** tas2555-core.h
19 **
20 ** Description:
21 ** header file for tas2555-core.c
22 **
23 ** =============================================================================
24 */
26 #ifndef _TAS2555_CORE_H
27 #define _TAS2555_CORE_H
29 #include "tas2555.h"
31 void tas2555_enable(struct tas2555_priv *pTAS2555, bool bEnable);
32 int tas2555_set_sampling_rate(struct tas2555_priv *pTAS2555,
33 unsigned int nSamplingRate);
34 int tas2555_set_bit_rate(struct tas2555_priv *pTAS2555,
35 enum channel chn, unsigned int nBitRate);
36 int tas2555_get_bit_rate(struct tas2555_priv *pTAS2555,
37 enum channel chn, unsigned char *pBitRate);
38 int tas2555_set_config(struct tas2555_priv *pTAS2555, int config);
39 void tas2555_fw_ready(const struct firmware *pFW, void *pContext);
40 int tas2555_set_program(struct tas2555_priv *pTAS2555,
41 unsigned int nProgram);
42 int tas2555_set_calibration(struct tas2555_priv *pTAS2555,
43 int nCalibration);
44 int tas2555_load_default(struct tas2555_priv *pTAS2555);
45 int tas2555_parse_dt(struct device *dev, struct tas2555_priv *pTAS2555);
46 int tas2555_get_DAC_gain(struct tas2555_priv *pTAS2555,
47 enum channel chl, unsigned char *pnGain);
48 int tas2555_set_DAC_gain(struct tas2555_priv *pTAS2555,
49 enum channel chl, unsigned int nGain);
51 #endif /* _TAS2555_CORE_H */