Support per file logging with LOGF_ENABLE in codecs

Codecs mostly use custom LOGF define for logging (i.e. see aac.c). Now such logging can be enabled in single file with #define LOGF_ENABLE

Change-Id: I36312fbcd2d9166fb1fe5ead31e7354342d8828d
This commit is contained in:
roman.artiukhin 2023-09-22 19:49:41 +03:00 committed by Solomon Peachy
parent 62db16c82c
commit ec2c507e60
2 changed files with 4 additions and 16 deletions

View file

@ -60,6 +60,10 @@
#ifdef ROCKBOX_HAS_LOGF #ifdef ROCKBOX_HAS_LOGF
#undef LOGF #undef LOGF
#define LOGF ci->logf #define LOGF ci->logf
#elifdef LOGF_ENABLE
#include "logf.h"
#undef LOGF
#define LOGF logf
#else #else
#define LOGF(...) #define LOGF(...)
#endif #endif

View file

@ -35,22 +35,6 @@ extern "C" {
#include "faad_config.h" #include "faad_config.h"
#include "codeclib.h" #include "codeclib.h"
extern struct codec_api* ci;
#if defined(DEBUG) || defined(SIMULATOR)
#undef DEBUGF
#define DEBUGF ci->debugf
#else
#define DEBUGF(...)
#endif
#ifdef ROCKBOX_HAS_LOGF
#undef LOGF
#define LOGF ci->logf
#else
#define LOGF(...)
#endif
#if (CONFIG_CPU == MCF5250) #if (CONFIG_CPU == MCF5250)
/* Enough IRAM but performance suffers with ICODE_ATTR. */ /* Enough IRAM but performance suffers with ICODE_ATTR. */
#define IBSS_ATTR_FAAD_LARGE_IRAM IBSS_ATTR #define IBSS_ATTR_FAAD_LARGE_IRAM IBSS_ATTR