fill_device_info_to_hook_data(m, &hook_call_select_data, command, type, s, is_new_data);
hook_call_select_data.sample_spec = GET_STREAM_NEW_SAMPLE_SPEC(s, type);
if (type == STREAM_SINK_INPUT) {
- const char *modifier_gain = NULL;
hook_call_select_data.occupying_role = m->cur_highest_priority.role_si;
if (IS_ROLE_COMMUNICATION(hook_call_select_data.occupying_role)) {
/* Currently, if bt-sco is used by communication stream, other streams can not go with bt-a2dp.
hook_call_select_data.idx_avail_devices = filtered_avail_devices;
}
hook_call_select_data.proper_sink = &(((pa_sink_input_new_data*)s)->sink);
- /* need to check modifier_gain, because we do not skip a stream that is from module-sound-player */
- modifier_gain = pa_proplist_gets(GET_STREAM_NEW_PROPLIST(s, type), PA_PROP_MEDIA_TIZEN_VOLUME_GAIN_TYPE);
- if (((pa_sink_input_new_data*)s)->sink && !modifier_gain) {
- pa_log_info(" - sink(%s) has been already selected, skip selecting sink",
- (((pa_sink_input_new_data*)s)->sink)->name);
- goto BREAK_WITH_FREE;
- }
} else if (type == STREAM_SOURCE_OUTPUT) {
hook_call_select_data.occupying_role = m->cur_highest_priority.role_so;
hook_call_select_data.proper_source = &(((pa_source_output_new_data*)s)->source);
- if (((pa_source_output_new_data*)s)->source) {
- pa_log_info(" - source(%s) has been already selected, skip selecting source",
- (((pa_source_output_new_data*)s)->source)->name);
- return ret;
- }
}
} else {
hook_call_select_data.stream_role = pa_proplist_gets(GET_STREAM_PROPLIST(s, type),
pa_source_output_move_to(PA_SOURCE_OUTPUT(s), hook_call_select_data.new_source, false);
}
}
-BREAK_WITH_FREE:
+
pa_xfree(filtered_avail_devices);
return ret;