Update PAF commit Id in readme_demo.txt
[processor-sdk/performance-audio-sr.git] / procsdk_audio_x_xx_xx_xx / shared / aspMsg_common.h
1 #ifndef _ASP_MSG_COMMON_H_
2 #define _ASP_MSG_COMMON_H_
4 #include <xdc/std.h>
5 #include <ti/xdais/ialg.h>
6 #include <ti/ipc/MessageQ.h>
8 /* round up the value 'size' to the next 'align' boundary */
9 #define ROUNDUP(size, align) \
10     (UInt32)(((UInt32)(size) + ((UInt32)(align) - 1)) & ~((UInt32)(align) - 1))
12 #define MASTER_NAME                     ( "CORE0" ) // DSP is MASTER
13 #define SLAVE_NAME                      ( "HOST" )  // ARM is SLAVE
15 #define AspMsg_MasterMsgQueName         ( "MASTER:MsgQ:01" )
16 #define AspMsg_SlaveMsgQueName          ( "%s:MsgQ:01"   ) /* %s is each slave's Proc Name */
18 // ASP (Master-To-)Slave Commands
19 typedef enum ASP_Slave_Cmd {
20     ASP_SLAVE_NULL,                         // 0
21     ASP_SLAVE_START,                        // 1
22     ASP_SLAVE_EXIT,                         // 2
23     ASP_SLAVE_DEC_SOURCE_SELECT,            // 3
24     ASP_SLAVE_DEC_EXIT,                     // 4
25     ASP_SLAVE_DEC_CONTROL,                  // 5
26     ASP_SLAVE_DEC_ACTIVATE,                 // 6
27     ASP_SLAVE_DEC_RESET,                    // 7
28     ASP_SLAVE_DEC_INFO,                     // 8
29     ASP_SLAVE_DEC_DECODE,                   // 9
30     ASP_SLAVE_DEC_DEACTIVATE,               // 10
31     ASP_SLAVE_NCOMMANDS                     // 11
32 } ASP_Slave_Cmd;
34 // ASP (Slave-To-)Master Commands
35 typedef enum ASP_Master_Cmd {
36     ASP_MASTER_NULL = ASP_SLAVE_NCOMMANDS,  // 11
37     ASP_MASTER_START_DONE,                  // 12
38     ASP_MASTER_EXIT_DONE,                   // 13
39     ASP_MASTER_DEC_SOURCE_SELECT_DONE,      // 14
40     ASP_MASTER_DEC_EXIT_DONE,               // 15
41     ASP_MASTER_DEC_CONTROL_DONE,            // 16
42     ASP_MASTER_DEC_ACTIVATE_DONE,           // 17
43     ASP_MASTER_DEC_RESET_DONE,              // 18
44     ASP_MASTER_DEC_INFO_DONE,               // 19     // temp
45     ASP_MASTER_DEC_DECODE_DONE,             // 20     // temp
46     ASP_MASTER_DEC_DEACTIVATE_DONE          // 21
47 } ASP_Master_Cmd;
49 // ASP Message
50 typedef struct ASP_Msg
51 {
52     MessageQ_MsgHeader reserved;
53     
54     UInt32  cmd;        // command
55     UInt16  procId;     // processor Id of sender
56     Uint16  expectResp; // whether response expected from receiver + align buf to 32-bit boundary
57     UInt32  messageId;  // MB bit: response bit, LS 31 bits: message Id
58     Char    buf[32];    // buffer for message parameters
59 } ASP_Msg;
62 #endif /* _ASP_MSG_COMMON_H_ */