Name: pulseaudio-modules-tizen
Summary: Pulseaudio modules for Tizen
-Version: 5.0.158
+Version: 5.0.159
Release: 0
Group: Multimedia/Audio
License: LGPL-2.1+
goto finish;
}
+ /* check vconf update here, volume will not be set if update fails */
+ if ((ret = update_volume_vconf(type, level))) {
+ pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_ERROR_INTERNAL], DBUS_TYPE_INVALID));
+ goto finish;
+ }
+
if ((ret = set_volume_level_by_type(m, stream_type, type, level)))
pa_assert_se(dbus_message_append_args(reply, DBUS_TYPE_STRING, &stream_manager_dbus_ret_str[RET_MSG_ERROR_INTERNAL], DBUS_TYPE_INVALID));
else
#endif
}
-#endif
\ No newline at end of file
+#endif
int32_t set_volume_mute_by_idx(pa_stream_manager *m, stream_type_t stream_type, uint32_t stream_idx, bool volume_mute);
int32_t set_volume_mute_with_new_data(pa_stream_manager *m, void *stream, stream_type_t stream_type, bool volume_mute);
int32_t get_volume_mute_by_idx(pa_stream_manager *m, stream_type_t stream_type, uint32_t stream_idx, bool *volume_mute);
+int32_t update_volume_vconf(const char *type, unsigned int value);
#endif
return 0;
}
+int32_t update_volume_vconf(const char *type, unsigned int value)
+{
+ char str[128];
+
+ pa_snprintf(str, sizeof(str), "%s%s", VCONFKEY_OUT_VOLUME_PREFIX, type);
+
+ /* Set volume value to VCONF */
+ if ((vconf_set_int(str, value)) != 0) {
+ pa_log_error("vconf_set_int(%s) failed...errno(%d)",
+ str, vconf_get_ext_errno());
+ return -1;
+ }
+
+ pa_log_info("volume set type(%s) value(%d)", str, value);
+
+ return 0;
+}
+
int32_t set_volume_level_by_type(pa_stream_manager *m, stream_type_t stream_type, const char *volume_type, uint32_t volume_level) {
bool is_hal_volume = false;
volume_info *v = NULL;