Index: apps/lang/english.lang
===================================================================
--- apps/lang/english.lang	(revision 29559)
+++ apps/lang/english.lang	(working copy)
@@ -2069,19 +2069,16 @@
 </phrase>
 <phrase>
   id: LANG_HEADPHONE_UNPLUG_RW
-  desc: in pause_phones_menu.
+  desc: deprecated
   user: core
   <source>
-    *: none
-    headphone_detection: "Duration to Rewind"
+    *: ""
   </source>
   <dest>
-    *: none
-    headphone_detection: "Duration to Rewind"
+    *: ""
   </dest>
   <voice>
-    *: none
-    headphone_detection: "Duration to Rewind"
+    *: ""
   </voice>
 </phrase>
 <phrase>
@@ -12744,3 +12741,18 @@
     *: "In custom directories only"
   </voice>
 </phrase>
+<phrase>
+  id: LANG_PAUSE_REWIND
+  desc: Seconds to rewind when rewind on pause is enabled.
+  user: core
+  <source>
+    *: "Rewind on Pause"
+  </source>
+  <dest>
+    *: "Rewind on Pause"
+  </dest>
+  <voice>
+    *: "Rewind on Pause"
+   </voice>
+ </phrase>
+
Index: apps/gui/wps.c
===================================================================
--- apps/gui/wps.c	(revision 29559)
+++ apps/gui/wps.c	(working copy)
@@ -119,6 +119,26 @@
     return skin_buf[screen];
 }
 
+void pause_action (bool may_fade, bool updatewps)
+{
+    int32_t newpos;
+    if (may_fade && global_settings.fade_on_stop)
+        fade (false, updatewps);
+    else
+        audio_pause();
+
+    newpos = audio_current_track()->elapsed - global_settings.pause_rewind * 1000;
+    audio_ff_rewind(newpos > 0 ? newpos : 0);
+}
+
+void unpause_action (bool may_fade, bool updatewps)
+{
+    if (may_fade && global_settings.fade_on_stop)
+        fade (true, updatewps);
+    else
+        audio_resume ();
+}        
+
 void fade(bool fade_in, bool updatewps)
 {
     int fp_global_vol = global_settings.volume << 8;
@@ -786,18 +806,12 @@
                 if ( state->paused )
                 {
                     state->paused = false;
-                    if ( global_settings.fade_on_stop )
-                        fade(true, true);
-                    else
-                        audio_resume();
+                    unpause_action(true, true);
                 }
                 else
                 {
                     state->paused = true;
-                    if ( global_settings.fade_on_stop )
-                        fade(false, true);
-                    else
-                        audio_pause();
+                    pause_action(true, true);
                     settings_save();
 #if !defined(HAVE_RTC_RAM) && !defined(HAVE_SW_POWEROFF)
                     call_storage_idle_notifys(true);   /* make sure resume info is saved */
Index: apps/gui/wps.h
===================================================================
--- apps/gui/wps.h	(revision 29559)
+++ apps/gui/wps.h	(working copy)
@@ -30,6 +30,10 @@
 
 void gui_sync_wps_init(void) INIT_ATTR;
 
+/* fade (if enabled) and pause the audio, optionally rewind a little */
+void pause_action (bool may_fade, bool updatewps);
+void unpause_action (bool may_fade, bool updatewps);
+
 /* fades the volume, e.g. on pause or stop */
 void fade(bool fade_in, bool updatewps);
 
Index: apps/settings.h
===================================================================
--- apps/settings.h	(revision 29559)
+++ apps/settings.h	(working copy)
@@ -482,9 +482,9 @@
     int touchpad_sensitivity;
 #endif
 
+    int  pause_rewind;    /* time in s to rewind when pausing */
 #ifdef HAVE_HEADPHONE_DETECTION
     int  unplug_mode; /* pause on headphone unplug */
-    int  unplug_rw; /* time in s to rewind when pausing */
     bool unplug_autoresume; /* disable auto-resume if no phones */
 #endif
 
Index: apps/menus/playback_menu.c
===================================================================
--- apps/menus/playback_menu.c	(revision 29559)
+++ apps/menus/playback_menu.c	(working copy)
@@ -169,10 +169,9 @@
 
 #ifdef HAVE_HEADPHONE_DETECTION
 MENUITEM_SETTING(unplug_mode, &global_settings.unplug_mode, NULL);
-MENUITEM_SETTING(unplug_rw, &global_settings.unplug_rw, NULL);
 MENUITEM_SETTING(unplug_autoresume, &global_settings.unplug_autoresume, NULL);
 MAKE_MENU(unplug_menu, ID2P(LANG_HEADPHONE_UNPLUG), 0, Icon_NOICON,
-          &unplug_mode, &unplug_rw, &unplug_autoresume);
+          &unplug_mode, &unplug_autoresume);
 #endif
 
 MENUITEM_SETTING(skip_length, &global_settings.skip_length, NULL);
@@ -180,6 +179,7 @@
 #if CONFIG_CODEC == SWCODEC
 MENUITEM_SETTING(resume_rewind, &global_settings.resume_rewind, NULL);
 #endif
+MENUITEM_SETTING(pause_rewind, &global_settings.pause_rewind, NULL);
 
 MAKE_MENU(playback_settings,ID2P(LANG_PLAYBACK),0,
           Icon_Playback_menu,
@@ -210,6 +210,7 @@
 #if CONFIG_CODEC == SWCODEC
           &resume_rewind,
 #endif
+          &pause_rewind,
          );
          
 static int playback_callback(int action,const struct menu_item_ex *this_item)
Index: apps/settings_list.c
===================================================================
--- apps/settings_list.c	(revision 29559)
+++ apps/settings_list.c	(working copy)
@@ -1537,13 +1537,13 @@
                    "pause on headphone unplug", "off,pause,pause and resume",
                    NULL, 3, ID2P(LANG_OFF), ID2P(LANG_PAUSE),
                    ID2P(LANG_HEADPHONE_UNPLUG_RESUME)),
-    INT_SETTING(0, unplug_rw, LANG_HEADPHONE_UNPLUG_RW, 0,
-                "rewind duration on pause", UNIT_SEC, 0, 15, 1, NULL, NULL,
-                NULL),
     OFFON_SETTING(0, unplug_autoresume,
                   LANG_HEADPHONE_UNPLUG_DISABLE_AUTORESUME, false,
                   "disable autoresume if phones not present",NULL),
 #endif
+    INT_SETTING(0, pause_rewind, LANG_PAUSE_REWIND, 0,
+                "rewind duration on pause", UNIT_SEC, 0, 15, 1, NULL, NULL,
+                NULL),
 #if CONFIG_TUNER
     CHOICE_SETTING(0, fm_region, LANG_FM_REGION, 0,
                    "fm_region", "eu,us,jp,kr,it,wo", set_radio_region, 6,
Index: apps/misc.c
===================================================================
--- apps/misc.c	(revision 29559)
+++ apps/misc.c	(working copy)
@@ -456,10 +456,7 @@
             if ((audio_status() & AUDIO_STATUS_PLAY) &&
                 !(audio_status() & AUDIO_STATUS_PAUSE))
             {
-                if (global_settings.fade_on_stop)
-                    fade(false, false);
-                else
-                    audio_pause();
+                pause_action (true, true);
             }
             waiting_to_resume_play = false;
         }
@@ -497,28 +494,18 @@
         int audio_stat = audio_status();
         if (inserted)
         {
+            backlight_on();
             if ((audio_stat & AUDIO_STATUS_PLAY) &&
                     headphone_caused_pause &&
                     global_settings.unplug_mode > 1 )
-                audio_resume();
-            backlight_on();
+                unpause_action(true, true);
             headphone_caused_pause = false;
         } else {
             if ((audio_stat & AUDIO_STATUS_PLAY) &&
                     !(audio_stat & AUDIO_STATUS_PAUSE))
             {
                 headphone_caused_pause = true;
-                audio_pause();
-
-                if (global_settings.unplug_rw)
-                {
-                    if (audio_current_track()->elapsed >
-                            (unsigned long)(global_settings.unplug_rw*1000))
-                        audio_ff_rewind(audio_current_track()->elapsed -
-                                (global_settings.unplug_rw*1000));
-                    else
-                        audio_ff_rewind(0);
-                }
+                pause_action (false, false);
             }
         }
     }
@@ -583,7 +570,7 @@
             return SYS_CHARGER_DISCONNECTED;
 
         case SYS_CAR_ADAPTER_RESUME:
-            audio_resume();
+            unpause_action (true, true);
             return SYS_CAR_ADAPTER_RESUME;
 #endif
 #ifdef HAVE_HOTSWAP_STORAGE_AS_MAIN
@@ -644,9 +631,9 @@
             if (status & AUDIO_STATUS_PLAY)
             {
                 if (status & AUDIO_STATUS_PAUSE)
-                    audio_resume();
+                    unpause_action (true, true);
                 else
-                    audio_pause();
+                    pause_action (true, true);
             }
             else
                 if (playlist_resume() != -1)
