stream-manager: Check streams including requesting one to update the next highest... 06/110806/1
authorSangchul Lee <sc11.lee@samsung.com>
Tue, 17 Jan 2017 04:35:50 +0000 (13:35 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Wed, 18 Jan 2017 06:12:12 +0000 (22:12 -0800)
[Version] 5.0.126
[Profile] Common
[Issue Type] Bug fix

Change-Id: I1988c47fdfee09a64f177095a5bc3066b2c20358
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
(cherry picked from commit 177df11921da7310328f5f8202866984c64a57e2)

packaging/pulseaudio-modules-tizen.spec
src/stream-manager-priv.h
src/stream-manager.c

index 95dd7d1..6a4b9f9 100644 (file)
@@ -1,6 +1,6 @@
 Name:             pulseaudio-modules-tizen
 Summary:          Pulseaudio modules for Tizen
-Version:          5.0.125
+Version:          5.0.126
 Release:          0
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
index 6464171..114de89 100644 (file)
@@ -99,6 +99,14 @@ typedef struct _stream_restrictions {
     bool block_recording_media;
 } stream_restrictions;
 
+typedef struct _stream_parent {
+    pa_idxset *idx_sink_inputs;
+    pa_idxset *idx_source_outputs;
+    pa_idxset *idx_route_in_devices;
+    pa_idxset *idx_route_out_devices;
+    focus_acquired_status_t focus_status;
+} stream_parent;
+
 struct _stream_manager {
     pa_core *core;
     pa_hal_interface *hal;
index d89b3fd..da63680 100644 (file)
@@ -441,14 +441,6 @@ const char* notify_command_type_str[] = {
 #define STREAM_MAP_STREAM_AVAIL_OUT_DEVICES "avail-out-devices"
 #define STREAM_MAP_STREAM_AVAIL_FRAMEWORKS "avail-frameworks"
 
-typedef struct _stream_parent {
-    pa_idxset *idx_sink_inputs;
-    pa_idxset *idx_source_outputs;
-    pa_idxset *idx_route_in_devices;
-    pa_idxset *idx_route_out_devices;
-    focus_acquired_status_t focus_status;
-} stream_parent;
-
 #define AVAIL_DEVICES_MAX 16
 #define AVAIL_FRAMEWORKS_MAX 16
 #define AVAIL_STREAMS_MAX 32
@@ -2384,7 +2376,7 @@ static bool update_the_highest_priority_stream(pa_stream_manager *m, process_com
             }
             /* find the next highest priority input */
             PA_IDXSET_FOREACH(i, streams, idx) {
-                if (i == mine)
+                if (command == PROCESS_COMMAND_CHANGE_ROUTE_BY_STREAM_ENDED && i == mine)
                     continue;
                 if (!(_role = pa_proplist_gets(GET_STREAM_PROPLIST(i, type), PA_PROP_MEDIA_ROLE))) {
                     pa_log_error("failed to pa_proplist_gets() for role");