u->sink->set_port = sink_set_port_cb;
u->sink->reconfigure = sink_reconfigure_cb;
u->sink->userdata = u;
+#ifdef __TIZEN__
+ u->sink->supported_sample_rates = u->rates;
+#endif
pa_sink_set_asyncmsgq(u->sink, u->thread_mq.inq);
pa_sink_set_rtpoll(u->sink, u->rtpoll);
s->alternate_sample_rate = s->core->alternate_sample_rate;
#ifdef __TIZEN__
s->avoid_resampling = data->avoid_resampling;
+ s->selected_sample_rate = s->default_sample_rate;
#endif
s->inputs = pa_idxset_new(NULL, NULL);
/* We currently only try to reconfigure the sample rate */
+#ifdef __TIZEN__
+ if (!s->selected_sample_rate && !avoid_resampling && pa_sample_spec_equal(spec, &s->sample_spec))
+#else
if (pa_sample_spec_equal(spec, &s->sample_spec))
+#endif
return 0;
if (!s->reconfigure)
return -1;
+#ifdef __TIZEN__
+ if (!s->selected_sample_rate && PA_UNLIKELY(default_rate == alternate_rate && !passthrough && !avoid_resampling)) {
+#else
if (PA_UNLIKELY(default_rate == alternate_rate && !passthrough && !avoid_resampling)) {
+#endif
pa_log_debug("Default and alternate sample rates are the same, so there is no point in switching.");
return -1;
}
desired_spec = s->sample_spec;
+#ifdef __TIZEN__
+ if (!avoid_resampling && s->selected_sample_rate)
+ default_rate = alternate_rate = s->selected_sample_rate;
+#endif
if (passthrough) {
/* We have to try to use the sink input rate */
desired_spec.rate = spec->rate;