summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/export/config-cowond2.h5
-rw-r--r--firmware/sound.c6
-rw-r--r--firmware/target/arm/tcc780x/system-tcc780x.c7
3 files changed, 9 insertions, 9 deletions
diff --git a/firmware/export/config-cowond2.h b/firmware/export/config-cowond2.h
index aeb60bfce6..a2a1775500 100644
--- a/firmware/export/config-cowond2.h
+++ b/firmware/export/config-cowond2.h
@@ -84,8 +84,7 @@
#define HAVE_WM8985
/* There is no hardware tone control */
-/* TODO: probably need to use this */
-//#define HAVE_SW_TONE_CONTROLS
+#define HAVE_SW_TONE_CONTROLS
/* Define this for LCD backlight available */
#define HAVE_BACKLIGHT
@@ -122,7 +121,7 @@
#define CPU_FREQ 48000000
/* Define this if you have adjustable CPU frequency */
-/* #define HAVE_ADJUSTABLE_CPU_FREQ */
+#define HAVE_ADJUSTABLE_CPU_FREQ
/* Offset ( in the firmware file's header ) to the file CRC */
#define FIRMWARE_OFFSET_FILE_CRC 0
diff --git a/firmware/sound.c b/firmware/sound.c
index b4d1059f96..b559fe2b5e 100644
--- a/firmware/sound.c
+++ b/firmware/sound.c
@@ -227,7 +227,7 @@ static int tenthdb2reg(int db)
#if (CONFIG_CODEC == MAS3507D) || defined HAVE_UDA1380 \
|| defined HAVE_WM8975 || defined HAVE_WM8758 || defined(HAVE_WM8731) \
|| defined(HAVE_WM8721) || defined(HAVE_TLV320) || defined(HAVE_WM8751) \
- || defined(HAVE_AS3514)
+ || defined(HAVE_AS3514) || defined(HAVE_WM8985)
/* all values in tenth of dB MAS3507D UDA1380 */
int current_volume = 0; /* -780..+180 -840.. 0 */
@@ -405,7 +405,7 @@ void sound_set_volume(int value)
#elif (CONFIG_CODEC == MAS3507D) || defined HAVE_UDA1380 \
|| defined HAVE_WM8975 || defined HAVE_WM8758 || defined HAVE_WM8731 \
|| defined(HAVE_WM8721) || defined(HAVE_TLV320) || defined(HAVE_WM8751) \
- || defined(HAVE_AS3514)
+ || defined(HAVE_AS3514) || defined(HAVE_WM8985)
current_volume = value * 10; /* tenth of dB */
set_prescaled_volume();
#elif CONFIG_CPU == PNX0101
@@ -424,7 +424,7 @@ void sound_set_balance(int value)
#elif CONFIG_CODEC == MAS3507D || defined HAVE_UDA1380 \
|| defined HAVE_WM8975 || defined HAVE_WM8758 || defined HAVE_WM8731 \
|| defined(HAVE_WM8721) || defined(HAVE_TLV320) || defined(HAVE_WM8751) \
- || defined(HAVE_AS3514)
+ || defined(HAVE_AS3514) || defined(HAVE_WM8985)
current_balance = value * VOLUME_RANGE / 100; /* tenth of dB */
set_prescaled_volume();
#elif CONFIG_CPU == PNX0101
diff --git a/firmware/target/arm/tcc780x/system-tcc780x.c b/firmware/target/arm/tcc780x/system-tcc780x.c
index f6392b023a..c109b8ddda 100644
--- a/firmware/target/arm/tcc780x/system-tcc780x.c
+++ b/firmware/target/arm/tcc780x/system-tcc780x.c
@@ -291,11 +291,11 @@ int system_memory_guard(int newmode)
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
-/* Note: This is not currently enabled because switching seems to
- cause an occasional freeze. To be investigated. */
-
void set_cpu_frequency(long frequency)
{
+ if (cpu_frequency == frequency)
+ return;
+
/* CPU/COP frequencies can be scaled between Fbus (min) and Fsys (max).
Fbus should not be set below ~32Mhz with LCD enabled or the display
will be garbled. */
@@ -327,6 +327,7 @@ void set_cpu_frequency(long frequency)
asm volatile (
"nop \n\t"
"nop \n\t"
+ "nop \n\t"
);
cpu_frequency = frequency;