summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/dsp.c17
-rw-r--r--apps/dsp.h1
-rw-r--r--apps/misc.c16
-rw-r--r--apps/misc.h8
-rw-r--r--apps/pcmbuf.c3
-rw-r--r--firmware/pcm.c3
6 files changed, 21 insertions, 27 deletions
diff --git a/apps/dsp.c b/apps/dsp.c
index e0cea6d41b..ada16b0d89 100644
--- a/apps/dsp.c
+++ b/apps/dsp.c
@@ -26,16 +26,13 @@
#include "dsp.h"
#include "eq.h"
#include "kernel.h"
-#include "playback.h"
#include "system.h"
#include "settings.h"
#include "replaygain.h"
-#include "misc.h"
#include "tdspeed.h"
#include "buffer.h"
#include "fixedpoint.h"
#include "fracmul.h"
-#include "pcmbuf.h"
/* Define LOGF_ENABLE to enable logf output in this file */
/*#define LOGF_ENABLE*/
@@ -1479,6 +1476,20 @@ intptr_t dsp_configure(struct dsp_config *dsp, int setting, intptr_t value)
return 1;
}
+int get_replaygain_mode(bool have_track_gain, bool have_album_gain)
+{
+ int type;
+
+ bool track = ((global_settings.replaygain_type == REPLAYGAIN_TRACK)
+ || ((global_settings.replaygain_type == REPLAYGAIN_SHUFFLE)
+ && global_settings.playlist_shuffle));
+
+ type = (!track && have_album_gain) ? REPLAYGAIN_ALBUM
+ : have_track_gain ? REPLAYGAIN_TRACK : -1;
+
+ return type;
+}
+
void dsp_set_replaygain(void)
{
long gain = 0;
diff --git a/apps/dsp.h b/apps/dsp.h
index ab42d73b24..f87037d368 100644
--- a/apps/dsp.h
+++ b/apps/dsp.h
@@ -65,6 +65,7 @@ int dsp_input_count(struct dsp_config *dsp, int count);
int dsp_output_count(struct dsp_config *dsp, int count);
intptr_t dsp_configure(struct dsp_config *dsp, int setting,
intptr_t value);
+int get_replaygain_mode(bool have_track_gain, bool have_album_gain);
void dsp_set_replaygain(void);
void dsp_set_crossfeed(bool enable);
void dsp_set_crossfeed_direct_gain(int gain);
diff --git a/apps/misc.c b/apps/misc.c
index 2766264de7..47ebf58080 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -682,22 +682,6 @@ int show_logo( void )
return 0;
}
-#if CONFIG_CODEC == SWCODEC
-int get_replaygain_mode(bool have_track_gain, bool have_album_gain)
-{
- int type;
-
- bool track = ((global_settings.replaygain_type == REPLAYGAIN_TRACK)
- || ((global_settings.replaygain_type == REPLAYGAIN_SHUFFLE)
- && global_settings.playlist_shuffle));
-
- type = (!track && have_album_gain) ? REPLAYGAIN_ALBUM
- : have_track_gain ? REPLAYGAIN_TRACK : -1;
-
- return type;
-}
-#endif
-
#ifdef BOOTFILE
#if !defined(USB_NONE) && !defined(USB_HANDLED_BY_OF)
/*
diff --git a/apps/misc.h b/apps/misc.h
index 35972301cc..a8ed6029a3 100644
--- a/apps/misc.h
+++ b/apps/misc.h
@@ -66,14 +66,6 @@ bool list_stop_handler(void);
void car_adapter_mode_init(void);
extern int show_logo(void);
-#if CONFIG_CODEC == SWCODEC
-/* Return current ReplayGain mode a file should have (REPLAYGAIN_TRACK or
- * REPLAYGAIN_ALBUM) if ReplayGain processing is enabled, or -1 if no
- * information present.
- */
-int get_replaygain_mode(bool have_track_gain, bool have_album_gain);
-#endif
-
int open_utf8(const char* pathname, int flags);
#ifdef BOOTFILE
diff --git a/apps/pcmbuf.c b/apps/pcmbuf.c
index 319e3e8044..5b478362b5 100644
--- a/apps/pcmbuf.c
+++ b/apps/pcmbuf.c
@@ -25,6 +25,9 @@
#include <kernel.h>
#include "pcmbuf.h"
#include "pcm.h"
+
+/* Define LOGF_ENABLE to enable logf output in this file */
+/*#define LOGF_ENABLE*/
#include "logf.h"
#ifndef SIMULATOR
#include "cpu.h"
diff --git a/firmware/pcm.c b/firmware/pcm.c
index bc7ec0282a..cddb2eaecd 100644
--- a/firmware/pcm.c
+++ b/firmware/pcm.c
@@ -21,6 +21,9 @@
#include <stdlib.h>
#include "system.h"
#include "kernel.h"
+
+/* Define LOGF_ENABLE to enable logf output in this file */
+/*#define LOGF_ENABLE*/
#include "logf.h"
#include "audio.h"
#include "sound.h"