diff --git a/SoundTriggerSession.cpp b/SoundTriggerSession.cpp
index 2dfa978..62a15f6 100644
--- a/SoundTriggerSession.cpp
+++ b/SoundTriggerSession.cpp
@@ -81,7 +81,7 @@
 SoundTriggerSession::SoundTriggerSession(sound_model_handle_t handle,
                                          audio_hw_call_back_t callback)
 {
-    state_ = IDLE;
+    UpdateState(IDLE);
     sm_handle_ = handle;
     rec_config_payload_ = nullptr;
     rec_config_ = nullptr;
@@ -91,8 +91,9 @@
 
 SoundTriggerSession::~SoundTriggerSession()
 {
-    if (pal_handle_ && state_ != IDLE)
+    if (pal_handle_ && IsState(IDLE))
         pal_stream_close(pal_handle_);
+
     pal_handle_ = nullptr;
 
     if (rec_config_payload_) {
@@ -140,9 +141,9 @@
      */
     do {
         lock_status = session->ses_mutex_.try_lock();
-    } while(!lock_status && (session->state_ == ACTIVE));
+    } while(!lock_status && session->IsState(ACTIVE));
 
-    if (session->state_ != ACTIVE) {
+    if (!session->IsState(ACTIVE)) {
         ALOGW("%s: skip notification as client has stopped", __func__);
         goto exit;
     }
@@ -228,13 +229,10 @@
 
     // callback to SoundTriggerService
     session->GetRecognitionCallback(&callback);
-    session->ses_mutex_.unlock();
-    lock_status = false;
     ATRACE_BEGIN("sthal: client detection callback");
-    if (session->state_ == ACTIVE)
-        callback(st_event, session->GetCookie());
-    else
-        ALOGW("%s: skip detection callback as client has stopped", __func__);
+
+    callback(st_event, session->GetCookie());
+
     ATRACE_END();
 
 exit:
@@ -318,6 +316,7 @@
     int status = 0;
 
     ALOGV("%s: Enter", __func__);
+    UpdateState(STOPPING);
 
     // deregister from audio hal
     RegisterHalEvent(false);
@@ -335,7 +334,7 @@
     }
     rec_config_ = nullptr;
 
-    state_ = STOPPED;
+    UpdateState(STOPPED);
     ALOGV("%s: Exit, status = %d", __func__, status);
 
     return status;
@@ -485,7 +484,7 @@
         goto exit;
     }
 
-    state_ = LOADED;
+    UpdateState(LOADED);
 
 exit:
     if (param_payload)
@@ -501,7 +500,7 @@
 
     ALOGV("%s: Enter", __func__);
     std::lock_guard<std::mutex> lck(ses_mutex_);
-    if (state_ == ACTIVE) {
+    if (IsState(ACTIVE)) {
         status = StopRecognition_l();
         if (status) {
             ALOGE("%s: error, failed to stop recognition, status = %d",
@@ -521,7 +520,7 @@
     }
     rec_config_ = nullptr;
 
-    state_ = IDLE;
+    UpdateState(IDLE);
 
     ALOGV("%s: Exit, status = %d", __func__, status);
 
@@ -609,7 +608,7 @@
               __func__, status);
         goto exit;
     }
-    state_ = ACTIVE;
+    UpdateState(ACTIVE);
 
     // register to audio hal
     RegisterHalEvent(true);
@@ -633,23 +632,8 @@
     ALOGV("%s: Enter", __func__);
     std::lock_guard<std::mutex> lck(ses_mutex_);
 
-    // deregister from audio hal
-    RegisterHalEvent(false);
+    StopRecognition_l();
 
-    // stop pal stream
-    status = pal_stream_stop(pal_handle_);
-    if (status) {
-        ALOGE("%s: error, failed to stop pal stream, status = %d",
-              __func__, status);
-    }
-
-    if (rec_config_payload_) {
-        free(rec_config_payload_);
-        rec_config_payload_ = nullptr;
-    }
-    rec_config_ = nullptr;
-
-    state_ = STOPPED;
     ALOGV("%s: Exit, status = %d", __func__, status);
 
     return status;
@@ -739,4 +723,3 @@
 {
     *callback = rec_callback_;
 }
-
diff --git a/SoundTriggerSession.h b/SoundTriggerSession.h
index 29236b7..79dfc86 100644
--- a/SoundTriggerSession.h
+++ b/SoundTriggerSession.h
@@ -26,6 +26,37 @@
  * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
  * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
+/* Changes from Qualcomm Innovation Center are provided under the following license:
+ *
+ * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted (subject to the limitations in the
+ * disclaimer below) provided that the following conditions are met:
+ *   * Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ *   * Redistributions in binary form must reproduce the above
+ *     copyright notice, this list of conditions and the following
+ *     disclaimer in the documentation and/or other materials provided
+ *     with the distribution.
+ *   * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
+ *     contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
+ * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
+ * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+ * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
+ */
 
 #ifndef SOUND_TRIGGER_SESSION_H
 #define SOUND_TRIGGER_SESSION_H
@@ -71,6 +102,8 @@
  protected:
     int OpenPALStream(pal_stream_type_t stream_type);
     bool IsACDSoundModel(struct sound_trigger_sound_model *sound_model);
+    bool IsState(session_state_t state) { return state_ == state; } //Call this with session mutex
+    void UpdateState(session_state_t state) { state_ = state; } //Call this with session mutex
     void RegisterHalEvent(bool is_register);
     static int pal_callback(pal_stream_handle_t *stream_handle,
         uint32_t event_id, uint32_t *event_data,
@@ -88,4 +121,4 @@
     std::mutex ses_mutex_;
 };
 
-#endif  // SOUND_TRIGGER_SESSION_H
\ No newline at end of file
+#endif  // SOUND_TRIGGER_SESSION_H
