]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/audio-preprocessing.git/blob - file_demo_bios/omapl137/files_io_7.gel
file_demo_bios: remove da830 and add omapl137
[processor-sdk/audio-preprocessing.git] / file_demo_bios / omapl137 / files_io_7.gel
1 /******************************************************************************
2  * Copyright (c) 2012-16 Texas Instruments Incorporated - http://www.ti.com
3  * 
4  *  Redistribution and use in source and binary forms, with or without 
5  *  modification, are permitted provided that the following conditions 
6  *  are met:
7  *
8  *    Redistributions of source code must retain the above copyright 
9  *    notice, this list of conditions and the following disclaimer.
10  *
11  *    Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in the 
13  *    documentation and/or other materials provided with the   
14  *    distribution.
15  *
16  *    Neither the name of Texas Instruments Incorporated  the names of
17  *    its contributors may be used to endorse or promote products derived
18  *    from this software without specific prior written permission.
19  *
20  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
21  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
22  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
24  *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
25  *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
26  *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
29  *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
30  *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  * 
32  *****************************************************************************
33  *
34  *  Filename: file_io.gel    
35  *    Description:  GEL file to load microphone files 
36  *                  EVM. This GEL has functions that handle the Main PLL 
37  *                  initialization. 
38  *                        
39  *                  More functions may be added as needed at a later date.
40  *        
41  *      Author: Ming Wei                  
42  *      Revision History: 
43  *
44  *    Rev 1.0 - 12/26/2016
45  *    -     Initial file creation
46  ---------------------------------------------------------------------------*/
48 #define MIC1PATH  "$(GEL_file_dir)/../../common/t8/y16L7g3m7090_1.pcm"
49 #define MIC2PATH  "$(GEL_file_dir)/../../common/t8/y16L7g3m7090_2.pcm"
50 #define MIC3PATH  "$(GEL_file_dir)/../../common/t8/y16L7g3m7090_3.pcm"
51 #define MIC4PATH  "$(GEL_file_dir)/../../common/t8/y16L7g3m7090_4.pcm"
52 #define MIC5PATH  "$(GEL_file_dir)/../../common/t8/y16L7g3m7090_5.pcm"
53 #define MIC6PATH  "$(GEL_file_dir)/../../common/t8/y16L7g3m7090_6.pcm"
54 #define MIC7PATH  "$(GEL_file_dir)/../../common/t8/y16L7g3m7090_7.pcm"
56 #define OUTPUTPATH  "$(GEL_file_dir)/../../common/t8/fileOutput7.bin"
58 BFLoadMic(buffer,micpath)
59 {
60     GEL_MemoryLoad(buffer,0,160,micpath,32);
61 }
63 BFSaveMic(buffer,num, micpath)
64 {
65     GEL_MemorySave(buffer,0,num,micpath,8,0,32);
66 }
68 menuitem "Microphone Load Functions";
70 dialog BFLoadOneMic(buffer "Buffer Address",micpath "Microphone File Path")
71 {
72     GEL_TextOut("Loading %s\n","",,,,micpath);
73     BFLoadMic(buffer,micpath);
74 }
76 hotmenu BFLoadMic1()
77 {
78     GEL_TextOut("Loading %s\n","",,,,MIC1PATH);
79     BFLoadMic(filBuf0,MIC1PATH);
80 }
82 hotmenu BFLoadMic2()
83 {
84     GEL_TextOut("Loading %s\n","",,,,MIC2PATH);
85     BFLoadMic(filBuf1,MIC2PATH);
86 }
88 hotmenu BFLoadMic3()
89 {
90     GEL_TextOut("Loading %s\n","",,,,MIC3PATH);
91     BFLoadMic(filBuf2,MIC3PATH);
92 }
94 hotmenu BFLoadMic4()
95 {
96     GEL_TextOut("Loading %s\n","",,,,MIC4PATH);
97     BFLoadMic(filBuf3,MIC4PATH);
98 }
100 hotmenu BFLoadMic5()
102     GEL_TextOut("Loading %s\n","",,,,MIC5PATH);
103     BFLoadMic(filBuf4,MIC5PATH);
106 hotmenu BFLoadMic6()
108     GEL_TextOut("Loading %s\n","",,,,MIC6PATH);
109     BFLoadMic(filBuf5,MIC6PATH);
112 hotmenu BFLoadMic7()
114     GEL_TextOut("Loading %s\n","",,,,MIC7PATH);
115     BFLoadMic(filBuf6,MIC7PATH);
118 hotmenu BFLoadMicAll()
120     BFLoadMic1();
121     BFLoadMic2();
122     BFLoadMic3();
123     BFLoadMic4();
124     BFLoadMic5();
125     BFLoadMic6();
126     BFLoadMic7();
127     GEL_TextOut("Done Loading Microphones\n");
130 menuitem "Microphone Save Functions";
132 hotmenu BFSaveOutput()
134     GEL_TextOut("Saving %s\n","",,,,OUTPUTPATH);
135     BFSaveMic(filOutBuf0,filConfig.outlen/2,OUTPUTPATH);