stream-manager: Call pa_hal_interface_update_route_option() even if there's no occupi... 71/146471/1 accepted/tizen/unified/20170901.201017 submit/tizen/20170901.030803
authorSangchul Lee <sc11.lee@samsung.com>
Mon, 28 Aug 2017 07:19:26 +0000 (16:19 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Mon, 28 Aug 2017 07:44:01 +0000 (16:44 +0900)
[Version] 5.0.170
[Issue Type] Enhancement

Change-Id: Iba0b4fc98a5c2f05374498ed18ca3efe58224ab9
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/pulseaudio-modules-tizen.spec
src/stream-manager.c

index 1673eacfea6cf1561195dc4f0f332db0b15df093..73f18cca720c41a4048f020dbc5b35f5d3c44de6 100644 (file)
@@ -1,6 +1,6 @@
 Name:             pulseaudio-modules-tizen
 Summary:          Pulseaudio modules for Tizen
-Version:          5.0.169
+Version:          5.0.170
 Release:          0
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
index 42616f7611fe9e24da5a59fb0ff21f4216b8f69a..580f3654864e339c28fb9bac0f78f75322953da1 100644 (file)
@@ -1663,17 +1663,14 @@ BREAK_WITH_FREE:
         memset(&route_option, 0, sizeof(hal_route_option));
         s = (type == STREAM_SINK_INPUT) ? (void*)(m->cur_highest_priority.sink_input) :
                                           (void*)(m->cur_highest_priority.source_output);
-        if (s) {
+        /* route_option.role can be null if there's no occupied stream */
+        if (s)
             route_option.role = (type == STREAM_SINK_INPUT) ? (m->cur_highest_priority.role_si) :
-                                                                              (m->cur_highest_priority.role_so);
-            route_option.name = ((stream_route_option*)user_data)->name;
-            route_option.value = ((stream_route_option*)user_data)->value;
-            if (pa_hal_interface_update_route_option(m->hal, &route_option))
-                ret = RET_MSG_ERROR_INTERNAL;
-        } else {
-            pa_log_warn("there's no occupied stream, skip updating route option");
-            ret = RET_MSG_ERROR_NO_STREAM;
-        }
+                                                              (m->cur_highest_priority.role_so);
+        route_option.name = ((stream_route_option*)user_data)->name;
+        route_option.value = ((stream_route_option*)user_data)->value;
+        if (pa_hal_interface_update_route_option(m->hal, &route_option))
+            ret = RET_MSG_ERROR_INTERNAL;
         break;
     }
     case NOTIFY_COMMAND_INFORM_STREAM_CONNECTED: