summaryrefslogtreecommitdiff
path: root/firmware
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 /firmware
parent99a0598c284471342fcda1fdcba90d4b666bfbb3 (diff)
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
Diffstat (limited to 'firmware')
-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
26 files changed, 126 insertions, 126 deletions
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;