diff --git a/ipc/HwBinders/agm_ipc_client/src/agm_client_wrapper.cpp b/ipc/HwBinders/agm_ipc_client/src/agm_client_wrapper.cpp
index 49860a0..ac58347 100644
--- a/ipc/HwBinders/agm_ipc_client/src/agm_client_wrapper.cpp
+++ b/ipc/HwBinders/agm_ipc_client/src/agm_client_wrapper.cpp
@@ -1,6 +1,5 @@
 /*
  * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -28,38 +27,10 @@
  * 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.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * SPDX-License-Identifier: BSD-3-Clause-Clear
  */
+
 #define LOG_TAG "agm_client_wrapper"
 
 #include <cutils/list.h>
@@ -106,8 +77,6 @@
     agm_server_died = true;
     if (cb_ != NULL)
         cb_(cookie_);
-    // We exit the client process here, so that it also can restart
-    // leading to a fresh start on both the sides.
 }
 
 android::sp<IAGM> get_agm_server() {
diff --git a/plugins/tinyalsa/src/agm_pcm_plugin.c b/plugins/tinyalsa/src/agm_pcm_plugin.c
index 92561fc..52cc4ec 100644
--- a/plugins/tinyalsa/src/agm_pcm_plugin.c
+++ b/plugins/tinyalsa/src/agm_pcm_plugin.c
@@ -709,8 +709,11 @@
 {
     struct agm_pcm_priv *priv = plugin->priv;
     snd_pcm_sframes_t avail = 0;
+    enum direction dir;
 
-    if (plugin->mode & PCM_OUT) {
+    dir = (plugin->mode & PCM_IN) ? TX : RX;
+
+    if (dir == RX) {
         avail = priv->pos_buf->hw_ptr +
             priv->total_size_frames -
             priv->pos_buf->appl_ptr;
@@ -719,7 +722,7 @@
             avail += priv->pos_buf->boundary;
         else if ((snd_pcm_uframes_t)avail >= priv->pos_buf->boundary)
             avail -= priv->pos_buf->boundary;
-    } else if (plugin->mode & PCM_IN) {
+    } else if (dir == TX) {
         __builtin_sub_overflow(priv->pos_buf->hw_ptr, priv->pos_buf->appl_ptr, &avail);
         if (avail < 0)
             avail += priv->pos_buf->boundary;
diff --git a/service/src/device.c b/service/src/device.c
index 78a3679..e59f640 100644
--- a/service/src/device.c
+++ b/service/src/device.c
@@ -1,6 +1,5 @@
 /*
 ** Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
-** Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 **
 ** Redistribution and use in source and binary forms, with or without
 ** modification, are permitted provided that the following conditions are
@@ -26,6 +25,10 @@
 ** 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.
+**
+** Changes from Qualcomm Innovation Center are provided under the following license:
+** Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+** SPDX-License-Identifier: BSD-3-Clause-Clear
 **/
 
 #define LOG_TAG "AGM: device"
@@ -34,7 +37,6 @@
 #include <pthread.h>
 #include <sched.h>
 #include <stdio.h>
-#include <fcntl.h>
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
@@ -63,9 +65,6 @@
 #define TRUE 1
 #define FALSE 0
 
-#define DEVICE_ENABLE 1
-#define DEVICE_DISABLE 0
-
 #define BUF_SIZE 1024
 #define FILE_PATH_EXTN_MAX_SIZE 80
 #define MAX_RETRY_CNT 20
@@ -83,9 +82,6 @@
 static struct mixer *mixer = NULL;
 #endif
 
-#define SYSFS_FD_PATH "/sys/kernel/aud_dev/state"
-static int sysfs_fd = -1;
-
 #define MAX_BUF_SIZE                 2048
 /**
   * The maximum period bytes for dummy dai is 8192 bytes.
@@ -150,36 +146,6 @@
      return bits_per_sample;
 }
 
-static void update_sysfs_fd (int8_t pcm_id, int8_t state)
-{
-    char buf[MAX_USR_INPUT]={0};
-    snprintf(buf, MAX_USR_INPUT,"%d %d", pcm_id, state);
-    if (sysfs_fd >= 0)
-        write(sysfs_fd, buf, MAX_USR_INPUT);
-    else {
-        /*AGM service and sysfs file creation are async events.
-         *Also when the syfs node is first created the default
-         *user attribute for the sysfs file is root.
-         *To change the same we need to execute a command from
-         *init scripts, which again are async and there is no
-         *deterministic way of scheduling this command only after
-         *the sysfs node is created. And all this should happen before
-         *we try to open the file from agm context, otherwise the open
-         *call would fail with permission denied error.
-         *Hence we try to open the file first time when we access it instead
-         *of doing it from agm_init.
-         *This gives the system enough time for the file attributes to
-         *be changed.
-         */
-        sysfs_fd = open(SYSFS_FD_PATH, O_WRONLY);
-        if (sysfs_fd >= 0) {
-            write(sysfs_fd, buf, MAX_USR_INPUT);
-        } else {
-            AGM_LOGE("invalid file handle\n");
-        }
-    }
-}
-
 int device_get_snd_card_id()
 {
     struct device_obj *dev_obj = node_to_item(list_head(&device_list),
@@ -297,8 +263,6 @@
                  __func__, pcm_name, rate, channels, format);
         goto done;
     }
-
-    update_sysfs_fd(obj->pcm_id, DEVICE_ENABLE);
     obj->pcm = pcm;
     obj->state = DEV_OPENED;
     obj->refcnt.open++;
@@ -413,7 +377,6 @@
         ret = -EIO;
         goto done;
     }
-    update_sysfs_fd(obj->pcm_id, DEVICE_ENABLE);
     obj->pcm = pcm;
     obj->state = DEV_OPENED;
     obj->refcnt.open++;
@@ -587,7 +550,6 @@
     }
 
     if (--obj->refcnt.open == 0) {
-        update_sysfs_fd(obj->pcm_id, DEVICE_DISABLE);
 #ifdef DEVICE_USES_ALSALIB
         ret = snd_pcm_close(obj->pcm);
 #else
@@ -1174,9 +1136,6 @@
 
     list_remove(&device_group_data_list);
     list_remove(&device_list);
-    if (sysfs_fd >= 0)
-        close(sysfs_fd);
-    sysfs_fd = -1;
 
 #ifdef DEVICE_USES_ALSALIB
     if (mixer)
