]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/performance-audio-sr.git/blob - pasdk/test_dsp/io/test/frame_work.h
9c27f59492b9724f672abb08706b05f7ce5c9d7c
[processor-sdk/performance-audio-sr.git] / pasdk / test_dsp / io / test / frame_work.h
2 #ifndef FRAME_WORK_H
3 #define FRAME_WORK_H
5 #include "ioPhy.h"
6 #include "ioBuff.h"
7 #include "ioData.h"
9 #include "mcasp_cfg.h"
10 #include "audioStreamInpProc.h"
11 #include "audioStreamOutProc.h"
13 #define USE_IO_COMPONENTS           // define this to use I/O components: I/O BUFF and I/O PHY
14                                     // undefine for loopback test without using I/O components
16 /** Num Bufs to be issued and reclaimed */
17 #define NUM_BUFS                (8)    // Used for validation testing (not used for PASDK)
19 #define BUFALIGN                (128) /* Alignment of buffer for use of L2 cache */
21 /* Number of I/O buffers - used for validation testing (not used for PASDK). */
22 //#define NUM_INPUT_BUFS             (30*3)  // large enough to hold 3 THD frames
23 #define NUM_INPUT_BUFS             (30*4)  // large enough to hold 3 THD frames
24 #define NUM_OUTPUT_BUFS            (12)
26 /* Number of buffers constituting the nominal delay for I/O buffer management. */
27 #define NUM_DELAY_BUFS_INPUT     1
28 #define NUM_DELAY_BUFS_OUTPUT    3
30 /* Size of total I/O buffer - used for validation testing (not used for PASDK). */
31 #define INPUT_BUFF_SIZE         (1024*2)*NUM_INPUT_BUFS     // large enough to hold 3 THD frames
32 #define OUTPUT_BUFF_SIZE        (OUTPUT_FRAME_SIZE * NUM_OUTPUT_BUFS)
34 /* Operation status of I/O buffer management. */
35 enum {
36   FW_IOBUF_NORMAL = 0,
37   FW_IOBUF_UNDERFLOW,
38   FW_IOBUF_OVERFLOW
39 };
42 typedef struct fwInst_s {
43     PAF_AST_Config astCfg;
44     PAF_AST_IoInp  ioInp;
45     PAF_AST_IoOut  ioOut;
46     void *       iomem_pool_input_base;
47     size_t       iomem_pool_input_size;
48     void *       iomem_pool_output_base;
49     size_t       iomem_pool_output_size;
51     void *       hMcaspRxChan;
52     uint_fast16_t  buf_status_in;
53     uint_fast16_t  buf_status_out;
55     //uint_least16_t syncState;
56     //uint_least16_t syncStatePrev;
58 }fwInst_t;
60 #endif