Index: apps/settings.c
===================================================================
--- apps/settings.c	(revision 29795)
+++ apps/settings.c	(working copy)
@@ -72,6 +72,9 @@
 #include "viewport.h"
 #include "statusbar-skinned.h"
 #include "bootchart.h"
+#if defined(COWON_D2) && !defined (SIMULATOR)
+#include "power-target.h"
+#endif
 
 #if CONFIG_CODEC == MAS3507D
 void dac_line_in(bool enable);
@@ -716,6 +719,9 @@
 
 void sound_settings_apply(void)
 {
+#if defined(COWON_D2) && !defined (SIMULATOR)   
+    set_wm8985_dcvdd(global_settings.wm8985_dcvdd_vcode);
+#endif
 #if CONFIG_CODEC == SWCODEC
     sound_set_dsp_callback(dsp_callback);
 #endif
@@ -1231,3 +1241,21 @@
     settings_save();
 }
 
+#if defined(COWON_D2) && !defined (SIMULATOR)
+void set_wm8985_dcvdd(int vcode)
+{
+    int v = vcode, vmax = get_wm8985_dcvdd_limit();
+    if (v > vmax)
+    {
+        int whole_part = (vmax + 9)/10;
+        int fraction = vmax + 9 - 10*whole_part;
+        splashf(HZ/2, "Overvoltage! Will use %d.%d v.", whole_part, fraction);
+        global_settings.wm8985_dcvdd_vcode = v = vmax;
+    }
+    tweak_wm8985_voltage((unsigned char)v);
+}
+int get_wm8985_dcvdd_limit(void)
+{
+    return wm8985_dcvdd_limit();
+}
+#endif
Index: apps/lang/russian.lang
===================================================================
--- apps/lang/russian.lang	(revision 29795)
+++ apps/lang/russian.lang	(working copy)
@@ -12665,3 +12665,34 @@
     *: "Только в заданных папках"
   </voice>
 </phrase>
+<phrase>
+  id: LANG_WM8985_DCVDD
+  desc: Displayed for setting WM8985 DCVDD voltage
+  user: core
+  <source>
+    *: none
+    cowond2*: "WM8985 DCVDD voltage"
+  </source>
+  <dest>
+    *: none
+    cowond2*: "Напряжение DCVDD WM8985"
+  </dest>
+  <voice>
+    *: none
+    cowond2*: "Напряжение DCVDD WM8985"
+  </voice>
+</phrase>
+<phrase>
+  id: VOICE_VOLTS
+  desc: spoken only, a unit postfix
+  user: core
+  <source>
+    *: ""
+  </source>
+  <dest>
+    *: ""
+  </dest>
+  <voice>
+    *: "вольт"
+  </voice>
+</phrase>
Index: apps/lang/english.lang
===================================================================
--- apps/lang/english.lang	(revision 29795)
+++ apps/lang/english.lang	(working copy)
@@ -12744,3 +12887,34 @@
     *: "In custom directories only"
   </voice>
 </phrase>
+<phrase>
+  id: LANG_WM8985_DCVDD
+  desc: Displayed for setting WM8985 DCVDD voltage
+  user: core
+  <source>
+    *: none
+    cowond2*: "WM8985 DCVDD voltage"
+  </source>
+  <dest>
+    *: none
+    cowond2*: "WM8985 DCVDD voltage"
+  </dest>
+  <voice>
+    *: none
+    cowond2*: "WM8985 DCVDD voltage"
+  </voice>
+</phrase>
+<phrase>
+  id: VOICE_VOLTS
+  desc: spoken only, a unit postfix
+  user: core
+  <source>
+    *: ""
+  </source>
+  <dest>
+    *: ""
+  </dest>
+  <voice>
+    *: "volts"
+  </voice>
+</phrase>
Index: apps/gui/option_select.c
===================================================================
--- apps/gui/option_select.c	(revision 29795)
+++ apps/gui/option_select.c	(working copy)
@@ -58,6 +58,7 @@
     [UNIT_HERTZ] = "Hz",
     [UNIT_MB]  = "MB",  [UNIT_KBIT]  = "kb/s",
     [UNIT_PM_TICK] = "units/10ms",
+    [UNIT_VOL] = "v",
 };
 /* these two vars are needed so arbitrary values can be added to the
    TABLE_SETTING settings if the F_ALLOW_ARBITRARY_VALS flag is set */
Index: apps/settings.h
===================================================================
--- apps/settings.h	(revision 29795)
+++ apps/settings.h	(working copy)
@@ -217,6 +217,10 @@
 void reset_setting(const struct settings_list *setting, void *var);
 void settings_reset(void);
 void sound_settings_apply(void);
+#if defined(COWON_D2) && !defined (SIMULATOR)
+void set_wm8985_dcvdd(int vcode);
+int get_wm8985_dcvdd_limit(void);
+#endif
 
 /* call this after loading a .wps/.rwps pr other skin files, so that the
  * skin buffer is reset properly
@@ -513,6 +612,9 @@
     bool audioscrobbler; /* Audioscrobbler logging  */
     bool cuesheet;
     bool car_adapter_mode; /* 0=off 1=on */
+#if defined(COWON_D2) && !defined (SIMULATOR)
+    int wm8985_dcvdd_vcode; 
+#endif    
     int start_in_screen;
 #if defined(HAVE_RTC_ALARM) && \
     (defined(HAVE_RECORDING) || CONFIG_TUNER)
Index: apps/menus/sound_menu.c
===================================================================
--- apps/menus/sound_menu.c	(revision 29795)
+++ apps/menus/sound_menu.c	(working copy)
@@ -39,6 +39,9 @@
 /***********************************/
 /*    SOUND MENU                   */
 MENUITEM_SETTING(volume, &global_settings.volume, NULL);
+#if defined(COWON_D2) && !defined (SIMULATOR)
+MENUITEM_SETTING(wm8985_dcvdd_vcode, &global_settings.wm8985_dcvdd_vcode, NULL);
+#endif
 #ifdef AUDIOHW_HAVE_BASS
 MENUITEM_SETTING(bass, &global_settings.bass,
 #ifdef HAVE_SW_TONE_CONTROLS
@@ -160,6 +163,9 @@
 
 MAKE_MENU(sound_settings, ID2P(LANG_SOUND_SETTINGS), NULL, Icon_Audio,
           &volume
+#if defined(COWON_D2) && !defined (SIMULATOR)
+          ,&wm8985_dcvdd_vcode
+#endif
 #ifdef AUDIOHW_HAVE_BASS
           ,&bass
 #endif
Index: apps/talk.c
===================================================================
--- apps/talk.c	(revision 29795)
+++ apps/talk.c	(working copy)
@@ -1091,6 +1091,8 @@
             = VOICE_KBIT_PER_SEC,
         [UNIT_PM_TICK]
             = VOICE_PM_UNITS_PER_TICK,
+        [UNIT_VOL]
+            = VOICE_VOLTS,
     };
 
     static const int pow10[] = { /* 10^0 - 10^7 */
Index: apps/settings_list.c
===================================================================
--- apps/settings_list.c	(revision 29795)
+++ apps/settings_list.c	(working copy)
@@ -532,10 +532,27 @@
     return get_hotkey_lang_id(value);
 }
 #endif /* HAVE_HOTKEY */
+/* wm8985_dcvdd formatter */
+#if defined(COWON_D2) && !defined (SIMULATOR)
+static const char* formatter_WM8985_voltage(char *buffer, size_t buffer_size,
+                                    int val, const char *unit)
+{
+    int whole_part = (val+9)/10;
+    int fraction = val+9-10*whole_part;
+    snprintf(buffer, buffer_size, "%d.%d %s", whole_part, fraction, unit);
+    return buffer;
+}
+#endif /* wm8985_dcvdd formatter */
 const struct settings_list settings[] = {
     /* sound settings */
     SOUND_SETTING(F_NO_WRAP,volume, LANG_VOLUME, "volume", SOUND_VOLUME),
     SOUND_SETTING(0, balance, LANG_BALANCE, "balance", SOUND_BALANCE),
+/* wm8985_dcvdd */
+#if defined(COWON_D2) && !defined (SIMULATOR)
+    INT_SETTING_NOWRAP(0, wm8985_dcvdd_vcode, LANG_WM8985_DCVDD,
+                9, "wm8985 dcvdd voltage", UNIT_VOL, 9, 24, 1,
+                formatter_WM8985_voltage, NULL, set_wm8985_dcvdd),
+#endif
 /* Tone controls */
 #ifdef AUDIOHW_HAVE_BASS
     SOUND_SETTING(F_NO_WRAP,bass, LANG_BASS, "bass", SOUND_BASS),
Index: apps/talk.h
===================================================================
--- apps/talk.h	(revision 29795)
+++ apps/talk.h	(working copy)
@@ -51,6 +51,7 @@
     UNIT_KBIT,    /* kilobits per sec */
     UNIT_PM_TICK, /* peak meter units per tick */
     UNIT_TIME,    /* time duration/interval in seconds, says hours,mins,secs */
+    UNIT_VOL,     /* voltage */
     UNIT_LAST     /* END MARKER */
 };
 
Index: firmware/target/arm/tcc780x/cowond2/power-cowond2.c
===================================================================
--- firmware/target/arm/tcc780x/cowond2/power-cowond2.c	(revision 29795)
+++ firmware/target/arm/tcc780x/cowond2/power-cowond2.c	(working copy)
@@ -181,3 +211,27 @@
 }
 
 #endif /* CONFIG_TUNER */
+
+void tweak_wm8985_voltage(unsigned char v)
+{
+    if (get_pmu_type() == PCF50606)
+    {
+        pcf50606_write(PCF5060X_D2REGC1, 0xe | v);
+    }
+    else
+    {
+        pcf50635_write(PCF5063X_REG_LDO5OUT, v);
+    }
+}
+
+int wm8985_dcvdd_limit(void)
+{
+    if (get_pmu_type() == PCF50606)
+    {
+        return pcf50606_read(PCF5060X_D3REGC1) & 0x1f;
+    }
+    else
+    {
+        return pcf50635_read(PCF5063X_REG_LDO1OUT) & 0x1f;
+    }
+}
Index: firmware/target/arm/tcc780x/cowond2/power-target.h
===================================================================
--- firmware/target/arm/tcc780x/cowond2/power-target.h	(revision 29795)
+++ firmware/target/arm/tcc780x/cowond2/power-target.h	(working copy)
@@ -28,5 +28,7 @@
 };
 
 enum pmu_type get_pmu_type(void);
+void tweak_wm8985_voltage(unsigned char v);
+int wm8985_dcvdd_limit(void);
 
 #endif /* _POWER_TARGET_H */
