blob: b2251e42527c251f8d16cda9bbf7c9c660b857e8 [file] [log] [blame]
/******************************************************************************
*(C) Copyright 2014 Marvell International Ltd.
* All Rights Reserved
******************************************************************************/
#ifdef PXA1826_AUDIO
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include "acm_log.h"
int __acm_log_print(int prio, const char *tag, const char *fmt, ...)
{
va_list ap;
char buf[LOG_BUF_SIZE];
int write_length;
(void)prio;
write_length = snprintf(buf,LOG_BUF_SIZE,"%s: ",tag);
if ((write_length != 0) && (LOG_BUF_SIZE > write_length + 2)) {
va_start(ap, fmt);
write_length += vsnprintf(&buf[write_length], LOG_BUF_SIZE - write_length - 2, fmt, ap);
va_end(ap);
buf[write_length++] = '\n';
buf[write_length++] = '\0';
printf(buf);
}
return write_length;
}
#endif//PXA1826_AUDIO