Niranjan Yadla | cee816e | 2018-04-19 12:03:47 -0700 | [diff] [blame] | 1 | /******************************************************************************* |
| 2 | * Copyright (C) 2018 Cadence Design Systems, Inc. |
| 3 | * |
| 4 | * Permission is hereby granted, free of charge, to any person obtaining |
| 5 | * a copy of this software and associated documentation files (the |
| 6 | * "Software"), to use this Software with Cadence processor cores only and |
| 7 | * not with any other processors and platforms, subject to |
| 8 | * the following conditions: |
| 9 | * |
| 10 | * The above copyright notice and this permission notice shall be included |
| 11 | * in all copies or substantial portions of the Software. |
| 12 | * |
| 13 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
| 14 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 15 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 16 | * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
| 17 | * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 18 | * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 19 | * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 20 | |
| 21 | ******************************************************************************/ |
| 22 | |
| 23 | /* ...size of auxiliary pool for communication with HiFi */ |
| 24 | #define XAF_AUX_POOL_SIZE 32 |
| 25 | |
| 26 | /* ...length of auxiliary pool messages */ |
| 27 | #define XAF_AUX_POOL_MSG_LENGTH 128 |
| 28 | #define XAF_MAX_CONFIG_PARAMS (XAF_AUX_POOL_MSG_LENGTH >> 3) |
| 29 | |
| 30 | typedef struct xaf_comp xaf_comp_t; |
| 31 | |
| 32 | struct xaf_comp { |
| 33 | xf_handle_t handle; |
| 34 | |
| 35 | u32 inp_routed; |
| 36 | u32 out_routed; |
| 37 | u32 inp_ports; |
| 38 | u32 out_ports; |
| 39 | u32 init_done; |
| 40 | u32 pending_resp; |
| 41 | u32 expect_out_cmd; |
| 42 | u32 input_over; |
| 43 | |
| 44 | xaf_comp_type comp_type; |
| 45 | xaf_comp_status comp_status; |
| 46 | u32 start_cmd_issued; |
| 47 | u32 exec_cmd_issued; |
| 48 | void *start_buf; |
| 49 | |
| 50 | xaf_format_t inp_format; |
| 51 | xaf_format_t out_format; |
| 52 | |
| 53 | xf_pool_t *inpool; |
| 54 | xf_pool_t *outpool; |
| 55 | u32 noutbuf; |
| 56 | |
| 57 | xaf_comp_t *next; |
| 58 | |
| 59 | u32 ninbuf; |
| 60 | void *p_adev; |
| 61 | //xaf_comp_state comp_state; |
| 62 | void *comp_ptr; |
| 63 | }; |
| 64 | |
| 65 | typedef struct xaf_adev_s { |
| 66 | xf_proxy_t proxy; |
| 67 | xaf_comp_t *comp_chain; |
| 68 | |
| 69 | u32 n_comp; |
| 70 | void *adev_ptr; |
| 71 | void *p_dspMem; |
| 72 | void *p_apMem; |
| 73 | void *p_dspLocalBuff; |
| 74 | void *p_apSharedMem; |
| 75 | |
| 76 | xaf_ap_utils_t *p_ap_utils; //host-side utility structure handle |
| 77 | void *(*pxf_mem_malloc_fxn)(s32, s32); |
| 78 | void (*pxf_mem_free_fxn)(void *,s32); |
| 79 | //xaf_adev_state adev_state; |
| 80 | |
| 81 | } xaf_adev_t; |
| 82 | |