• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include <stdio.h>
23 #include <string.h>
24 
25 #include "xaf-utils-test.h"
26 
27 int audio_frmwk_buf_size;
28 int audio_comp_buf_size;
29 
print_banner(char * app_name)30 int print_banner(char *app_name)
31 {
32     /*
33     XAF_CHK_PTR(ver_info[0], "print_verinfo");
34     XAF_CHK_PTR(ver_info[1], "print_verinfo");
35     XAF_CHK_PTR(ver_info[2], "print_verinfo");
36     */
37 
38     fprintf(stdout, "******************************************************************************\n");
39     fprintf(stdout, "Cadence Audio Framework (Hosted) : %s \n",app_name);
40     fprintf(stdout, "Copyright (c) 2018 Cadence Design Systems, Inc.\n");
41     /*fprintf(stdout, "Lib Name        : %s\n", ver_info[0]);
42     fprintf(stdout, "Lib Version     : %s\n", ver_info[1]);
43     fprintf(stdout, "API Version     : %s\n", ver_info[2]);*/
44     fprintf(stdout, "******************************************************************************\n");
45 
46     return 0;
47 }
48 
print_mem_mcps_info(mem_obj_t * mem_handle,int num_comp)49 int print_mem_mcps_info(mem_obj_t* mem_handle, int num_comp)
50 {
51     int tot_dev_mem_size, tot_comp_mem_size, tot_size;
52 
53     /* ...unused arg */
54     (void) num_comp;
55 
56     /* ...printing memory info*/
57 
58     tot_dev_mem_size = mem_get_alloc_size(mem_handle, XAF_MEM_ID_DEV);
59     tot_comp_mem_size = mem_get_alloc_size(mem_handle, XAF_MEM_ID_COMP);
60     tot_size = tot_dev_mem_size + tot_comp_mem_size;
61 
62     fprintf(stdout,"Shared Memory between AP and DSP for IPC: %8d \n", XF_CFG_REMOTE_IPC_POOL_SIZE);
63     fprintf(stdout,"Memory allocated on AP  for Device      : %8d \n", tot_dev_mem_size);
64     fprintf(stdout,"Memory allocated on AP  for Components  : %8d \n", tot_comp_mem_size);
65     fprintf(stdout,"Memory allocated on DSP for Components  : %8d \n", XF_CFG_LOCAL_POOL_SIZE);
66 
67     return 0;
68 }
69 
70