36c9132821016c2de342d35bcd28cdbf0a1e7001
1 /*\r
2 * Copyright (c) 2015, Texas Instruments Incorporated\r
3 * All rights reserved.\r
4 *\r
5 * Redistribution and use in source and binary forms, with or without\r
6 * modification, are permitted provided that the following conditions\r
7 * are met:\r
8 *\r
9 * * Redistributions of source code must retain the above copyright\r
10 * notice, this list of conditions and the following disclaimer.\r
11 *\r
12 * * Redistributions in binary form must reproduce the above copyright\r
13 * notice, this list of conditions and the following disclaimer in the\r
14 * documentation and/or other materials provided with the distribution.\r
15 *\r
16 * * Neither the name of Texas Instruments Incorporated nor the names of\r
17 * its contributors may be used to endorse or promote products derived\r
18 * from this software without specific prior written permission.\r
19 *\r
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\r
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\r
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\r
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\r
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\r
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,\r
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
31 *\r
32 */\r
33 \r
34 /**\r
35 * \file audio_dc_cfg.h\r
36 *\r
37 * \brief Audio daughter card configuration header file\r
38 *\r
39 */\r
40 \r
41 #ifndef _AUDIO_DC_CFG_H_\r
42 #define _AUDIO_DC_CFG_H_\r
43 \r
44 #include "analog_test.h"\r
45 \r
46 typedef struct _AdcConfig\r
47 {\r
48 uint8_t gain;\r
49 Audk2gAdcLeftInputMux adc1LMux;\r
50 Audk2gAdcLeftInputMux adc2LMux;\r
51 Audk2gAdcRightInputMux adc1RMux;\r
52 Audk2gAdcRightInputMux adc2RMux;\r
53 Audk2gAdcRxWordLen wlen;\r
54 Audk2gAdcDataFormat format;\r
55 uint8_t intEnable;\r
56 } Audk2gAdcConfig;\r
57 \r
58 typedef struct _DacConfig\r
59 {\r
60 Audk2gDacAmuteCtrl amuteCtrl;\r
61 uint8_t amuteEnable;\r
62 Audk2gDacSamplingMode samplingMode;\r
63 Audk2gDacDataFormat dataFormat;\r
64 uint8_t softMuteEnable;\r
65 Audk2gDacAttnMode attnMode;\r
66 Audk2gDacDeempCtrl deempCtrl;\r
67 uint8_t volume;\r
68 } Audk2gDacConfig;\r
69 \r
70 /**\r
71 * \brief Initializes ADC module\r
72 *\r
73 * This function initializes and configures the ADC modules\r
74 * on audio daughter card\r
75 *\r
76 * \param devId [IN] ADC Device Id\r
77 * \param config [IN] ADC configuration parameters\r
78 *\r
79 * \return Audk2g_EOK on Success or error code\r
80 */\r
81 Audk2g_STATUS audioAdcConfig(Audk2gAdcDevId devId, Audk2gAdcConfig *config);\r
82 \r
83 /**\r
84 * \brief Initializes DAC module\r
85 *\r
86 * This function initializes and configures the DAC modules\r
87 * on audio daughter card\r
88 *\r
89 * \param devId [IN] DAC Device Id\r
90 * \param config [IN] DAC configuration parameters\r
91 *\r
92 * \return Audk2g_EOK on Success or error code\r
93 */\r
94 Audk2g_STATUS audioDacConfig(Audk2gDacDevId devId, Audk2gDacConfig *config);\r
95 \r
96 #endif /* _AUDIO_DC_CFG_H_ */\r
97 \r
98 /* Nothing past this point */\r