mirror of https://github.com/thesofproject/sof.git
testbench: cleanup the logging to use printf.
No point in doing a sprintf to a local buffer. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
parent
2865cc2bb2
commit
7288d52ab6
|
@ -50,14 +50,12 @@ enum sof_ipc_dai_type find_dai(const char *name)
|
||||||
void register_comp(int comp_type, struct sof_ipc_comp_ext *comp_ext)
|
void register_comp(int comp_type, struct sof_ipc_comp_ext *comp_ext)
|
||||||
{
|
{
|
||||||
int index;
|
int index;
|
||||||
char message[DEBUG_MSG_LEN + MAX_LIB_NAME_LEN];
|
|
||||||
|
|
||||||
/* register file comp driver (no shared library needed) */
|
/* register file comp driver (no shared library needed) */
|
||||||
if (comp_type == SOF_COMP_HOST || comp_type == SOF_COMP_DAI) {
|
if (comp_type == SOF_COMP_HOST || comp_type == SOF_COMP_DAI) {
|
||||||
if (!lib_table[0].register_drv) {
|
if (!lib_table[0].register_drv) {
|
||||||
sys_comp_file_init();
|
sys_comp_file_init();
|
||||||
lib_table[0].register_drv = 1;
|
lib_table[0].register_drv = 1;
|
||||||
debug_print("registered file comp driver\n");
|
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -66,20 +64,22 @@ void register_comp(int comp_type, struct sof_ipc_comp_ext *comp_ext)
|
||||||
index = get_index_by_type(comp_type, lib_table);
|
index = get_index_by_type(comp_type, lib_table);
|
||||||
if (comp_type == SOF_COMP_NONE && comp_ext) {
|
if (comp_type == SOF_COMP_NONE && comp_ext) {
|
||||||
index = get_index_by_uuid(comp_ext, lib_table);
|
index = get_index_by_uuid(comp_ext, lib_table);
|
||||||
if (index < 0)
|
if (index < 0) {
|
||||||
|
fprintf(stderr, "cant find type %d UUID starting %x %x %x %x\n",
|
||||||
|
comp_type, comp_ext->uuid[0], comp_ext->uuid[1],
|
||||||
|
comp_ext->uuid[2], comp_ext->uuid[3]);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* register comp driver if not already registered */
|
/* register comp driver if not already registered */
|
||||||
if (!lib_table[index].register_drv) {
|
if (!lib_table[index].register_drv) {
|
||||||
sprintf(message, "registered comp driver for %s\n",
|
printf("registered comp driver for %s\n",
|
||||||
lib_table[index].comp_name);
|
lib_table[index].comp_name);
|
||||||
debug_print(message);
|
|
||||||
|
|
||||||
/* open shared library object */
|
/* open shared library object */
|
||||||
sprintf(message, "opening shared lib %s\n",
|
printf("opening shared lib %s\n",
|
||||||
lib_table[index].library_name);
|
lib_table[index].library_name);
|
||||||
debug_print(message);
|
|
||||||
|
|
||||||
lib_table[index].handle = dlopen(lib_table[index].library_name,
|
lib_table[index].handle = dlopen(lib_table[index].library_name,
|
||||||
RTLD_LAZY);
|
RTLD_LAZY);
|
||||||
|
|
Loading…
Reference in New Issue