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 mcasp_config.h\r
36 *\r
37 * \brief McASP configuration header file\r
38 *\r
39 */\r
40 \r
41 #ifndef _MCASP_CONFIG_H_\r
42 #define _MCASP_CONFIG_H_\r
43 \r
44 #include "analog_test.h"\r
45 \r
46 /*\r
47 * Buffers placed in external memory are aligned on a 128 bytes boundary.\r
48 * In addition, the buffer should be of a size multiple of 128 bytes for\r
49 * the cache work optimally on the C6x.\r
50 */\r
51 #define BUFLEN (960) /* Number of samples in the frame */\r
52 #define BUFALIGN (128) /* Alignment of buffer for use of L2 cache */\r
53 \r
54 /** Number of serializers configured for Rx */\r
55 #define RX_NUM_SERIALIZER (4u)\r
56 /** Number of serializers configured for Tx */\r
57 #define TX_NUM_SERIALIZER (1u)\r
58 \r
59 /** Size of the McASP serializer buffers */\r
60 #define BUFSIZE (BUFLEN * sizeof(Ptr))\r
61 \r
62 /** Num Bufs to be issued and reclaimed */\r
63 #define NUM_BUFS 2\r
64 \r
65 /**\r
66 * \brief Configures McASP module and creates the channel\r
67 * for audio Tx and Rx\r
68 *\r
69 * \return Audk2g_EOK on Success or error code\r
70 */\r
71 Audk2g_STATUS mcaspAudioConfig(void);\r
72 \r
73 #endif /* _MCASP_CONFIG_H_ */\r