From: Sangchul Lee Date: Tue, 18 Jun 2019 01:44:48 +0000 (+0900) Subject: Add new device type - SOUND_DEVICE_NETWORK X-Git-Tag: submit/tizen/20190625.071416^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d216fe464f26d9dd6b1319bb07fd5dc1f0643f8c;p=platform%2Fcore%2Fapi%2Fsound-manager.git Add new device type - SOUND_DEVICE_NETWORK 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 --- diff --git a/include/sound_manager.h b/include/sound_manager.h index 0c26d61..f7bcbb4 100644 --- a/include/sound_manager.h +++ b/include/sound_manager.h @@ -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; /** diff --git a/packaging/capi-media-sound-manager.spec b/packaging/capi-media-sound-manager.spec index e7aabc5..2ee03a6 100644 --- a/packaging/capi-media-sound-manager.spec +++ b/packaging/capi-media-sound-manager.spec @@ -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 diff --git a/src/sound_manager_private.c b/src/sound_manager_private.c index 3a47466..c6928a6 100644 --- a/src/sound_manager_private.c +++ b/src/sound_manager_private.c @@ -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;