Add new device type - SOUND_DEVICE_NETWORK 76/208076/4
authorSangchul Lee <sc11.lee@samsung.com>
Tue, 18 Jun 2019 01:44:48 +0000 (10:44 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Wed, 19 Jun 2019 03:02:19 +0000 (12:02 +0900)
SOUND_DEVICE_NETWORK type is newly added to support network audio
devices. Even though there might be different kinds of network
audio protocols, user would be notified by this new device type.
The name property of the device would be a hint to distinguish
each network device.

[Version] 0.5.27
[Issue Type] New feature

Change-Id: I01551e307d7d086b6aac090a7e39ffb20353240c
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
include/sound_manager.h
packaging/capi-media-sound-manager.spec
src/sound_manager_private.c

index 0c26d61c8cb2e6214327fb45bd65ac3d5d497bd6..f7bcbb4b7123cb70e54378f78db6f54f4deddf6f 100644 (file)
@@ -189,6 +189,7 @@ typedef enum {
        SOUND_DEVICE_FORWARDING,        /**< Device for forwarding (Since 3.0) */
        SOUND_DEVICE_USB_AUDIO,         /**< USB Audio */
        SOUND_DEVICE_BLUETOOTH_VOICE,   /**< Bluetooth device representing voice (SCO) profile (Since 3.0) */
+       SOUND_DEVICE_NETWORK,           /**< Network (Since 5.5) */
 } sound_device_type_e;
 
 /**
index e7aabc507790ef29f71cec0d1a888b5603bf0fa7..2ee03a661ca7327cce42b70d951dde5310ad2c3c 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-sound-manager
 Summary:    Sound Manager library
-Version:    0.5.26
+Version:    0.5.27
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 3a47466da3aa90cc211178215598cf7ef3ecce5f..c6928a61a257f468917f6d68cd5cc5fa48c57e69 100644 (file)
@@ -447,6 +447,9 @@ int _convert_device_type_enum_to_str(sound_device_type_e device_type, char **dev
        case SOUND_DEVICE_FORWARDING:
                *device_type_str = "forwarding";
                break;
+       case SOUND_DEVICE_NETWORK:
+               *device_type_str = "network";
+               break;
        default:
                LOGE("could not find the device_type[%d] in this switch case statement", device_type);
                return MM_ERROR_SOUND_INTERNAL;
@@ -486,6 +489,9 @@ int _convert_device_type_str_to_enum(const char *device_type_str, sound_device_t
        } else if (!strncmp(device_type_str, "bt-sco", SOUND_DEVICE_TYPE_LEN)) {
                *device_type = SOUND_DEVICE_BLUETOOTH_VOICE;
 
+       } else if (!strncmp(device_type_str, "network", SOUND_DEVICE_TYPE_LEN)) {
+               *device_type = SOUND_DEVICE_NETWORK;
+
        } else {
                LOGE("not supported device_type(%s)", device_type_str);
                return MM_ERROR_INVALID_ARGUMENT;
@@ -526,6 +532,9 @@ int _convert_device_type(mm_sound_device_type_e device_type, sound_device_type_e
        case MM_SOUND_DEVICE_TYPE_MIRRORING:
                *sound_device_type = SOUND_DEVICE_FORWARDING;
                break;
+       case MM_SOUND_DEVICE_TYPE_NETWORK:
+               *sound_device_type = SOUND_DEVICE_NETWORK;
+               break;
        default:
                LOGE("not supported device_type(%d)", device_type);
                return MM_ERROR_INVALID_ARGUMENT;