Name: pulseaudio-modules-tizen
Summary: Pulseaudio modules for Tizen
-Version: 5.0.142
+Version: 5.0.143
Release: 0
Group: Multimedia/Audio
License: LGPL-2.1+
.receive_cb = handle_get_connected_device_list },
[METHOD_HANDLER_IS_STREAM_ON_DEVICE] = {
.method_name = "IsStreamOnDevice",
- .receive_cb = handle_is_stream_on_device},
+ .receive_cb = handle_is_stream_on_device },
[METHOD_HANDLER_GET_BT_A2DP_STATUS] = {
.method_name = "GetBTA2DPStatus",
.receive_cb = handle_get_bt_a2dp_status },
[METHOD_HANDLER_LOAD_SINK] = {
.method_name = "LoadSink",
- .receive_cb = handle_load_sink},
+ .receive_cb = handle_load_sink },
[METHOD_HANDLER_UNLOAD_SINK] = {
.method_name = "UnloadSink",
- .receive_cb = handle_unload_sink},
+ .receive_cb = handle_unload_sink },
[METHOD_HANDLER_UNLOAD_SINK_WITH_DEVICE_STRING] = {
.method_name = "UnloadSinkWithDeviceString",
- .receive_cb = handle_unload_sink_with_device_string},
+ .receive_cb = handle_unload_sink_with_device_string },
[METHOD_HANDLER_GET_DEVICE_STRING] = {
.method_name = "GetDeviceString",
- .receive_cb = handle_get_device_string},
+ .receive_cb = handle_get_device_string },
[METHOD_HANDLER_DUMP_DEVICE_LIST] = {
.method_name = "DumpDeviceList",
- .receive_cb = handle_dump_device_list},
+ .receive_cb = handle_dump_device_list },
[METHOD_HANDLER_STATUS_TEST] = {
.method_name = "TestStatusChange",
- .receive_cb = handle_test_device_status_change},
+ .receive_cb = handle_test_device_status_change },
};
#endif
/* PCM Dump */
#define PA_DUMP_INI_DEFAULT_PATH SYSCONFDIR"/multimedia/mmfw_audio_pcm_dump.ini" /* SYSCONFDIR is defined at .spec */
-#define PA_DUMP_INI_TEMP_PATH "/opt/system/mmfw_audio_pcm_dump.ini"
+#define PA_DUMP_INI_TEMP_PATH "/home/owner/media/mmfw_audio_pcm_dump.ini"
#define PA_DUMP_VCONF_KEY "memory/private/sound/pcm_dump"
-#define PA_DUMP_PLAYBACK_DECODER_OUT 0x00000001
-#define PA_DUMP_PLAYBACK_RESAMPLER_IN 0x00000008
-#define PA_DUMP_PLAYBACK_RESAMPLER_OUT 0x00000010
-#define PA_DUMP_CAPTURE_ENCODER_IN 0x80000000
typedef enum _device_type {
DEVICE_BUILTIN_SPEAKER,
}
}
- vconf_dump |= iniparser_getboolean(dict, "pcm_dump:decoder_out", 0) ? PA_DUMP_PLAYBACK_DECODER_OUT : 0;
- vconf_dump |= iniparser_getboolean(dict, "pcm_dump:resampler_in", 0) ? PA_DUMP_PLAYBACK_RESAMPLER_IN : 0;
- vconf_dump |= iniparser_getboolean(dict, "pcm_dump:resampler_out", 0) ? PA_DUMP_PLAYBACK_RESAMPLER_OUT : 0;
- vconf_dump |= iniparser_getboolean(dict, "pcm_dump:encoder_in", 0) ? PA_DUMP_CAPTURE_ENCODER_IN : 0;
- u->core->dump_sink = (bool)iniparser_getboolean(dict, "pcm_dump:pa_sink", 0);
- u->core->dump_sink_input = (bool)iniparser_getboolean(dict, "pcm_dump:pa_sink_input", 0);
- u->core->dump_source = (bool)iniparser_getboolean(dict, "pcm_dump:pa_source", 0);
- u->core->dump_source_output = (bool)iniparser_getboolean(dict, "pcm_dump:pa_source_output", 0);
+ vconf_dump |= iniparser_getboolean(dict, "pcm_dump:decoder_out", 0) ? PA_PCM_DUMP_GST_DECODER_OUT : 0;
+ vconf_dump |= iniparser_getboolean(dict, "pcm_dump:resampler_in", 0) ? PA_PCM_DUMP_GST_RESAMPLER_IN : 0;
+ vconf_dump |= iniparser_getboolean(dict, "pcm_dump:resampler_out", 0) ? PA_PCM_DUMP_GST_RESAMPLER_OUT : 0;
+ vconf_dump |= iniparser_getboolean(dict, "pcm_dump:gst_audio_sink", 0) ? PA_PCM_DUMP_GST_AUDIO_SINK_IN : 0;
+ vconf_dump |= iniparser_getboolean(dict, "pcm_dump:pa_stream_write", 0) ? PA_PCM_DUMP_PA_STREAM_WRITE : 0;
+ u->core->pcm_dump |= (bool)iniparser_getboolean(dict, "pcm_dump:pa_sink_input", 0) ? PA_PCM_DUMP_PA_SINK_INPUT : 0;
+ u->core->pcm_dump |= (bool)iniparser_getboolean(dict, "pcm_dump:pa_sink", 0) ? PA_PCM_DUMP_PA_SINK : 0;
+ u->core->pcm_dump |= (bool)iniparser_getboolean(dict, "pcm_dump:pa_source", 0) ? PA_PCM_DUMP_PA_SOURCE : 0;
+ u->core->pcm_dump |= (bool)iniparser_getboolean(dict, "pcm_dump:pa_source_output", 0) ? PA_PCM_DUMP_PA_SOURCE_OUTPUT : 0;
+ vconf_dump |= iniparser_getboolean(dict, "pcm_dump:pa_stream_read", 0) ? PA_PCM_DUMP_PA_STREAM_READ : 0;
+ vconf_dump |= iniparser_getboolean(dict, "pcm_dump:gst_audio_src", 0) ? PA_PCM_DUMP_GST_AUDIO_SRC_OUT : 0;
+ vconf_dump |= iniparser_getboolean(dict, "pcm_dump:encoder_in", 0) ? PA_PCM_DUMP_GST_ENCODER_IN : 0;
iniparser_freedict(dict);
- if (vconf_set_int(PA_DUMP_VCONF_KEY, vconf_dump)) {
- pa_log_warn("vconf_set_int %s=%x failed", PA_DUMP_VCONF_KEY, vconf_dump);
+ if (vconf_set_int(PA_PCM_DUMP_VCONF_KEY, vconf_dump)) {
+ pa_log_warn("vconf_set_int %s=%x failed", PA_PCM_DUMP_VCONF_KEY, vconf_dump);
}
}
return false;
}
- if (!sound_on && pa_streq(stream_role, STREAM_ROLE_RINGTONE_CALL) && pa_streq(device_type, DEVICE_TYPE_SPEAKER)) {
+ if (!sound_on && IS_ROLE_RINGTONE(stream_role) && pa_streq(device_type, DEVICE_TYPE_SPEAKER)) {
pa_log_info("sound status is 0 with ringtone-call stream, skip built-in speaker");
return true;
}
if (get_bt_property(u->device_manager, &is_wb, &is_nrec) == 0) {
pa_log_info("bt property : wideband(%d), nrec(%d)", is_wb, is_nrec);
- _update_bt_route_option(u->hal_interface, route_info.role, "wideband", (int)is_wb);
- _update_bt_route_option(u->hal_interface, route_info.role, "nrec", (int)is_nrec);
+ _update_bt_route_option(u->hal_interface, route_info.role, "bt-wideband", (int)is_wb);
+ _update_bt_route_option(u->hal_interface, route_info.role, "bt-nrec", (int)is_nrec);
} else
pa_log_warn("Failed to get property for wideband / nrec....");
} else {
}
select_data->idx_avail_devices = avail_devices;
select_data->origins_from_new_data = is_new_data;
- if (si->route_type >= STREAM_ROUTE_TYPE_MANUAL) {
+ if (si->route_type == STREAM_ROUTE_TYPE_MANUAL || si->route_type == STREAM_ROUTE_TYPE_MANUAL_EXT) {
if (is_new_data)
p_idx = pa_proplist_gets(GET_STREAM_NEW_PROPLIST(stream, type), PA_PROP_MEDIA_PARENT_ID);
else
pa_log_warn(" -- could not get the parent id of this stream, but keep going...");
route_data->idx_avail_devices = avail_devices;
- if (si->route_type >= STREAM_ROUTE_TYPE_MANUAL) {
+ if (si->route_type == STREAM_ROUTE_TYPE_MANUAL || si->route_type == STREAM_ROUTE_TYPE_MANUAL_EXT) {
if (sp) {
route_data->idx_manual_devices = (type == STREAM_SINK_INPUT) ? (sp->idx_route_out_devices) : (sp->idx_route_in_devices);
route_data->idx_streams = (type == STREAM_SINK_INPUT) ? (sp->idx_sink_inputs) : (sp->idx_source_outputs);
hook_call_route_data.stream_role = role;
CONVERT_TO_DEVICE_ROLE(hook_call_route_data.stream_role, hook_call_route_data.device_role);
fill_device_info_to_hook_data(m, &hook_call_route_data, command, type, s, is_new_data);
- if (hook_call_route_data.route_type >= STREAM_ROUTE_TYPE_MANUAL) {
+ if (hook_call_route_data.route_type == STREAM_ROUTE_TYPE_MANUAL || hook_call_route_data.route_type == STREAM_ROUTE_TYPE_MANUAL_EXT) {
if (hook_call_route_data.idx_manual_devices && !pa_idxset_size(hook_call_route_data.idx_manual_devices)) {
pa_log_warn("no manual device for this type(%d)", type);
hook_call_route_data.stream = NULL;
/* If the route type of the stream is not manual, notify again */
if (m->cur_highest_priority.source_output && (device_direction & DM_DEVICE_DIRECTION_IN)) {
if (!get_route_type(m->cur_highest_priority.source_output, STREAM_SOURCE_OUTPUT, false, &route_type)) {
- if (route_type < STREAM_ROUTE_TYPE_MANUAL) {
+ if (route_type != STREAM_ROUTE_TYPE_MANUAL && route_type != STREAM_ROUTE_TYPE_MANUAL_EXT) {
if (use_internal_codec) {
PA_IDXSET_FOREACH(s, m->cur_highest_priority.source_output->source->outputs, s_idx) {
if (!data->is_connected && !get_route_type(s, STREAM_SOURCE_OUTPUT, false, &route_type) &&
}
if (m->cur_highest_priority.sink_input && (device_direction & DM_DEVICE_DIRECTION_OUT)) {
if (!get_route_type(m->cur_highest_priority.sink_input, STREAM_SINK_INPUT, false, &route_type)) {
- if (route_type < STREAM_ROUTE_TYPE_MANUAL) {
+ if (route_type != STREAM_ROUTE_TYPE_MANUAL && route_type != STREAM_ROUTE_TYPE_MANUAL_EXT) {
if (use_internal_codec) {
PA_IDXSET_FOREACH(s, m->cur_highest_priority.sink_input->sink->inputs, s_idx) {
if (!data->is_connected && !get_route_type(s, STREAM_SINK_INPUT, false, &route_type) &&
(stream_role && (pa_streq(stream_role, STREAM_ROLE_CALL_VOICE) || pa_streq(stream_role, STREAM_ROLE_CALL_VIDEO) || \
pa_streq(stream_role, STREAM_ROLE_VOIP) || pa_streq(stream_role, STREAM_ROLE_RINGBACKTONE_CALL)))
+#define IS_ROLE_RINGTONE(stream_role) \
+ (pa_streq(stream_role, STREAM_ROLE_RINGTONE_CALL) || pa_streq(stream_role, STREAM_ROLE_RINGTONE_VOIP))
+
#define CONVERT_TO_DEVICE_ROLE(x_stream_role, x_device_role) \
do { \
pa_assert(x_stream_role); \
#define STREAM_ROLE_MEDIA "media"
#define STREAM_ROLE_RINGTONE_CALL "ringtone-call"
#define STREAM_ROLE_RINGBACKTONE_CALL "ringbacktone-call"
+#define STREAM_ROLE_RINGTONE_VOIP "ringtone-voip"
#define STREAM_ROLE_CALL_VOICE "call-voice"
#define STREAM_ROLE_CALL_VIDEO "call-video"
#define STREAM_ROLE_VOIP "voip"