diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java
index 5f591fe..6172710 100644
--- a/fmapp2/src/com/caf/fmradio/FMRadioService.java
+++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java
@@ -399,9 +399,6 @@
                   "or Already devcie loop back is acive, not enabling audio");
                 return false;
             }
-            if (mReceiver.isCherokeeChip() && (mPref.getBoolean("SLIMBUS_SEQ", true))) {
-                enableSlimbus(ENABLE_SLIMBUS_DATA_PORT);
-            }
             String status = audioManager.getParameters("fm_status");
             Log.d(LOGTAG," FM hardwareLoopback Status = " + status);
             if (status.contains("1")) {
@@ -839,6 +836,9 @@
       if (isFmOn()) {
           setLowPowerMode(false);
           startFM();
+          if (mReceiver.isCherokeeChip() && (mPref.getBoolean("SLIMBUS_SEQ", true))) {
+              enableSlimbus(ENABLE_SLIMBUS_DATA_PORT);
+          }
       }
    }
 
@@ -1606,8 +1606,13 @@
                           break;
                       }
 
-                      if(false == mPlaybackInProgress)
+                      if(false == mPlaybackInProgress) {
                           startFM();
+                          if (mReceiver.isCherokeeChip() &&
+                                (mPref.getBoolean("SLIMBUS_SEQ", true))) {
+                              enableSlimbus(ENABLE_SLIMBUS_DATA_PORT);
+                          }
+                      }
                       mSession.setActive(true);
                       break;
                   default:
@@ -2377,6 +2382,9 @@
          else
          {
            if (mReceiver.isCherokeeChip()) {
+               if (mPref.getBoolean("SLIMBUS_SEQ", true)) {
+                   enableSlimbus(ENABLE_SLIMBUS_DATA_PORT);
+               }
                bStatus = fmTurnOnSequenceCherokee();
            } else {
                bStatus = fmTurnOnSequence();
@@ -2397,10 +2405,6 @@
       if(audioManager != null)
       {
          Log.d(LOGTAG, "audioManager.setFmRadioOn = false \n" );
-         if ((mReceiver != null) && mReceiver.isCherokeeChip() &&
-                     (mPref.getBoolean("SLIMBUS_SEQ", true))) {
-              enableSlimbus(DISABLE_SLIMBUS_DATA_PORT);
-         }
          stopFM();
          unMute();
          // If call is active, we will use audio focus to resume fm after call ends.
@@ -3996,6 +4000,9 @@
            audioManager.requestAudioFocus(mAudioFocusListener, AudioManager.STREAM_MUSIC,
                   AudioManager.AUDIOFOCUS_GAIN_TRANSIENT);
            startFM();
+           if (mReceiver.isCherokeeChip() && (mPref.getBoolean("SLIMBUS_SEQ", true))) {
+              enableSlimbus(ENABLE_SLIMBUS_DATA_PORT);
+           }
            mStoppedOnFocusLoss = false;
        }
    }
