tizenaudio-policy: Fix codes to select source properly in case of loading module... 18/75918/1 accepted/tizen/common/20160703.130259 accepted/tizen/ivi/20160630.063334 accepted/tizen/mobile/20160630.063358 accepted/tizen/tv/20160630.063316 accepted/tizen/wearable/20160630.063254 submit/tizen/20160630.022953 submit/tizen_common/20160701.180000
authorSangchul Lee <sc11.lee@samsung.com>
Wed, 22 Jun 2016 06:17:11 +0000 (15:17 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Wed, 22 Jun 2016 06:35:48 +0000 (15:35 +0900)
[Version] 5.0.59
[Profile] Common
[Issue Type] Bug fix

Change-Id: I8d39cefbd66eaf363553da9534ffe1188d79e1ca
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/pulseaudio-modules-tizen.spec
src/module-tizenaudio-policy.c

index 10cc12f..0e9b806 100644 (file)
@@ -1,6 +1,6 @@
 Name:             pulseaudio-modules-tizen
 Summary:          Pulseaudio modules for Tizen
-Version:          5.0.58
+Version:          5.0.59
 Release:          0
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
index b9022e2..a095937 100644 (file)
@@ -909,9 +909,9 @@ static pa_hook_result_t route_change_hook_cb(pa_core *c, pa_stream_manager_hook_
                         }
                         /* Check for in/out devices in case of loopback */
                         if (pa_streq(data->stream_role, STREAM_ROLE_LOOPBACK)) {
-                            if (dm_device_direction & DM_DEVICE_DIRECTION_OUT)
+                            if ((data->stream_type == STREAM_SINK_INPUT) && (dm_device_direction & DM_DEVICE_DIRECTION_OUT))
                                 u->loopback_args.sink = pa_device_manager_get_sink(device, DEVICE_ROLE_NORMAL);
-                            else if (dm_device_direction & DM_DEVICE_DIRECTION_IN)
+                            else if ((data->stream_type == STREAM_SOURCE_OUTPUT) && (dm_device_direction & DM_DEVICE_DIRECTION_IN))
                                 u->loopback_args.source = pa_device_manager_get_source(device, DEVICE_ROLE_NORMAL);
                         }