summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-08-29 21:15:27 +0000
committerJens Arnold <amiconn@rockbox.org>2005-08-29 21:15:27 +0000
commitd6c054575b4561b4c657565ecb4ff82565fa6c78 (patch)
treec05a7f619a2580a8ae3ee29e863f076d1065c398
parent99a0598c284471342fcda1fdcba90d4b666bfbb3 (diff)
downloadrockbox-d6c054575b4561b4c657565ecb4ff82565fa6c78.tar.gz
rockbox-d6c054575b4561b4c657565ecb4ff82565fa6c78.tar.bz2
rockbox-d6c054575b4561b4c657565ecb4ff82565fa6c78.zip
Renamed CONFIG_HWCODEC and MASNONE to the more appropriate CONFIG_CODEC and SWCODEC, respectively.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7416 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/SOURCES4
-rw-r--r--apps/codecs.c20
-rw-r--r--apps/codecs.h18
-rw-r--r--apps/codecs/lib/SOURCES2
-rw-r--r--apps/codecs/lib/xxx2wav.c4
-rw-r--r--apps/database.c2
-rw-r--r--apps/debug_menu.c4
-rw-r--r--apps/filetypes.c4
-rw-r--r--apps/main.c8
-rw-r--r--apps/playlist.c4
-rw-r--r--apps/plugin.c18
-rw-r--r--apps/plugin.h16
-rw-r--r--apps/plugins/SOURCES2
-rw-r--r--apps/plugins/oscillograph.c2
-rw-r--r--apps/plugins/oscilloscope.c2
-rw-r--r--apps/plugins/rockboy/rbsound.c2
-rw-r--r--apps/plugins/splitedit.c10
-rw-r--r--apps/plugins/vu_meter.c2
-rw-r--r--apps/recorder/peakmeter.c8
-rw-r--r--apps/recorder/radio.c18
-rw-r--r--apps/screens.c4
-rw-r--r--apps/settings.c26
-rw-r--r--apps/settings.h4
-rw-r--r--apps/settings_menu.c16
-rw-r--r--apps/sound_menu.c10
-rw-r--r--apps/status.c2
-rw-r--r--apps/talk.c24
-rw-r--r--apps/tree.c2
-rw-r--r--firmware/SOURCES8
-rw-r--r--firmware/drivers/mas.c10
-rw-r--r--firmware/export/config-fmrecorder.h2
-rw-r--r--firmware/export/config-gmini120.h2
-rw-r--r--firmware/export/config-gminisp.h2
-rw-r--r--firmware/export/config-h100.h2
-rw-r--r--firmware/export/config-h120.h2
-rw-r--r--firmware/export/config-h300.h2
-rw-r--r--firmware/export/config-iaudiox5.h2
-rw-r--r--firmware/export/config-ondiofm.h2
-rw-r--r--firmware/export/config-ondiosp.h2
-rw-r--r--firmware/export/config-player.h2
-rw-r--r--firmware/export/config-recorder.h2
-rw-r--r--firmware/export/config-recorderv2.h2
-rw-r--r--firmware/export/config.h4
-rw-r--r--firmware/export/id3.h6
-rw-r--r--firmware/export/mas.h12
-rw-r--r--firmware/export/mp3_playback.h2
-rw-r--r--firmware/export/mpeg.h2
-rw-r--r--firmware/export/sound.h2
-rw-r--r--firmware/id3.c12
-rw-r--r--firmware/mp3_playback.c58
-rw-r--r--firmware/mp3data.c2
-rw-r--r--firmware/mpeg.c58
-rw-r--r--firmware/sound.c50
-rw-r--r--firmware/tuner_samsung.c2
-rw-r--r--uisimulator/common/stubs.c4
-rw-r--r--uisimulator/x11/SOURCES2
56 files changed, 248 insertions, 248 deletions
diff --git a/apps/SOURCES b/apps/SOURCES
index 3c933d22b6..063abe34d7 100644
--- a/apps/SOURCES
+++ b/apps/SOURCES
@@ -23,7 +23,7 @@ settings_menu.c
sleeptimer.c
sound_menu.c
status.c
-#if !defined(SIMULATOR) || CONFIG_HWCODEC == MASNONE
+#if !defined(SIMULATOR) || CONFIG_CODEC == SWCODEC
talk.c
#endif
tree.c
@@ -49,7 +49,7 @@ recorder/radio.c
#ifdef HAVE_RECORDING
recorder/recording.c
#endif
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
pcmbuf.c
playback.c
metadata.c
diff --git a/apps/codecs.c b/apps/codecs.c
index 0093da67c5..f7f271da96 100644
--- a/apps/codecs.c
+++ b/apps/codecs.c
@@ -48,12 +48,12 @@
#include "system.h"
#include "sound.h"
#include "database.h"
-#if (CONFIG_HWCODEC == MASNONE)
+#if (CONFIG_CODEC == SWCODEC)
#include "pcm_playback.h"
#endif
#ifdef SIMULATOR
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
unsigned char codecbuf[CODEC_SIZE];
#endif
void *sim_codec_load_ram(char* codecptr, int size,
@@ -161,10 +161,10 @@ struct codec_api ci = {
mp3_play_pause,
mp3_play_stop,
mp3_is_playing,
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
bitswap,
#endif
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
pcm_play_data,
pcm_play_stop,
pcm_set_frequency,
@@ -188,24 +188,24 @@ struct codec_api ci = {
audio_current_track,
audio_flush_and_reload_tracks,
audio_get_file_pos,
-#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE)
+#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
mpeg_get_last_header,
#endif
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
sound_set_pitch,
#endif
-#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE)
+#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
/* MAS communication */
mas_readmem,
mas_writemem,
mas_readreg,
mas_writereg,
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
mas_codec_writereg,
mas_codec_readreg,
#endif
-#endif /* !simulator and HWCODEC != MASNONE */
+#endif /* !simulator and HWCODEC != SWCODEC */
/* tag database */
&tagdbheader,
@@ -232,7 +232,7 @@ struct codec_api ci = {
find_next_frame,
battery_level,
battery_level_safe,
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
peak_meter_scale_value,
peak_meter_set_use_dbfs,
peak_meter_get_use_dbfs,
diff --git a/apps/codecs.h b/apps/codecs.h
index 47cd5711ae..fe309554db 100644
--- a/apps/codecs.h
+++ b/apps/codecs.h
@@ -43,7 +43,7 @@
#include "mpeg.h"
#include "audio.h"
#include "mp3_playback.h"
-#if (HWCODEC == MASNONE)
+#if (HWCODEC == SWCODEC)
#include "pcm_playback.h"
#endif
#include "settings.h"
@@ -234,10 +234,10 @@ struct codec_api {
void (*mp3_play_pause)(bool play);
void (*mp3_play_stop)(void);
bool (*mp3_is_playing)(void);
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
void (*bitswap)(unsigned char *data, int length);
#endif
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
void (*pcm_play_data)(void (*get_more)(unsigned char** start, long*size));
void (*pcm_play_stop)(void);
void (*pcm_set_frequency)(unsigned int frequency);
@@ -261,20 +261,20 @@ struct codec_api {
struct mp3entry* (*audio_current_track)(void);
void (*audio_flush_and_reload_tracks)(void);
int (*audio_get_file_pos)(void);
-#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE)
+#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
unsigned long (*mpeg_get_last_header)(void);
#endif
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
void (*sound_set_pitch)(int pitch);
#endif
/* MAS communication */
-#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE)
+#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
int (*mas_readmem)(int bank, int addr, unsigned long* dest, int len);
int (*mas_writemem)(int bank, int addr, const unsigned long* src, int len);
int (*mas_readreg)(int reg);
int (*mas_writereg)(int reg, unsigned int val);
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
int (*mas_codec_writereg)(int reg, unsigned int val);
int (*mas_codec_readreg)(int reg);
#endif
@@ -311,7 +311,7 @@ struct codec_api {
long max_offset, unsigned long last_header);
int (*battery_level)(void);
bool (*battery_level_safe)(void);
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
unsigned short (*peak_meter_scale_value)(unsigned short val,
int meterwidth);
void (*peak_meter_set_use_dbfs)(bool use);
@@ -332,7 +332,7 @@ struct codec_api {
};
/* defined by the codec loader (codec.c) */
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
int codec_load_ram(char* codecptr, int size, void* ptr2, int bufwrap,
struct codec_api *api);
int codec_load_file(const char* codec, struct codec_api *api);
diff --git a/apps/codecs/lib/SOURCES b/apps/codecs/lib/SOURCES
index 352fedbff9..b0e50172a3 100644
--- a/apps/codecs/lib/SOURCES
+++ b/apps/codecs/lib/SOURCES
@@ -1,4 +1,4 @@
-#if CONFIG_HWCODEC == MASNONE /* software codec platforms */
+#if CONFIG_CODEC == SWCODEC /* software codec platforms */
codeclib.c
xxx2wav.c
#endif
diff --git a/apps/codecs/lib/xxx2wav.c b/apps/codecs/lib/xxx2wav.c
index 66cc8b3bbb..cd09d32450 100644
--- a/apps/codecs/lib/xxx2wav.c
+++ b/apps/codecs/lib/xxx2wav.c
@@ -19,7 +19,7 @@
/* Various "helper functions" common to all the xxx2wav decoder plugins */
-#if (CONFIG_HWCODEC == MASNONE)
+#if (CONFIG_CODEC == SWCODEC)
/* software codec platforms, not for simulator */
#include "codecs.h"
@@ -138,4 +138,4 @@ void qsort(void *base, size_t nmemb, size_t size,
local_rb->qsort(base,nmemb,size,compar);
}
-#endif /* CONFIG_HWCODEC == MASNONE */
+#endif /* CONFIG_CODEC == SWCODEC */
diff --git a/apps/database.c b/apps/database.c
index 90cdc37f2c..a84baa2a5c 100644
--- a/apps/database.c
+++ b/apps/database.c
@@ -44,7 +44,7 @@
#include "database.h"
#include "autoconf.h"
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
#include "playback.h"
#else
#include "mpeg.h"
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index b4cd05699c..329ba7d7ab 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -61,7 +61,7 @@
#if defined(IRIVER_H100_SERIES) && !defined(SIMULATOR)
extern bool pcm_rec_screen(void);
#endif
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
#include "pcmbuf.h"
#include "pcm_playback.h"
#endif
@@ -154,7 +154,7 @@ bool dbg_os(void)
#endif
#ifdef HAVE_LCD_BITMAP
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
bool dbg_audio_thread(void)
{
char buf[32];
diff --git a/apps/filetypes.c b/apps/filetypes.c
index 31852b1aba..ace89154fc 100644
--- a/apps/filetypes.c
+++ b/apps/filetypes.c
@@ -40,14 +40,14 @@
#define MAX_PLUGIN_LENGTH 32
/* max filetypes (plugins & icons stored here) */
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
#define MAX_FILETYPES 64
#else
#define MAX_FILETYPES 32
#endif
/* max exttypes (extensions stored here) */
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
/* Software codecs require more file extensions */
#define MAX_EXTTYPES 64
#else
diff --git a/apps/main.c b/apps/main.c
index 55897de5f5..6373920c74 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -61,7 +61,7 @@
#include "misc.h"
#include "database.h"
-#if (CONFIG_HWCODEC == MASNONE)
+#if (CONFIG_CODEC == SWCODEC)
#include "pcmbuf.h"
#else
#define pcmbuf_init()
@@ -129,7 +129,7 @@ void init(void)
global_settings.mdb_enable,
global_settings.superbass);
button_clear_queue(); /* Empty the keyboard buffer */
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
talk_init();
#endif
}
@@ -264,7 +264,7 @@ void init(void)
/* On software codec platforms we have to init audio before
calling audio_set_buffer_margin(). */
-#if (CONFIG_HWCODEC == MASNONE)
+#if (CONFIG_CODEC == SWCODEC)
audio_init();
#endif
settings_calc_config_sector();
@@ -291,7 +291,7 @@ void init(void)
global_settings.mdb_shape,
global_settings.mdb_enable,
global_settings.superbass);
-#if (CONFIG_HWCODEC == MASNONE)
+#if (CONFIG_CODEC == SWCODEC)
sound_settings_apply();
#else
audio_init();
diff --git a/apps/playlist.c b/apps/playlist.c
index bc2bd05905..70df8113e0 100644
--- a/apps/playlist.c
+++ b/apps/playlist.c
@@ -1417,7 +1417,7 @@ int playlist_resume(void)
};
/* use mp3 buffer for maximum load speed */
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
talk_buffer_steal(); /* we use the mp3 buffer, need to tell */
buflen = (audiobufend - audiobuf);
buffer = audiobuf;
@@ -1836,7 +1836,7 @@ int playlist_start(int start_index, int offset)
struct playlist_info* playlist = &current_playlist;
playlist->index = start_index;
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
talk_buffer_steal(); /* will use the mp3 buffer */
#endif
audio_play(offset);
diff --git a/apps/plugin.c b/apps/plugin.c
index 6c018067ea..c02a8e2936 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -48,7 +48,7 @@
#include "timer.h"
#include "sound.h"
#include "database.h"
-#if (CONFIG_HWCODEC == MASNONE)
+#if (CONFIG_CODEC == SWCODEC)
#include "pcm_playback.h"
#endif
@@ -249,10 +249,10 @@ static const struct plugin_api rockbox_api = {
mp3_play_pause,
mp3_play_stop,
mp3_is_playing,
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
bitswap,
#endif
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
pcm_play_data,
pcm_play_stop,
pcm_set_frequency,
@@ -276,24 +276,24 @@ static const struct plugin_api rockbox_api = {
audio_current_track,
audio_flush_and_reload_tracks,
audio_get_file_pos,
-#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE)
+#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
mpeg_get_last_header,
#endif
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
sound_set_pitch,
#endif
-#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE)
+#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
/* MAS communication */
mas_readmem,
mas_writemem,
mas_readreg,
mas_writereg,
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
mas_codec_writereg,
mas_codec_readreg,
#endif
-#endif /* !simulator and HWCODEC != MASNONE */
+#endif /* !SIMULATOR && CONFIG_CODEC != SWCODEC */
/* tag database */
&tagdbheader,
@@ -328,7 +328,7 @@ static const struct plugin_api rockbox_api = {
find_next_frame,
battery_level,
battery_level_safe,
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
peak_meter_scale_value,
peak_meter_set_use_dbfs,
peak_meter_get_use_dbfs,
diff --git a/apps/plugin.h b/apps/plugin.h
index 8760162405..839e87af64 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -44,7 +44,7 @@
#include "mpeg.h"
#include "audio.h"
#include "mp3_playback.h"
-#if (HWCODEC == MASNONE)
+#if (HWCODEC == SWCODEC)
#include "pcm_playback.h"
#endif
#include "settings.h"
@@ -325,10 +325,10 @@ struct plugin_api {
void (*mp3_play_pause)(bool play);
void (*mp3_play_stop)(void);
bool (*mp3_is_playing)(void);
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
void (*bitswap)(unsigned char *data, int length);
#endif
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
void (*pcm_play_data)(void (*get_more)(unsigned char** start, long*size));
void (*pcm_play_stop)(void);
void (*pcm_set_frequency)(unsigned int frequency);
@@ -352,20 +352,20 @@ struct plugin_api {
struct mp3entry* (*audio_current_track)(void);
void (*audio_flush_and_reload_tracks)(void);
int (*audio_get_file_pos)(void);
-#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE)
+#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
unsigned long (*mpeg_get_last_header)(void);
#endif
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
void (*sound_set_pitch)(int pitch);
#endif
/* MAS communication */
-#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE)
+#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
int (*mas_readmem)(int bank, int addr, unsigned long* dest, int len);
int (*mas_writemem)(int bank, int addr, const unsigned long* src, int len);
int (*mas_readreg)(int reg);
int (*mas_writereg)(int reg, unsigned int val);
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
int (*mas_codec_writereg)(int reg, unsigned int val);
int (*mas_codec_readreg)(int reg);
#endif
@@ -410,7 +410,7 @@ struct plugin_api {
long max_offset, unsigned long last_header);
int (*battery_level)(void);
bool (*battery_level_safe)(void);
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
unsigned short (*peak_meter_scale_value)(unsigned short val,
int meterwidth);
void (*peak_meter_set_use_dbfs)(bool use);
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index 1b98967ac1..cf62ee7203 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -66,7 +66,7 @@ nim.c
alpine_cdc.c
#endif
-#if CONFIG_HWCODEC == MASNONE /* software codec platforms */
+#if CONFIG_CODEC == SWCODEC /* software codec platforms */
iriverify.c
wav2wv.c
midi2wav.c
diff --git a/apps/plugins/oscillograph.c b/apps/plugins/oscillograph.c
index 1512e11389..069ef44247 100644
--- a/apps/plugins/oscillograph.c
+++ b/apps/plugins/oscillograph.c
@@ -20,7 +20,7 @@
#ifdef HAVE_LCD_BITMAP
#ifndef SIMULATOR /* don't want this code in the simulator */
-#if CONFIG_HWCODEC != MASNONE /* only for MAS-targets */
+#if CONFIG_CODEC != SWCODEC /* only for MAS-targets */
/* The different drawing modes */
#define DRAW_MODE_FILLED 0
diff --git a/apps/plugins/oscilloscope.c b/apps/plugins/oscilloscope.c
index f5e5189e2e..b3b081d861 100644
--- a/apps/plugins/oscilloscope.c
+++ b/apps/plugins/oscilloscope.c
@@ -23,7 +23,7 @@
#include "plugin.h"
#ifdef HAVE_LCD_BITMAP /* and also not for the Player */
-#if CONFIG_HWCODEC != MASNONE /* only for MAS-targets */
+#if CONFIG_CODEC != SWCODEC /* only for MAS-targets */
/* The different drawing modes */
#define DRAW_MODE_FILLED 0
diff --git a/apps/plugins/rockboy/rbsound.c b/apps/plugins/rockboy/rbsound.c
index 529cf6e733..139c33d037 100644
--- a/apps/plugins/rockboy/rbsound.c
+++ b/apps/plugins/rockboy/rbsound.c
@@ -15,7 +15,7 @@ rcvar_t pcm_exports[] =
RCV_END
};
-/*#if CONFIG_HWCODEC == MASNONE && !defined(SIMULATOR)
+/*#if CONFIG_CODEC == SWCODEC && !defined(SIMULATOR)
* disabled cause it crashes with current audio implementation.. no sound.
*/
#if 0
diff --git a/apps/plugins/splitedit.c b/apps/plugins/splitedit.c
index 9317419c23..35562f99fc 100644
--- a/apps/plugins/splitedit.c
+++ b/apps/plugins/splitedit.c
@@ -269,7 +269,7 @@ static void update_icons(void)
LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT,
BMPWIDTH, BMPHEIGHT);
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
/* The scale icon */
rb->lcd_mono_bitmap(SCALE_BMP[rb->peak_meter_get_use_dbfs() ? 1 : 0],
2 *LCD_WIDTH/3 + LCD_WIDTH/3 / 2 - BMPWIDTH/2, LCD_HEIGHT - BMPHEIGHT,
@@ -909,7 +909,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
{
/* read volume info */
unsigned short volume;
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
volume = rb->mas_codec_readreg(0x0c);
volume += rb->mas_codec_readreg(0x0d);
volume = volume / 2;
@@ -1074,7 +1074,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
lastx = time_to_xpos(mp3->elapsed);
break;
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
#ifdef SPLITEDIT_SPEED100
case SPLITEDIT_SPEED150:
rb->sound_set_pitch(1500);
@@ -1133,7 +1133,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
break;
case SPLITEDIT_SCALE:
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
rb->peak_meter_set_use_dbfs(!rb->peak_meter_get_use_dbfs());
#endif
splitedit_invalidate_osci();
@@ -1202,7 +1202,7 @@ unsigned long splitedit_editor(struct mp3entry * mp3_to_split,
}
}
}
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
#ifdef SPLITEDIT_SPEED100
rb->sound_set_pitch(1000); /* make sure to reset pitch */
#endif
diff --git a/apps/plugins/vu_meter.c b/apps/plugins/vu_meter.c
index c2db45ed88..80621d2fd3 100644
--- a/apps/plugins/vu_meter.c
+++ b/apps/plugins/vu_meter.c
@@ -17,7 +17,7 @@
**************************************************************************/
#include "plugin.h"
-#if defined(HAVE_LCD_BITMAP) && (CONFIG_HWCODEC != MASNONE)
+#if defined(HAVE_LCD_BITMAP) && (CONFIG_CODEC != SWCODEC)
/* variable button definitions */
#if CONFIG_KEYPAD == RECORDER_PAD
diff --git a/apps/recorder/peakmeter.c b/apps/recorder/peakmeter.c
index 088cf8e099..2e4cea0704 100644
--- a/apps/recorder/peakmeter.c
+++ b/apps/recorder/peakmeter.c
@@ -33,11 +33,11 @@
#include "lang.h"
#include "peakmeter.h"
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
#include "pcm_playback.h"
#endif
-#if !defined(SIMULATOR) && CONFIG_HWCODEC != MASNONE
+#if !defined(SIMULATOR) && CONFIG_CODEC != SWCODEC
/* Data source */
static int pm_src_left = MAS_REG_DQPEAK_L;
static int pm_src_right = MAS_REG_DQPEAK_R;
@@ -490,7 +490,7 @@ void peak_meter_playback(bool playback)
{
#ifdef SIMULATOR
(void)playback;
-#elif CONFIG_HWCODEC == MASNONE
+#elif CONFIG_CODEC == SWCODEC
/* FIX: not for the sw-based ones yes */
(void)playback;
#else
@@ -530,7 +530,7 @@ void peak_meter_peek(void)
#ifdef SIMULATOR
pm_cur_left = left = 8000;
pm_cur_right = right = 9000;
-#elif CONFIG_HWCODEC == MASNONE
+#elif CONFIG_CODEC == SWCODEC
pcm_calculate_peaks(&pm_cur_left, &pm_cur_right);
left = pm_cur_left;
right = pm_cur_right;
diff --git a/apps/recorder/radio.c b/apps/recorder/radio.c
index a0280ecf1f..68d36dddd3 100644
--- a/apps/recorder/radio.c
+++ b/apps/recorder/radio.c
@@ -55,7 +55,7 @@
#ifdef CONFIG_TUNER
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
#include "uda1380.h"
#include "pcm_record.h"
#endif
@@ -213,14 +213,14 @@ bool radio_screen(void)
radio_load_presets();
#ifndef SIMULATOR
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
if(rec_create_directory() > 0)
have_recorded = true;
#endif
audio_stop();
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
mpeg_init_recording();
sound_settings_apply();
@@ -497,7 +497,7 @@ bool radio_screen(void)
}
#ifndef SIMULATOR
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
seconds = mpeg_recorded_time() / HZ;
#endif
#endif
@@ -580,7 +580,7 @@ bool radio_screen(void)
}
}
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
audio_init_playback();
#endif
@@ -588,7 +588,7 @@ bool radio_screen(void)
if(keep_playing)
{
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
/* Enable the Left and right A/D Converter */
mpeg_set_recording_gain(sound_default(SOUND_LEFT_GAIN),
sound_default(SOUND_RIGHT_GAIN), false);
@@ -599,7 +599,7 @@ bool radio_screen(void)
else
{
radio_stop();
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
pcmrec_set_mux(0); /* Line In */
#endif
}
@@ -880,7 +880,7 @@ bool handle_radio_presets(void)
}
#ifndef SIMULATOR
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
static bool fm_recording_settings(void)
{
bool ret;
@@ -959,7 +959,7 @@ bool radio_menu(void)
#endif
{ monomode_menu_string , toggle_mono_mode },
{ ID2P(LANG_SOUND_SETTINGS) , sound_menu },
-#if !defined(SIMULATOR) && (CONFIG_HWCODEC != MASNONE)
+#if !defined(SIMULATOR) && (CONFIG_CODEC != SWCODEC)
{ ID2P(LANG_RECORDING_SETTINGS) , fm_recording_settings},
#endif
};
diff --git a/apps/screens.c b/apps/screens.c
index 5f949efda8..10e1cdd188 100644
--- a/apps/screens.c
+++ b/apps/screens.c
@@ -1307,7 +1307,7 @@ int draw_id3_item(int line, int top, int header, const char* body)
return line + 2;
}
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
#define ID3_ITEMS 13
#else
#define ID3_ITEMS 11
@@ -1401,7 +1401,7 @@ bool browse_id3(void)
snprintf(buf, sizeof(buf), "%d Hz", id3->frequency);
line = draw_id3_item(line, top, LANG_ID3_FRECUENCY, buf);
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
line = draw_id3_item(line, top, LANG_ID3_TRACK_GAIN,
id3->track_gain_string);
diff --git a/apps/settings.c b/apps/settings.c
index 6fd2ec64bf..6649ce3f89 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -66,14 +66,14 @@
#include "version.h"
#include "rtc.h"
#include "sound.h"
-#if CONFIG_HWCODEC == MAS3507D
+#if CONFIG_CODEC == MAS3507D
void dac_line_in(bool enable);
#endif
struct user_settings global_settings;
#ifdef HAVE_RECORDING
const char rec_base_directory[] = REC_BASE_DIR;
#endif
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
#include "pcmbuf.h"
#include "pcm_playback.h"
#endif
@@ -183,14 +183,14 @@ static const struct bit_entry rtc_bits[] =
/* sound */
{7, S_O(volume), 70, "volume", NULL }, /* 0...100 */
{8 | SIGNED, S_O(balance), 0, "balance", NULL }, /* -100...100 */
-#if CONFIG_HWCODEC != MASNONE /* any MAS */
+#if CONFIG_CODEC != SWCODEC /* any MAS */
{5 | SIGNED, S_O(bass), 0, "bass", NULL }, /* -15..+15 / -12..+12 */
{5 | SIGNED, S_O(treble), 0, "treble", NULL }, /* -15..+15 / -12..+12 */
#elif defined HAVE_UDA1380
{5, S_O(bass), 0, "bass", NULL }, /* 0..+24 */
{3, S_O(treble), 0, "treble", NULL }, /* 0..+6 */
#endif
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
{5, S_O(loudness), 0, "loudness", NULL }, /* 0...17 */
{3, S_O(avc), 0, "auto volume", "off,20ms,2,4,8" },
{1, S_O(superbass), false, "superbass", off_on },
@@ -312,7 +312,7 @@ static const struct bit_entry hd_bits[] =
{4, S_O(ff_rewind_min_step), FF_REWIND_1000,
"scan min step", "1,2,3,4,5,6,8,10,15,20,25,30,45,60" },
{4, S_O(ff_rewind_accel), 3, "scan accel", NULL },
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
{3, S_O(buffer_margin), 0, "antiskip",
"5s,15s,30s,1min,2min,3min,5min,10min" },
#else
@@ -356,7 +356,7 @@ static const struct bit_entry hd_bits[] =
{7, S_O(peak_meter_min), 60, "peak meter min", NULL }, /* 0...100 */
{7, S_O(peak_meter_max), 0, "peak meter max", NULL }, /* 0...100 */
#endif
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
/* recording */
{1, S_O(rec_editable), false, "editable recordings", off_on },
{4, S_O(rec_timesplit), 0, "rec timesplit", /* 0...15 */
@@ -376,14 +376,14 @@ static const struct bit_entry hd_bits[] =
{1, S_O(rec_directory), 0, /* rec_base_directory */
"rec directory", REC_BASE_DIR ",current" },
#endif
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
{7, S_O(mdb_strength), 0, "mdb strength", NULL},
{7, S_O(mdb_harmonics), 0, "mdb harmonics", NULL},
{9, S_O(mdb_center), 0, "mdb center", NULL},
{9, S_O(mdb_shape), 0, "mdb shape", NULL},
{1, S_O(mdb_enable), 0, "mdb enable", off_on},
#endif
-#if CONFIG_HWCODEC == MAS3507D
+#if CONFIG_CODEC == MAS3507D
{1, S_O(line_in), false, "line in", off_on },
#endif
/* voice */
@@ -407,7 +407,7 @@ static const struct bit_entry hd_bits[] =
{4, S_O(rec_trigger_mode ), 1, "trigger mode", "off,no rearm,rearm"},
#endif
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
{3, S_O(crossfade_duration), 0, "crossfade duration", "1s,2s,4s,6s,8s,10s,12s,14s"},
#endif
@@ -425,7 +425,7 @@ static const struct bit_entry hd_bits[] =
{1, S_O(next_folder), false, "move to next folder", off_on },
{1, S_O(runtimedb), false, "gather runtime data", off_on },
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
{2, S_O(crossfade), 0, "crossfade type", "off,crossfade,mix"},
{1, S_O(replaygain), false, "replaygain", off_on },
{1, S_O(replaygain_track), false, "replaygain type", "track,album" },
@@ -776,7 +776,7 @@ void sound_settings_apply(void)
sound_set(SOUND_VOLUME, global_settings.volume);
sound_set(SOUND_CHANNELS, global_settings.channel_config);
sound_set(SOUND_STEREO_WIDTH, global_settings.stereo_width);
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
sound_set(SOUND_LOUDNESS, global_settings.loudness);
sound_set(SOUND_AVC, global_settings.avc);
sound_set(SOUND_MDB_STRENGTH, global_settings.mdb_strength);
@@ -811,7 +811,7 @@ void settings_apply(void)
backlight_set_fade_out(global_settings.backlight_fade_out);
#endif
ata_spindown(global_settings.disk_spindown);
-#if CONFIG_HWCODEC == MAS3507D
+#if CONFIG_CODEC == MAS3507D
dac_line_in(global_settings.line_in);
#endif
#ifdef HAVE_ATA_POWER_OFF
@@ -872,7 +872,7 @@ void settings_apply(void)
talk_init(); /* use voice of same language */
}
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
audio_set_crossfade(global_settings.crossfade);
#endif
diff --git a/apps/settings.h b/apps/settings.h
index c59fe47532..8387fe02a8 100644
--- a/apps/settings.h
+++ b/apps/settings.h
@@ -154,7 +154,7 @@ struct user_settings
bool mdb_enable; /* true/false */
bool superbass; /* true/false */
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
int crossfade;
int crossfade_duration;
#endif
@@ -330,7 +330,7 @@ struct user_settings
bool next_folder; /* move to next folder */
bool runtimedb; /* runtime database active? */
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
bool replaygain; /* enable replaygain */
bool replaygain_track; /* true for track gain, false for album gain */
bool replaygain_noclip; /* scale to prevent clips */
diff --git a/apps/settings_menu.c b/apps/settings_menu.c
index bbbeca3683..a614723ca5 100644
--- a/apps/settings_menu.c
+++ b/apps/settings_menu.c
@@ -54,7 +54,7 @@
#include "peakmeter.h"
#endif
#include "lang.h"
-#if CONFIG_HWCODEC == MAS3507D
+#if CONFIG_CODEC == MAS3507D
void dac_line_in(bool enable);
#endif
#ifdef HAVE_ALARM_MOD
@@ -65,7 +65,7 @@ void dac_line_in(bool enable);
#include "lcd-remote.h"
#endif
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
#include "pcmbuf.h"
#include "pcm_playback.h"
#include "dsp.h"
@@ -879,7 +879,7 @@ static bool poweroff(void)
#endif /* HAVE_ATA_POWEROFF */
#endif /* !HAVE_MMC */
-#if CONFIG_HWCODEC == MAS3507D
+#if CONFIG_CODEC == MAS3507D
static bool line_in(void)
{
bool rc = set_bool(str(LANG_LINE_IN), &global_settings.line_in);
@@ -902,7 +902,7 @@ static bool max_files_in_playlist(void)
NULL, 1000, 1000, 20000, NULL );
}
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
static bool buffer_margin(void)
{
int ret;
@@ -1111,7 +1111,7 @@ static bool id3_order(void)
mpeg_id3_options);
}
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
static bool crossfade(void)
{
static const struct opt_items names[] = {
@@ -1172,7 +1172,7 @@ static bool runtimedb(void)
return rc;
}
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
static bool replaygain(void)
{
bool result = set_bool(str(LANG_REPLAYGAIN_ENABLE),
@@ -1270,7 +1270,7 @@ static bool playback_settings_menu(void)
{ ID2P(LANG_WIND_MENU), ff_rewind_settings_menu },
{ ID2P(LANG_MP3BUFFER_MARGIN), buffer_margin },
{ ID2P(LANG_FADE_ON_STOP), set_fade_on_stop },
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
{ ID2P(LANG_CROSSFADE), crossfade },
{ ID2P(LANG_CROSSFADE_DURATION), crossfade_duration },
{ ID2P(LANG_REPLAYGAIN), replaygain_settings_menu },
@@ -1654,7 +1654,7 @@ static bool system_settings_menu(void)
{ ID2P(LANG_ALARM_MOD_ALARM_MENU), alarm_screen },
#endif
{ ID2P(LANG_LIMITS_MENU), limits_settings_menu },
-#if CONFIG_HWCODEC == MAS3507D
+#if CONFIG_CODEC == MAS3507D
{ ID2P(LANG_LINE_IN), line_in },
#endif
#ifdef HAVE_CHARGING
diff --git a/apps/sound_menu.c b/apps/sound_menu.c
index 0c298b091f..0fcf79492c 100644
--- a/apps/sound_menu.c
+++ b/apps/sound_menu.c
@@ -38,7 +38,7 @@
#include "talk.h"
#include "misc.h"
#include "sound.h"
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
#include "peakmeter.h"
#include "mas.h"
#endif
@@ -171,7 +171,7 @@ static bool treble(void)
return set_sound(str(LANG_TREBLE), &global_settings.treble, SOUND_TREBLE);
}
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
static bool loudness(void)
{
return set_sound(str(LANG_LOUDNESS), &global_settings.loudness,
@@ -421,7 +421,7 @@ bool sound_menu(void)
{ ID2P(LANG_BALANCE), balance },
{ ID2P(LANG_CHANNEL_MENU), chanconf },
{ ID2P(LANG_STEREO_WIDTH), stereo_width },
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
{ ID2P(LANG_LOUDNESS), loudness },
{ ID2P(LANG_AUTOVOL), avc },
{ ID2P(LANG_SUPERBASS), superbass },
@@ -454,7 +454,7 @@ enum trigger_menu_option
TRIG_OPTION_COUNT,
};
-#if !defined(SIMULATOR) && CONFIG_HWCODEC == MAS3587F
+#if !defined(SIMULATOR) && CONFIG_CODEC == MAS3587F
static char* create_thres_str(int threshold)
{
static char retval[6];
@@ -846,7 +846,7 @@ bool recording_menu(bool no_source)
items[i++].function = recdirectory;
items[i].desc = ID2P(LANG_RECORD_STARTUP);
items[i++].function = reconstartup;
-#if !defined(SIMULATOR) && CONFIG_HWCODEC == MAS3587F
+#if !defined(SIMULATOR) && CONFIG_CODEC == MAS3587F
items[i].desc = str(LANG_RECORD_TRIGGER);
items[i++].function = rectrigger;
#endif
diff --git a/apps/status.c b/apps/status.c
index b980c4d3eb..ca4b21833e 100644
--- a/apps/status.c
+++ b/apps/status.c
@@ -106,7 +106,7 @@ int current_playmode(void)
else
return STATUS_PLAY;
}
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
else
{
if(audio_stat & AUDIO_STATUS_RECORD)
diff --git a/apps/talk.c b/apps/talk.c
index 3e6bdb934a..0904ecd2c3 100644
--- a/apps/talk.c
+++ b/apps/talk.c
@@ -34,7 +34,7 @@
#include "id3.h"
#include "logf.h"
#include "bitswap.h"
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
#include "playback.h"
#endif
@@ -148,7 +148,7 @@ static void load_voicefile(void)
int load_size;
int got_size;
int file_size;
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
int length, i;
unsigned char *buf, temp;
#endif
@@ -205,7 +205,7 @@ static void load_voicefile(void)
#endif
/* Do a bitswap as necessary. */
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
logf("Bitswapping voice file.");
cpu_boost(true);
buf = (unsigned char *)(&p_voicefile->index) +
@@ -261,7 +261,7 @@ static void mp3_callback(unsigned char** start, int* size)
if (queue[queue_read].len > 0) /* current clip not finished? */
{ /* feed the next 64K-1 chunk */
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
sent = MIN(queue[queue_read].len, 0xFFFF);
#else
sent = queue[queue_read].len;
@@ -279,7 +279,7 @@ re_check:
if (QUEUE_LEVEL) /* queue is not empty? */
{ /* start next clip */
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
sent = MIN(queue[queue_read].len, 0xFFFF);
#else
sent = queue[queue_read].len;
@@ -393,7 +393,7 @@ static int queue_clip(unsigned char* buf, long size, bool enqueue)
if (queue_level == 0)
{ /* queue was empty, we have to do the initial start */
p_lastclip = buf;
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
sent = MIN(size, 0xFFFF); /* DMA can do no more */
#else
sent = size;
@@ -485,7 +485,7 @@ void talk_init(void)
if (has_voicefile)
{
voicefile_size = filesize(filehandle);
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
voice_init();
#endif
close(filehandle); /* close again, this was just to detect presence */
@@ -519,7 +519,7 @@ int talk_id(long id, bool enqueue)
unsigned char* clipbuf;
int unit;
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
if (audio_status()) /* busy, buffer in use */
return -1;
#endif
@@ -586,7 +586,7 @@ int talk_file(const char* filename, bool enqueue)
if (size)
{
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
bitswap(p_thumbnail, size);
#endif
queue_clip(p_thumbnail, size, enqueue);
@@ -603,7 +603,7 @@ int talk_number(long n, bool enqueue)
int level = 0; /* mille count */
long mil = 1000000000; /* highest possible "-illion" */
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
if (audio_status()) /* busy, buffer in use */
return -1;
#endif
@@ -684,7 +684,7 @@ int talk_value(long n, int unit, bool enqueue)
VOICE_HERTZ,
};
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
if (audio_status()) /* busy, buffer in use */
return -1;
#endif
@@ -718,7 +718,7 @@ int talk_spell(const char* spell, bool enqueue)
{
char c; /* currently processed char */
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
if (audio_status()) /* busy, buffer in use */
return -1;
#endif
diff --git a/apps/tree.c b/apps/tree.c
index 5e0d63435b..8746145154 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -71,7 +71,7 @@ const struct filetype filetypes[] = {
{ ".mp3", TREE_ATTR_MPA, Icon_Audio, VOICE_EXT_MPA },
{ ".mp2", TREE_ATTR_MPA, Icon_Audio, VOICE_EXT_MPA },
{ ".mpa", TREE_ATTR_MPA, Icon_Audio, VOICE_EXT_MPA },
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
/* Temporary hack to allow playlist creation */
{ ".mp1", TREE_ATTR_MPA, Icon_Audio, VOICE_EXT_MPA },
{ ".ogg", TREE_ATTR_MPA, Icon_Audio, VOICE_EXT_MPA },
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 84f54e56a3..a1afa4daea 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -85,7 +85,7 @@ drivers/i2c-coldfire.c
#else
drivers/i2c.c
#endif
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
drivers/mas.c
#endif
#ifdef HAVE_RTC
@@ -107,7 +107,7 @@ crt0.S
#endif
mp3_playback.c
mp3data.c
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
mpeg.c
#endif
#ifndef WIN32 /* the win32 sim has its own versin of these: */
@@ -130,10 +130,10 @@ drivers/uda1380.c
#elif defined(HAVE_TLV320) && !defined(SIMULATOR)
drivers/tlv320.c
#endif
-#if (CONFIG_HWCODEC == MASNONE) && !defined(SIMULATOR)
+#if (CONFIG_CODEC == SWCODEC) && !defined(SIMULATOR)
pcm_playback.c
#endif
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
replaygain.c
#endif
#if defined(CPU_COLDFIRE) && !defined(SIMULATOR)
diff --git a/firmware/drivers/mas.c b/firmware/drivers/mas.c
index 7c8b55c422..66ba6b6aff 100644
--- a/firmware/drivers/mas.c
+++ b/firmware/drivers/mas.c
@@ -132,7 +132,7 @@ int mas_writemem(int bank, int addr, const unsigned long* src, int len)
j = 0;
while(len--) {
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
buf[i++] = 0;
buf[i++] = ptr[j+1];
buf[i++] = ptr[j+2];
@@ -232,7 +232,7 @@ static int mas_devread(unsigned long *dest, int len)
if (i2c_getack()) {
for (i=0;len;i++) {
len--;
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
i2c_inb(0); /* Dummy read */
ptr[i*4+0] = 0;
ptr[i*4+1] = i2c_inb(0) & 0x0f;
@@ -270,7 +270,7 @@ void mas_reset(void)
{
or_b(0x01, &PAIORH);
-#if CONFIG_HWCODEC == MAS3507D
+#if CONFIG_CODEC == MAS3507D
/* PB5 is "MAS enable". make it GPIO output and high */
PBCR2 &= ~0x0c00;
or_b(0x20, &PBIORL);
@@ -280,7 +280,7 @@ void mas_reset(void)
sleep(HZ/100);
or_b(0x01, &PADRH);
sleep(HZ/5);
-#elif (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#elif (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
if(old_recorder)
{
/* Older recorder models don't invert the POR signal */
@@ -299,7 +299,7 @@ void mas_reset(void)
#endif
}
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
int mas_direct_config_read(unsigned char reg)
{
int ret = 0;
diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h
index c53388984f..cf2e65addf 100644
--- a/firmware/export/config-fmrecorder.h
+++ b/firmware/export/config-fmrecorder.h
@@ -29,7 +29,7 @@
#ifndef SIMULATOR
/* Define this if you have a MAS3587F */
-#define CONFIG_HWCODEC MAS3587F
+#define CONFIG_CODEC MAS3587F
/* Define this if you have a SH7034 */
#define CONFIG_CPU SH7034
diff --git a/firmware/export/config-gmini120.h b/firmware/export/config-gmini120.h
index 18019464e3..c833435dea 100644
--- a/firmware/export/config-gmini120.h
+++ b/firmware/export/config-gmini120.h
@@ -38,7 +38,7 @@
#define CONFIG_I2C I2C_GMINI
/* Define this if you do software codec */
-#define CONFIG_HWCODEC MASNONE
+#define CONFIG_CODEC SWCODEC
/* Type of mobile power, FIXME: probably different, make new type */
#define CONFIG_BATTERY BATT_LIION2200
diff --git a/firmware/export/config-gminisp.h b/firmware/export/config-gminisp.h
index 2881471bc1..982e8f3725 100644
--- a/firmware/export/config-gminisp.h
+++ b/firmware/export/config-gminisp.h
@@ -32,7 +32,7 @@
#define CONFIG_I2C I2C_GMINI
/* Define this if you do software codec */
-#define CONFIG_HWCODEC MASNONE
+#define CONFIG_CODEC SWCODEC
/* Type of mobile power, FIXME: probably different, make new type */
#define CONFIG_BATTERY BATT_LIION2200
diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h
index 1fd73c25d3..bdb1b1a163 100644
--- a/firmware/export/config-h100.h
+++ b/firmware/export/config-h100.h
@@ -31,7 +31,7 @@
#define CONFIG_REMOTE_KEYPAD H100_REMOTE
/* Define this if you do software codec */
-#define CONFIG_HWCODEC MASNONE
+#define CONFIG_CODEC SWCODEC
/* Define this if you have an remote lcd */
#define HAVE_REMOTE_LCD
diff --git a/firmware/export/config-h120.h b/firmware/export/config-h120.h
index a1828efad2..2691a8a693 100644
--- a/firmware/export/config-h120.h
+++ b/firmware/export/config-h120.h
@@ -27,7 +27,7 @@
#define CONFIG_REMOTE_KEYPAD H100_REMOTE
/* Define this if you do software codec */
-#define CONFIG_HWCODEC MASNONE
+#define CONFIG_CODEC SWCODEC
/* Define this if you have an remote lcd */
#define HAVE_REMOTE_LCD
diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h
index 251b6912b3..df97fd245d 100644
--- a/firmware/export/config-h300.h
+++ b/firmware/export/config-h300.h
@@ -25,7 +25,7 @@
#define CONFIG_REMOTE_KEYPAD H300_REMOTE
/* Define this if you do software codec */
-#define CONFIG_HWCODEC MASNONE
+#define CONFIG_CODEC SWCODEC
/* Define this if you have an remote lcd */
#define HAVE_REMOTE_LCD
diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h
index e2a170af66..f7d18c829e 100644
--- a/firmware/export/config-iaudiox5.h
+++ b/firmware/export/config-iaudiox5.h
@@ -24,7 +24,7 @@
#define CONFIG_KEYPAD IAUDIO_X5_PAD
/* Define this if you do software codec */
-#define CONFIG_HWCODEC MASNONE
+#define CONFIG_CODEC SWCODEC
/* Define this if you have an remote lcd */
#define HAVE_REMOTE_LCD
diff --git a/firmware/export/config-ondiofm.h b/firmware/export/config-ondiofm.h
index 1b2857668a..a384bae5b6 100644
--- a/firmware/export/config-ondiofm.h
+++ b/firmware/export/config-ondiofm.h
@@ -28,7 +28,7 @@
#define CONFIG_CPU SH7034
/* Define this if you have a MAS3587F */
-#define CONFIG_HWCODEC MAS3587F
+#define CONFIG_CODEC MAS3587F
/* Define this to the CPU frequency */
#define CPU_FREQ 12000000
diff --git a/firmware/export/config-ondiosp.h b/firmware/export/config-ondiosp.h
index 7ccda3257b..f3ba51209b 100644
--- a/firmware/export/config-ondiosp.h
+++ b/firmware/export/config-ondiosp.h
@@ -21,7 +21,7 @@
#define CONFIG_CPU SH7034
/* Define this if you have a MAS3539F */
-#define CONFIG_HWCODEC MAS3539F
+#define CONFIG_CODEC MAS3539F
/* Define this to the CPU frequency */
#define CPU_FREQ 12000000
diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h
index 70858a1636..c2dd7572b7 100644
--- a/firmware/export/config-player.h
+++ b/firmware/export/config-player.h
@@ -20,7 +20,7 @@
#define CONFIG_CPU SH7034
/* Define this if you have a MAS3507D */
-#define CONFIG_HWCODEC MAS3507D
+#define CONFIG_CODEC MAS3507D
/* Define this if you have a DAC3550A */
#define HAVE_DAC3550A
diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h
index 51cdb79321..4df6fbfc6d 100644
--- a/firmware/export/config-recorder.h
+++ b/firmware/export/config-recorder.h
@@ -23,7 +23,7 @@
#ifndef SIMULATOR
/* Define this if you have a MAS3587F */
-#define CONFIG_HWCODEC MAS3587F
+#define CONFIG_CODEC MAS3587F
/* Define this if you have a SH7034 */
#define CONFIG_CPU SH7034
diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h
index b2d6d01669..da0bb41f80 100644
--- a/firmware/export/config-recorderv2.h
+++ b/firmware/export/config-recorderv2.h
@@ -29,7 +29,7 @@
#define CONFIG_CPU SH7034
/* Define this if you have a MAS3587F */
-#define CONFIG_HWCODEC MAS3587F
+#define CONFIG_CODEC MAS3587F
/* Define this if you have a FM Recorder key system */
#define HAVE_FMADC 1
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 1463656d03..bd817dcb2f 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -28,11 +28,11 @@
#define S1A0903X01 0x01 /* Samsung */
#define TEA5767 0x02 /* Philips */
-/* CONFIG_HWCODEC */
+/* CONFIG_CODEC */
#define MAS3587F 3587
#define MAS3507D 3507
#define MAS3539F 3539
-#define MASNONE 1 /* if codec is done by SW */
+#define SWCODEC 1 /* if codec is done by SW */
/* CONFIG_CPU */
#define SH7034 7034
diff --git a/firmware/export/id3.h b/firmware/export/id3.h
index abb354b233..5deebd41de 100644
--- a/firmware/export/id3.h
+++ b/firmware/export/id3.h
@@ -28,14 +28,14 @@
enum {
AFMT_UNKNOWN = 1, /* Unknown file format */
-#if CONFIG_HWCODEC==MASNONE
+#if CONFIG_CODEC==SWCODEC
AFMT_MPA_L1, /* MPEG Audio layer 1 */
#endif
AFMT_MPA_L2, /* MPEG Audio layer 2 */
AFMT_MPA_L3, /* MPEG Audio layer 3 */
-#if CONFIG_HWCODEC==MASNONE
+#if CONFIG_CODEC==SWCODEC
AFMT_PCM_WAV, /* Uncompressed PCM in a WAV file */
AFMT_OGG_VORBIS, /* Ogg Vorbis */
AFMT_FLAC, /* FLAC */
@@ -118,7 +118,7 @@ struct mp3entry {
/* replaygain support */
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
char* track_gain_string;
char* album_gain_string;
long track_gain; /* 7.24 signed fixed point. 0 for no gain. */
diff --git a/firmware/export/mas.h b/firmware/export/mas.h
index f682fc676e..d25a1538ca 100644
--- a/firmware/export/mas.h
+++ b/firmware/export/mas.h
@@ -27,7 +27,7 @@
/*
MAS I2C defs
*/
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
#define MAS_ADR 0x3c
#define MAS_DEV_WRITE (MAS_ADR | 0x00)
#define MAS_DEV_READ (MAS_ADR | 0x01)
@@ -38,7 +38,7 @@
#endif
/* registers..*/
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
#define MAS_DATA_WRITE 0x68
#define MAS_DATA_READ 0x69
#define MAS_CODEC_WRITE 0x6c
@@ -62,7 +62,7 @@
#define MAS_REG_KPRESCALE 0xe7
#define MAS_REG_KBASS 0x6b
#define MAS_REG_KTREBLE 0x6f
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
#define MAS_REG_KMDB_SWITCH 0x21
#define MAS_REG_KMDB_STR 0x22
#define MAS_REG_KMDB_HAR 0x23
@@ -78,7 +78,7 @@
/*
* MAS commands
*/
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
#define MAS_CMD_READ_ANCILLARY 0x50
#define MAS_CMD_FAST_PRG_DL 0x60
#define MAS_CMD_READ_IC_VER 0x70
@@ -101,7 +101,7 @@
/*
* MAS D0 memory cells (MAS3587F / MAS3539F)
*/
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
#define MAS_D0_APP_SELECT 0x7f6
#define MAS_D0_APP_RUNNING 0x7f7
#define MAS_D0_ENCODER_CONTROL 0x7f0
@@ -120,7 +120,7 @@
#define MAS_D0_MPEG_STATUS_2 0xfd2
#define MAS_D0_CRC_ERROR_COUNT 0xfd3
-#elif CONFIG_HWCODEC == MAS3539F
+#elif CONFIG_CODEC == MAS3539F
#define MAS_D0_APP_SELECT 0x34b
#define MAS_D0_APP_RUNNING 0x34c
/* no encoder :( */
diff --git a/firmware/export/mp3_playback.h b/firmware/export/mp3_playback.h
index 3611c1c9c1..772eafe971 100644
--- a/firmware/export/mp3_playback.h
+++ b/firmware/export/mp3_playback.h
@@ -32,7 +32,7 @@ void mp3_init(int volume, int bass, int treble, int balance, int loudness,
bool superbass);
/* exported just for mpeg.c, to keep the recording there */
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
void demand_irq_enable(bool on);
#endif
diff --git a/firmware/export/mpeg.h b/firmware/export/mpeg.h
index d8dea3d143..6ce3b47275 100644
--- a/firmware/export/mpeg.h
+++ b/firmware/export/mpeg.h
@@ -43,7 +43,7 @@
/* For ID3 info and VBR header */
#define MPEG_RESERVED_HEADER_SPACE (4096 + 1500)
-#if (CONFIG_HWCODEC == MAS3587F) || defined(SIMULATOR)
+#if (CONFIG_CODEC == MAS3587F) || defined(SIMULATOR)
void mpeg_init_recording(void);
void mpeg_record(const char *filename);
void mpeg_new_file(const char *filename);
diff --git a/firmware/export/sound.h b/firmware/export/sound.h
index 9f4cd60ae8..772e2d6655 100644
--- a/firmware/export/sound.h
+++ b/firmware/export/sound.h
@@ -54,7 +54,7 @@ int sound_val2phys(int setting, int value);
const char *sound_unit(int setting);
int sound_numdecimals(int setting);
int sound_steps(int setting);
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F) || defined(SIMULATOR)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) || defined(SIMULATOR)
void sound_set_pitch(int permille);
int sound_get_pitch(void);
#endif
diff --git a/firmware/id3.c b/firmware/id3.c
index 90500663c1..8685d86790 100644
--- a/firmware/id3.c
+++ b/firmware/id3.c
@@ -83,14 +83,14 @@ static const char* const codec_labels[] = {
"ERR", /* Invalid codec type */
"???", /* Unknown file format */
-#if CONFIG_HWCODEC==MASNONE
+#if CONFIG_CODEC==SWCODEC
"MP1", /* MPEG Audio layer 1 */
#endif
"MP2", /* MPEG Audio layer 2 */
"MP3", /* MPEG Audio layer 3 */
-#if CONFIG_HWCODEC==MASNONE
+#if CONFIG_CODEC==SWCODEC
"WAV", /* Uncompressed PCM in a WAV file */
"OGG", /* Ogg Vorbis */
"FLAC", /* FLAC */
@@ -310,7 +310,7 @@ static int parsegenre( struct mp3entry* entry, char* tag, int bufferpos )
}
}
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
/* parse user defined text, looking for replaygain information. */
static int parseuser( struct mp3entry* entry, char* tag, int bufferpos )
{
@@ -352,7 +352,7 @@ static const struct tag_resolver taglist[] = {
{ "TCOM", 4, offsetof(struct mp3entry, composer), NULL },
{ "TCON", 4, offsetof(struct mp3entry, genre_string), &parsegenre },
{ "TCO", 3, offsetof(struct mp3entry, genre_string), &parsegenre },
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
{ "TXXX", 4, 0, &parseuser },
#endif
};
@@ -885,7 +885,7 @@ static int getsonglength(int fd, struct mp3entry *entry)
entry->version = info.version;
entry->layer = info.layer;
switch(entry->layer) {
-#if CONFIG_HWCODEC==MASNONE
+#if CONFIG_CODEC==SWCODEC
case 0:
entry->codectype=AFMT_MPA_L1;
break;
@@ -947,7 +947,7 @@ bool mp3info(struct mp3entry *entry, const char *filename, bool v1first)
if(-1 == fd)
return true;
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
memset(entry, 0, sizeof(struct mp3entry));
#endif
diff --git a/firmware/mp3_playback.c b/firmware/mp3_playback.c
index 3a2fdb4f1a..b7114007b9 100644
--- a/firmware/mp3_playback.c
+++ b/firmware/mp3_playback.c
@@ -36,7 +36,7 @@
#endif
/* hacking into mpeg.c, recording is still there */
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
enum
{
MPEG_DECODER,
@@ -44,7 +44,7 @@ enum
} mpeg_mode;
#endif /* #ifdef MAS3587F */
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
extern unsigned long shadow_io_control_main;
extern unsigned shadow_codec_reg0;
#endif
@@ -72,14 +72,14 @@ static void (*callback_for_more)(unsigned char**, int*);
bool audio_is_initialized = false;
#endif
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
/* FIX: this code pretty much assumes a MAS */
#ifndef SIMULATOR
unsigned long mas_version_code;
-#if CONFIG_HWCODEC == MAS3507D
+#if CONFIG_CODEC == MAS3507D
static void mas_poll_start(void)
{
unsigned int count;
@@ -104,7 +104,7 @@ static void mas_poll_start(void)
TSTR |= 0x02; /* Start timer 1 */
}
-#elif CONFIG_HWCODEC != MASNONE
+#elif CONFIG_CODEC != SWCODEC
static void postpone_dma_tick(void)
{
unsigned int count;
@@ -132,7 +132,7 @@ static void postpone_dma_tick(void)
#endif
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
void demand_irq_enable(bool on)
{
int oldlevel = set_irq_level(HIGHEST_IRQ_LEVEL);
@@ -147,7 +147,7 @@ void demand_irq_enable(bool on)
set_irq_level(oldlevel);
}
-#endif /* #if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F) */
+#endif /* #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) */
void play_tick(void)
@@ -194,7 +194,7 @@ void IMIA1(void) /* Timer 1 interrupt */
if(playing)
play_tick();
TSR1 &= ~0x01;
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
/* Disable interrupt */
IPRC &= ~0x000f;
#endif
@@ -206,21 +206,21 @@ void IRQ6(void) /* PB14: MAS stop demand IRQ */
SCR0 &= ~0x80;
}
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
#pragma interrupt
void IRQ3(void) /* PA15: MAS demand IRQ */
{
/* Begin with setting the IRQ to edge sensitive */
ICR |= 0x0010;
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
if(mpeg_mode == MPEG_ENCODER)
rec_tick();
else
#endif
postpone_dma_tick();
}
-#endif /* #if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F) */
+#endif /* #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) */
static void setup_sci0(void)
{
@@ -260,7 +260,7 @@ static void setup_sci0(void)
}
#endif /* SIMULATOR */
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
static void init_playback(void)
{
unsigned long val;
@@ -310,7 +310,7 @@ static void init_playback(void)
mas_readmem(MAS_BANK_D0, MAS_D0_APP_RUNNING, &val, 1);
} while((val & 0x0c) != 0x0c);
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
mpeg_mode = MPEG_DECODER;
#endif
@@ -322,7 +322,7 @@ static void init_playback(void)
DEBUGF("MAS Decoding application started\n");
}
-#endif /* #if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F) */
+#endif /* #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) */
void mp3_init(int volume, int bass, int treble, int balance, int loudness,
int avc, int channel_config, int stereo_width,
@@ -346,7 +346,7 @@ void mp3_init(int volume, int bass, int treble, int balance, int loudness,
(void)mdb_enable;
(void)superbass;
#else
-#if CONFIG_HWCODEC == MAS3507D
+#if CONFIG_CODEC == MAS3507D
unsigned long val;
(void)loudness;
(void)avc;
@@ -365,9 +365,9 @@ void mp3_init(int volume, int bass, int treble, int balance, int loudness,
or_b(0x01, &PBIORH); /* output for PB8 */
#endif
-#if CONFIG_HWCODEC == MAS3507D
+#if CONFIG_CODEC == MAS3507D
mas_reset();
-#elif CONFIG_HWCODEC == MAS3587F
+#elif CONFIG_CODEC == MAS3587F
or_b(0x08, &PAIORH); /* output for /PR */
init_playback();
@@ -375,7 +375,7 @@ void mp3_init(int volume, int bass, int treble, int balance, int loudness,
DEBUGF("MAS3587 derivate %d, version %c%d\n",
(mas_version_code & 0xf000) >> 12,
'A' + ((mas_version_code & 0x0f00) >> 8), mas_version_code & 0xff);
-#elif CONFIG_HWCODEC == MAS3539F
+#elif CONFIG_CODEC == MAS3539F
or_b(0x08, &PAIORH); /* output for /PR */
init_playback();
@@ -389,7 +389,7 @@ void mp3_init(int volume, int bass, int treble, int balance, int loudness,
dac_init();
#endif
-#if CONFIG_HWCODEC == MAS3507D
+#if CONFIG_CODEC == MAS3507D
/* set IRQ6 to edge detect */
ICR |= 0x02;
@@ -430,14 +430,14 @@ void mp3_init(int volume, int bass, int treble, int balance, int loudness,
#endif
-#if CONFIG_HWCODEC == MAS3507D
+#if CONFIG_CODEC == MAS3507D
mas_poll_start();
mas_writereg(MAS_REG_KPRESCALE, 0xe9400);
dac_enable(true);
#endif
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
ICR &= ~0x0010; /* IRQ3 level sensitive */
PACR1 = (PACR1 & 0x3fff) | 0x4000; /* PA15 is IRQ3 */
#endif
@@ -452,7 +452,7 @@ void mp3_init(int volume, int bass, int treble, int balance, int loudness,
sound_set(SOUND_CHANNELS, channel_config);
sound_set(SOUND_STEREO_WIDTH, stereo_width);
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
sound_set(SOUND_LOUDNESS, loudness);
sound_set(SOUND_AVC, avc);
sound_set(SOUND_MDB_STRENGTH, mdb_strength);
@@ -471,12 +471,12 @@ void mp3_init(int volume, int bass, int treble, int balance, int loudness,
void mp3_shutdown(void)
{
#ifndef SIMULATOR
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
unsigned long val = 1;
mas_writemem(MAS_BANK_D0, MAS_D0_SOFT_MUTE, &val, 1); /* Mute */
#endif
-#if CONFIG_HWCODEC == MAS3507D
+#if CONFIG_CODEC == MAS3507D
dac_volume(0, 0, false);
#endif
@@ -489,7 +489,7 @@ void mp3_shutdown(void)
void mp3_play_init(void)
{
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
init_playback();
#endif
playing = false;
@@ -518,7 +518,7 @@ void mp3_play_data(const unsigned char* start, int size,
CHCR3 |= 0x0001; /* Enable DMA IRQ */
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
demand_irq_enable(true);
#endif
}
@@ -557,7 +557,7 @@ void mp3_play_stop(void)
playing = false;
mp3_play_pause(false);
CHCR3 &= ~0x0001; /* Disable the DMA interrupt */
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
demand_irq_enable(false);
#endif
}
@@ -591,7 +591,7 @@ unsigned char* mp3_get_pos(void)
#endif /* #ifndef SIMULATOR */
-#else /* CONFIG_HWCODEC != MASNONE */
+#else /* CONFIG_CODEC != SWCODEC */
void mp3_init(int volume, int bass, int treble, int balance, int loudness,
int avc, int channel_config, int stereo_width,
int mdb_strength, int mdb_harmonics,
@@ -651,4 +651,4 @@ bool mp3_is_playing(void)
return playing;
}
-#endif /* CONFIG_HWCODEC == MASNONE */
+#endif /* CONFIG_CODEC == SWCODEC */
diff --git a/firmware/mp3data.c b/firmware/mp3data.c
index bca8560188..44c298a463 100644
--- a/firmware/mp3data.c
+++ b/firmware/mp3data.c
@@ -100,7 +100,7 @@ static bool is_mp3frameheader(unsigned long head)
return false;
if (!(head & LAYER_MASK)) /* no layer? */
return false;
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
/* The MAS can't decode layer 1, so treat layer 1 data as invalid */
if ((head & LAYER_MASK) == LAYER_MASK)
return false;
diff --git a/firmware/mpeg.c b/firmware/mpeg.c
index 721a4acbcc..394d6983b6 100644
--- a/firmware/mpeg.c
+++ b/firmware/mpeg.c
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include "config.h"
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
#include "debug.h"
#include "panic.h"
@@ -51,13 +51,13 @@
extern unsigned long mas_version_code;
#endif
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
extern enum /* from mp3_playback.c */
{
MPEG_DECODER,
MPEG_ENCODER
} mpeg_mode;
-#endif /* CONFIG_HWCODEC == MAS3587F */
+#endif /* CONFIG_CODEC == MAS3587F */
extern char* playlist_peek(int steps);
extern bool playlist_check(int steps);
@@ -151,7 +151,7 @@ static long low_watermark; /* Dynamic low watermark level */
static long low_watermark_margin; /* Extra time in seconds for watermark */
static long lowest_watermark_level; /* Debug value to observe the buffer
usage */
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
static char recording_filename[MAX_PATH]; /* argument to thread */
static char delayed_filename[MAX_PATH]; /* internal copy of above */
@@ -189,13 +189,13 @@ static unsigned long num_recorded_frames;
/* Shadow MAS registers */
unsigned long shadow_encoder_control = 0;
-#endif /* CONFIG_HWCODEC == MAS3587F */
+#endif /* CONFIG_CODEC == MAS3587F */
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
unsigned long shadow_io_control_main = 0;
unsigned long shadow_soft_mute = 0;
unsigned shadow_codec_reg0;
-#endif /* (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F) */
+#endif /* (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) */
#ifdef HAVE_RECORDING
const unsigned char empty_id3_header[] =
@@ -211,7 +211,7 @@ static int get_playable_space(void);
static int get_unswapped_space(void);
#endif /* !SIMULATOR */
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
static void init_recording(void);
static void start_prerecording(void);
static void start_recording(void);
@@ -219,7 +219,7 @@ static void stop_recording(void);
static int get_unsaved_space(void);
static void pause_recording(void);
static void resume_recording(void);
-#endif /* CONFIG_HWCODEC == MAS3587F */
+#endif /* CONFIG_CODEC == MAS3587F */
#ifndef SIMULATOR
@@ -661,7 +661,7 @@ static int get_unswapped_space(void)
return space;
}
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
static int get_unsaved_space(void)
{
int space = audiobuf_write - audiobuf_read;
@@ -772,7 +772,7 @@ void rec_tick(void)
}
}
}
-#endif /* CONFIG_HWCODEC == MAS3587F */
+#endif /* CONFIG_CODEC == MAS3587F */
void playback_tick(void)
{
@@ -1029,10 +1029,10 @@ static void track_change(void)
{
DEBUGF("Track change\n");
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
/* Reset the AVC */
sound_set(SOUND_AVC, -1);
-#endif /* (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F) */
+#endif /* (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F) */
if (num_tracks_in_memory() > 0)
{
@@ -1157,14 +1157,14 @@ static void mpeg_thread(void)
int amount_to_read;
int t1, t2;
int start_offset;
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
int amount_to_save;
int framelen;
unsigned long saved_header = 0;
int save_endpos = 0;
int rc;
long offset;
-#endif /* CONFIG_HWCODEC == MAS3587F */
+#endif /* CONFIG_CODEC == MAS3587F */
is_playing = false;
play_pending = false;
@@ -1173,10 +1173,10 @@ static void mpeg_thread(void)
while(1)
{
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
if(mpeg_mode == MPEG_DECODER)
{
-#endif /* CONFIG_HWCODEC == MAS3587F */
+#endif /* CONFIG_CODEC == MAS3587F */
yield();
/* Swap if necessary, and don't block on the queue_wait() */
@@ -1724,19 +1724,19 @@ static void mpeg_thread(void)
break;
#endif /* !USB_NONE */
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
case MPEG_INIT_RECORDING:
init_recording();
init_recording_done = true;
break;
-#endif /* CONFIG_HWCODEC == MAS3587F */
+#endif /* CONFIG_CODEC == MAS3587F */
case SYS_TIMEOUT:
if (playing)
playlist_update_resume_info(audio_current_track());
break;
}
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
}
else
{
@@ -2069,7 +2069,7 @@ static void mpeg_thread(void)
break;
}
}
-#endif /* CONFIG_HWCODEC == MAS3587F */
+#endif /* CONFIG_CODEC == MAS3587F */
}
}
#endif /* !SIMULATOR */
@@ -2113,7 +2113,7 @@ bool audio_has_changed_track(void)
return false;
}
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
void audio_init_playback(void)
{
init_playback_done = false;
@@ -2216,7 +2216,7 @@ static void init_recording(void)
buffer, because the silly MAS will not negate EOD until at least one
DMA transfer has taken place.
Now let's wait for some data to be encoded. */
- sleep(20);
+ sleep(HZ/5);
/* Now set it to Monitoring mode as default, saves power */
shadow_io_control_main = 0x525;
@@ -2630,7 +2630,7 @@ void mpeg_set_recording_options(int frequency, int quality,
(void)editable;
(void)prerecord_time;
}
-#endif /* CONFIG_HWCODEC == MAS3587F; SIMULATOR */
+#endif /* CONFIG_CODEC == MAS3587F; SIMULATOR */
void audio_play(int offset)
{
@@ -2786,13 +2786,13 @@ int audio_status(void)
if(paused)
ret |= AUDIO_STATUS_PAUSE;
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
if(is_recording && !is_prerecording)
ret |= AUDIO_STATUS_RECORD;
if(is_prerecording)
ret |= AUDIO_STATUS_PRERECORD;
-#endif /* CONFIG_HWCODEC == MAS3587F */
+#endif /* CONFIG_CODEC == MAS3587F */
if(mpeg_errno)
ret |= AUDIO_STATUS_ERROR;
@@ -2846,12 +2846,12 @@ void audio_init(void)
memset(trackdata, sizeof(trackdata), 0);
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
if(read_hw_mask() & PR_ACTIVE_HIGH)
and_b(~0x08, &PADRH);
else
or_b(0x08, &PADRH);
-#endif /* CONFIG_HWCODEC == MAS3587F */
+#endif /* CONFIG_CODEC == MAS3587F */
#ifdef DEBUG
dbg_timer_start();
@@ -2859,4 +2859,4 @@ void audio_init(void)
#endif /* DEBUG */
}
-#endif /* CONFIG_HWCODEC != MASNONE */
+#endif /* CONFIG_CODEC != SWCODEC */
diff --git a/firmware/sound.c b/firmware/sound.c
index cd772f5e9f..a36c244d1b 100644
--- a/firmware/sound.c
+++ b/firmware/sound.c
@@ -31,7 +31,7 @@
#include "dac.h"
#include "system.h"
#include "hwcompat.h"
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
#include "pcm_playback.h"
#endif
#endif
@@ -40,7 +40,7 @@
extern bool audio_is_initialized;
#endif
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
extern unsigned long shadow_io_control_main;
extern unsigned shadow_codec_reg0;
#endif
@@ -116,7 +116,7 @@ static const int steps[] =
static const int minval[] =
{
0, /* Volume */
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
-12, /* Bass */
-12, /* Treble */
#elif defined(HAVE_UDA1380)
@@ -145,7 +145,7 @@ static const int minval[] =
static const int maxval[] =
{
100, /* Volume */
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
12, /* Bass */
12, /* Treble */
#elif defined(HAVE_UDA1380)
@@ -174,7 +174,7 @@ static const int maxval[] =
static const int defaultval[] =
{
70, /* Volume */
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
6, /* Bass */
6, /* Treble */
#elif defined(HAVE_UDA1380)
@@ -231,7 +231,7 @@ int sound_default(int setting)
}
#ifndef SIMULATOR
-#if CONFIG_HWCODEC == MAS3507D /* volume/balance/treble/bass interdependency */
+#if CONFIG_CODEC == MAS3507D /* volume/balance/treble/bass interdependency */
#define VOLUME_MIN -780
#define VOLUME_MAX 180
@@ -351,7 +351,7 @@ static int tenthdb2master(int db) {
}
#endif
-#if (CONFIG_HWCODEC == MAS3507D) || defined HAVE_UDA1380
+#if (CONFIG_CODEC == MAS3507D) || defined HAVE_UDA1380
/* volume/balance/treble/bass interdependency main part */
#define VOLUME_RANGE (VOLUME_MAX - VOLUME_MIN)
@@ -371,7 +371,7 @@ static void set_prescaled_volume(void)
prescale = 0; /* no need to prescale if we don't boost
bass or treble */
-#if CONFIG_HWCODEC == MAS3507D
+#if CONFIG_CODEC == MAS3507D
mas_writereg(MAS_REG_KPRESCALE, prescale_table[prescale/10]);
#else /* UDA1380 */
uda1380_set_mixer_vol(prescale*2/5, prescale*2/5);
@@ -397,13 +397,13 @@ static void set_prescaled_volume(void)
r = VOLUME_MIN;
}
-#if CONFIG_HWCODEC == MAS3507D
+#if CONFIG_CODEC == MAS3507D
dac_volume(tenthdb2reg(l), tenthdb2reg(r), false);
#else /* UDA1380 */
uda1380_set_master_vol(tenthdb2master(l), tenthdb2master(r));
#endif
}
-#endif /* (CONFIG_HWCODEC == MAS3507D) || defined HAVE_UDA1380 */
+#endif /* (CONFIG_CODEC == MAS3507D) || defined HAVE_UDA1380 */
#endif /* !SIMULATOR */
int channel_configuration = SOUND_CHAN_STEREO;
@@ -475,12 +475,12 @@ static void set_channel_config(void)
break;
}
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
mas_writemem(MAS_BANK_D0, MAS_D0_OUT_LL, &val_ll, 1); /* LL */
mas_writemem(MAS_BANK_D0, MAS_D0_OUT_LR, &val_lr, 1); /* LR */
mas_writemem(MAS_BANK_D0, MAS_D0_OUT_RL, &val_rl, 1); /* RL */
mas_writemem(MAS_BANK_D0, MAS_D0_OUT_RR, &val_rr, 1); /* RR */
-#elif CONFIG_HWCODEC == MAS3507D
+#elif CONFIG_CODEC == MAS3507D
mas_writemem(MAS_BANK_D1, 0x7f8, &val_ll, 1); /* LL */
mas_writemem(MAS_BANK_D1, 0x7f9, &val_lr, 1); /* LR */
mas_writemem(MAS_BANK_D1, 0x7fa, &val_rl, 1); /* RL */
@@ -489,7 +489,7 @@ static void set_channel_config(void)
}
#endif /* !SIMULATOR */
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
unsigned long mdb_shape_shadow = 0;
unsigned long loudness_shadow = 0;
#endif
@@ -499,7 +499,7 @@ void sound_set(int setting, int value)
#ifdef SIMULATOR
setting = value;
#else
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
int tmp;
#endif
@@ -509,30 +509,30 @@ void sound_set(int setting, int value)
switch(setting)
{
case SOUND_VOLUME:
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
tmp = 0x7f00 * value / 100;
mas_codec_writereg(0x10, tmp & 0xff00);
-#elif (CONFIG_HWCODEC == MAS3507D) || defined HAVE_UDA1380
+#elif (CONFIG_CODEC == MAS3507D) || defined HAVE_UDA1380
current_volume = VOLUME_MIN + (value * VOLUME_RANGE / 100);
set_prescaled_volume(); /* tenth of dB */
#endif
break;
case SOUND_BALANCE:
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
tmp = ((value * 127 / 100) & 0xff) << 8;
mas_codec_writereg(0x11, tmp & 0xff00);
-#elif CONFIG_HWCODEC == MAS3507D || defined HAVE_UDA1380
+#elif CONFIG_CODEC == MAS3507D || defined HAVE_UDA1380
current_balance = value * VOLUME_RANGE / 100; /* tenth of dB */
set_prescaled_volume();
#endif
break;
case SOUND_BASS:
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
tmp = ((value * 8) & 0xff) << 8;
mas_codec_writereg(0x14, tmp & 0xff00);
-#elif CONFIG_HWCODEC == MAS3507D
+#elif CONFIG_CODEC == MAS3507D
mas_writereg(MAS_REG_KBASS, bass_table[value+15]);
current_bass = value * 10;
set_prescaled_volume();
@@ -544,10 +544,10 @@ void sound_set(int setting, int value)
break;
case SOUND_TREBLE:
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
tmp = ((value * 8) & 0xff) << 8;
mas_codec_writereg(0x15, tmp & 0xff00);
-#elif CONFIG_HWCODEC == MAS3507D
+#elif CONFIG_CODEC == MAS3507D
mas_writereg(MAS_REG_KTREBLE, treble_table[value+15]);
current_treble = value * 10;
set_prescaled_volume();
@@ -558,7 +558,7 @@ void sound_set(int setting, int value)
#endif
break;
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
case SOUND_LOUDNESS:
loudness_shadow = (loudness_shadow & 0x04) |
(MAX(MIN(value * 4, 0x44), 0) << 8);
@@ -635,7 +635,7 @@ void sound_set(int setting, int value)
int sound_val2phys(int setting, int value)
{
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
int result = 0;
switch(setting)
@@ -660,7 +660,7 @@ int sound_val2phys(int setting, int value)
#endif
}
-#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
+#if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3539F)
/* This function works by telling the decoder that we have another
crystal frequency than we actually have. It will adjust its internal
parameters and the result is that the audio is played at another pitch.
diff --git a/firmware/tuner_samsung.c b/firmware/tuner_samsung.c
index c024fceb9d..b0887d0d7a 100644
--- a/firmware/tuner_samsung.c
+++ b/firmware/tuner_samsung.c
@@ -52,7 +52,7 @@ void samsung_set(int setting, int value)
case RADIO_FREQUENCY:
{
int pll_cnt;
-#if CONFIG_HWCODEC == MAS3587F
+#if CONFIG_CODEC == MAS3587F
/* Shift the MAS internal clock away for certain frequencies to
* avoid interference. */
int pitch = 1000;
diff --git a/uisimulator/common/stubs.c b/uisimulator/common/stubs.c
index 2357f9baea..0bbecdae41 100644
--- a/uisimulator/common/stubs.c
+++ b/uisimulator/common/stubs.c
@@ -71,7 +71,7 @@ long pcm_get_bytes_waiting(void)
return 0;
}
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
void audio_set_buffer_margin(int seconds)
{
(void)seconds;
@@ -273,7 +273,7 @@ void button_set_flip(bool yesno)
(void)yesno;
}
-#if CONFIG_HWCODEC != MASNONE
+#if CONFIG_CODEC != SWCODEC
void talk_init(void)
{
}
diff --git a/uisimulator/x11/SOURCES b/uisimulator/x11/SOURCES
index edff103196..0aabfb2c03 100644
--- a/uisimulator/x11/SOURCES
+++ b/uisimulator/x11/SOURCES
@@ -9,6 +9,6 @@ screenhack.c
thread.c
uibasic.c
visual.c
-#if CONFIG_HWCODEC == MASNONE
+#if CONFIG_CODEC == SWCODEC
sound.c
#endif