diff --git a/hal/AudioDevice.cpp b/hal/AudioDevice.cpp
index 1ea826f..98e1593 100644
--- a/hal/AudioDevice.cpp
+++ b/hal/AudioDevice.cpp
@@ -35,7 +35,7 @@
  *
  * Changes from Qualcomm Innovation Center are provided under the following license:
  *
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022, 2024 Qualcomm Innovation Center, Inc. All rights reserved.
  * SPDX-License-Identifier: BSD-3-Clause-Clear
  */
 
@@ -144,6 +144,11 @@
                                                   | ORIENTATION) | GEOMETRIC_LOCATION) */
 };
 
+enum {
+    DISPLAYPORT_CONTROLLER = 0,
+    HDMI_CONTROLLER = 1,
+};
+
 static bool hdr_set_parameters(std::shared_ptr<AudioDevice> adev,
     struct str_parms *parms) {
 
@@ -1752,6 +1757,7 @@
             AudioExtn::get_controller_stream_from_params(parms, &controller, &stream);
             param_device_connection.device_config.dp_config.controller = controller;
             param_device_connection.device_config.dp_config.stream = stream;
+            dp_controller = controller;
             dp_stream = stream;
             AHAL_INFO("plugin device cont %d stream %d", controller, stream);
         }
@@ -2241,20 +2247,28 @@
         auto it = android_device_map_.find(hal_device_id);
         if (it != android_device_map_.end() &&
                 audio_is_input_device(it->first) == audio_is_input_device(hal_device_id)) {
-            AHAL_DBG("Found haldeviceId: %x and PAL Device ID %d",
-                    it->first, it->second);
             if (it->second == PAL_DEVICE_OUT_AUX_DIGITAL ||
                     it->second == PAL_DEVICE_OUT_HDMI) {
                AHAL_DBG("dp_controller: %d dp_stream: %d",
                        dp_controller, dp_stream);
-               if (dp_controller * MAX_STREAMS_PER_CONTROLLER + dp_stream) {
-                  pal_device_id[device_count] = PAL_DEVICE_OUT_AUX_DIGITAL_1;
-               } else {
-                  pal_device_id[device_count] = it->second;
+
+               switch (dp_controller) {
+                   case DISPLAYPORT_CONTROLLER :
+                       if (dp_stream == 0)
+                           pal_device_id[device_count] = it->second;
+                       else
+                           pal_device_id[device_count] = PAL_DEVICE_OUT_AUX_DIGITAL_1;
+                       break;
+                   case HDMI_CONTROLLER :
+                       pal_device_id[device_count] = PAL_DEVICE_OUT_HDMI;
+                       break;
                }
             } else {
                pal_device_id[device_count] = it->second;
             }
+
+            AHAL_DBG("Found haldeviceId: %x and PAL Device ID %d",
+                    it->first, pal_device_id[device_count]);
         }
         ++device_count;
     }
diff --git a/hal/AudioStream.cpp b/hal/AudioStream.cpp
index 3c88c56..3317237 100644
--- a/hal/AudioStream.cpp
+++ b/hal/AudioStream.cpp
@@ -30,7 +30,7 @@
 /*
  *  Changes from Qualcomm Innovation Center are provided under the following license:
  *
- *  Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ *  Copyright (c) 2022-2023, 2024 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
@@ -2564,10 +2564,11 @@
 
     ret = AudioExtn::get_controller_stream_from_params(parms, &controller, &stream);
     if (ret >= 0) {
-        adevice->dp_controller = controller;
-        adevice->dp_stream = stream;
-        if (stream >= 0 || controller >= 0)
+        if (stream >= 0 && controller >= 0) {
+            adevice->dp_controller = controller;
+            adevice->dp_stream = stream;
             AHAL_INFO("ret %d, plugin device cont %d stream %d", ret, controller, stream);
+        }
     } else {
         AHAL_ERR("error %d, failed to get stream and controller", ret);
     }
