In case of Voice verb with Bluetooth device, make this device alone 41/75141/1 accepted/tizen/mobile/20160629.015840 submit/tizen/20160623.063229 submit/tizen/20160627.065544
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 16 Jun 2016 22:42:46 +0000 (07:42 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 16 Jun 2016 22:43:46 +0000 (07:43 +0900)
[Version] 0.1.13
[Profile] Mobile
[Issue Type] Bug Fix

Change-Id: I8dceaf20f49d6153cd2b42d3e56e72cf7c6ba8c0
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/audio-hal-sc7727.spec
tizen-audio-impl-ucm.c

index 9bd0580..984a7b1 100644 (file)
@@ -1,6 +1,6 @@
 Name:       audio-hal-sc7727
 Summary:    TIZEN Audio HAL for SC7727
-Version:    0.1.12
+Version:    0.1.13
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index 23ce1a0..a15128f 100644 (file)
@@ -387,7 +387,18 @@ audio_return_t _ucm_set_devices(audio_hal_t *ah, const char *verb, const char *d
     __dump_use_case(UCM_PREFIX_CURRENT, old_verb, old_dev_list, old_dev_count, NULL, 0);
 
     if (devices) {
-        for (dev_count = 0; devices[dev_count]; dev_count++);
+        if (streq(verb, "Voice")) {
+            /* In case of Voice verb with Bluetooth device, make this device alone */
+            for (dev_count = 0; devices[dev_count]; dev_count++) {
+                if (streq(devices[dev_count], "Bluetooth")) {
+                    devices = &devices[dev_count];
+                    dev_count = 1;
+                    AUDIO_LOG_DEBUG("Voice verb with Bluetooth device only");
+                    break;
+                }
+            }
+        } else
+            for (dev_count = 0; devices[dev_count]; dev_count++);
     }
 
     __dump_use_case(UCM_PREFIX_REQUESTED, verb, devices, dev_count, NULL, 0);