device-manager: Get device item with sink/source 27/48627/2
authorMok Jeongho <jho.mok@samsung.com>
Thu, 24 Sep 2015 03:23:46 +0000 (12:23 +0900)
committerMok Jeongho <jho.mok@samsung.com>
Thu, 24 Sep 2015 04:35:10 +0000 (13:35 +0900)
[Version] pulseaudio 5.0-41
[Profile] Common

Change-Id: I7a0fa6b53a3756cd9a92b2433b4c68980ca7998b

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

index 83d0ddf2737d7f9885265395cafe49f0fe37cf11..4aeec97e67fd4342679ed9a0c367c62bb2663e39 100644 (file)
@@ -4,7 +4,7 @@
 Name:             pulseaudio-modules-tizen
 Summary:          Improved Linux sound server
 Version:          5.0
-Release:          40
+Release:          41
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
 URL:              http://pulseaudio.org
index 361b2ea856fdaaa15111f2ccc3d9650fc8392a9a..dac853021a50166fd740ba46643bf6b5e3d01ce0 100644 (file)
@@ -3946,6 +3946,18 @@ pa_source* pa_device_manager_get_source(dm_device *device_item, const char *role
     return pa_hashmap_get(profile_item->capture_devices, role);
 }
 
+dm_device* pa_device_manager_get_device_with_sink(pa_sink *sink) {
+    pa_assert(sink);
+
+    return sink->device_item;
+}
+
+dm_device* pa_device_manager_get_device_with_source(pa_source *source) {
+    pa_assert(source);
+
+    return source->device_item;
+}
+
 void pa_device_manager_set_device_state(dm_device *device_item, dm_device_direction_t direction, dm_device_state_t state) {
     dm_device_profile *profile_item;
 
index a62d701ad35d54e7f4ee44503322c486f832b42d..b6f4c70a04b0ae87de853cf2abde5396ca82d335 100644 (file)
@@ -66,6 +66,8 @@ uint32_t pa_device_manager_get_device_id(dm_device *device);
 const char* pa_device_manager_get_device_type(dm_device *device);
 const char* pa_device_manager_get_device_subtype(dm_device *device);
 dm_device_direction_t pa_device_manager_get_device_direction(dm_device *device);
+dm_device* pa_device_manager_get_device_with_sink(pa_sink *sink);
+dm_device* pa_device_manager_get_device_with_source(pa_source *source);
 
 int pa_device_manager_load_sink(const char *device_type, const char *device_profile, const char *role, pa_device_manager *dm);
 int pa_device_manager_load_source(const char *device_type, const char *device_profile, const char *role, pa_device_manager *dm);