Name: pulseaudio
Summary: Improved Linux sound server
Version: 11.1
-Release: 34
+Release: 35
Group: Multimedia/Audio
License: LGPL-2.1
URL: http://pulseaudio.org
uint32_t nfrags, frag_size, buffer_size, tsched_size, tsched_watermark, rewind_safeguard;
snd_pcm_uframes_t period_frames, buffer_frames, tsched_frames;
size_t frame_size;
+#ifdef __TIZEN__
+ bool use_mmap = true;
+ bool use_tsched = true;
+ bool ignore_dB = false;
+ bool namereg_fail = false;
+ bool deferred_volume = false;
+ bool set_formats = false;
+ bool fixed_latency_range = false;
+ bool b;
+ bool d;
+ bool avoid_resampling;
+#else
bool use_mmap = true, b, use_tsched = true, d, ignore_dB = false, namereg_fail = false, deferred_volume = false, set_formats = false, fixed_latency_range = false;
+#endif
pa_sink_new_data data;
bool volume_is_set;
bool mute_is_set;
ss = m->core->default_sample_spec;
map = m->core->default_channel_map;
+#ifdef __TIZEN__
+ avoid_resampling = m->core->avoid_resampling;
+#endif
/* Pick sample spec overrides from the mapping, if any */
if (mapping) {
goto fail;
}
data.namereg_fail = namereg_fail;
+#ifdef __TIZEN__
+ if (pa_modargs_get_value_boolean(ma, "avoid_resampling", &avoid_resampling) < 0) {
+ pa_log("Failed to parse avoid_resampling argument.");
+ pa_sink_new_data_done(&data);
+ goto fail;
+ }
+ data.avoid_resampling = avoid_resampling;
+#endif
pa_sink_new_data_set_sample_spec(&data, &ss);
pa_sink_new_data_set_channel_map(&data, &map);
uint32_t nfrags, frag_size, buffer_size, tsched_size, tsched_watermark;
snd_pcm_uframes_t period_frames, buffer_frames, tsched_frames;
size_t frame_size;
+#ifdef __TIZEN__
+ bool use_mmap = true;
+ bool use_tsched = true;
+ bool ignore_dB = false;
+ bool namereg_fail = false;
+ bool deferred_volume = false;
+ bool fixed_latency_range = false;
+ bool b;
+ bool d;
+ bool avoid_resampling;
+#else
bool use_mmap = true, b, use_tsched = true, d, ignore_dB = false, namereg_fail = false, deferred_volume = false, fixed_latency_range = false;
+#endif
pa_source_new_data data;
bool volume_is_set;
bool mute_is_set;
ss = m->core->default_sample_spec;
map = m->core->default_channel_map;
+#ifdef __TIZEN__
+ avoid_resampling = m->core->avoid_resampling;
+#endif
/* Pick sample spec overrides from the mapping, if any */
if (mapping) {
goto fail;
}
data.namereg_fail = namereg_fail;
+#ifdef __TIZEN__
+ if (pa_modargs_get_value_boolean(ma, "avoid_resampling", &avoid_resampling) < 0) {
+ pa_log("Failed to parse avoid_resampling argument.");
+ pa_source_new_data_done(&data);
+ goto fail;
+ }
+ data.avoid_resampling = avoid_resampling;
+#endif
pa_source_new_data_set_sample_spec(&data, &ss);
pa_source_new_data_set_channel_map(&data, &map);
"profile_set=<profile set configuration file> "
"paths_dir=<directory containing the path configuration files> "
"use_ucm=<load use case manager> "
+#ifdef __TIZEN__
+ "avoid_resampling=<use stream original sample rate if possible?> "
+#endif
);
static const char* const valid_modargs[] = {
"profile_set",
"paths_dir",
"use_ucm",
+#ifdef __TIZEN__
+ "avoid_resampling",
+#endif
NULL
};
"fixed_latency_range=<disable latency range changes on underrun?> "
"ignore_dB=<ignore dB information from the device?> "
"deferred_volume=<syncronize sw and hw volume changes in IO-thread?> "
- "use_ucm=<use ALSA UCM for card configuration?>");
+#ifdef __TIZEN__
+ "use_ucm=<use ALSA UCM for card configuration?> "
+ "avoid_resampling=<use stream original sample rate if possible?>");
+#else
+ "use_ucm=<use ALSA UCM for card configuration?> ");
+#endif
struct device {
char *path;
bool ignore_dB:1;
bool deferred_volume:1;
bool use_ucm:1;
+#ifdef __TIZEN__
+ bool avoid_resampling:1;
+#endif
uint32_t tsched_buffer_size;
"ignore_dB",
"deferred_volume",
"use_ucm",
+#ifdef __TIZEN__
+ "avoid_resampling",
+#endif
NULL
};
"ignore_dB=%s "
"deferred_volume=%s "
"use_ucm=%s "
+#ifdef __TIZEN__
+ "avoid_resampling=%s "
+#endif
"card_properties=\"module-udev-detect.discovered=1\"",
path_get_card_id(path),
n,
pa_yes_no(u->fixed_latency_range),
pa_yes_no(u->ignore_dB),
pa_yes_no(u->deferred_volume),
+#ifdef __TIZEN__
+ pa_yes_no(u->use_ucm),
+ pa_yes_no(u->avoid_resampling));
+#else
pa_yes_no(u->use_ucm));
+#endif
pa_xfree(n);
if (u->tsched_buffer_size_valid)
int fd;
bool use_tsched = true, fixed_latency_range = false, ignore_dB = false, deferred_volume = m->core->deferred_volume;
bool use_ucm = true;
+#ifdef __TIZEN__
+ bool avoid_resampling;
+#endif
pa_assert(m);
}
u->use_ucm = use_ucm;
+#ifdef __TIZEN__
+ avoid_resampling = m->core->avoid_resampling;
+ if (pa_modargs_get_value_boolean(ma, "avoid_resampling", &avoid_resampling) < 0) {
+ pa_log("Failed to parse avoid_resampling= argument.");
+ goto fail;
+ }
+ u->avoid_resampling = avoid_resampling;
+#endif
if (!(u->udev = udev_new())) {
pa_log("Failed to initialize udev library.");
goto fail;
s->alternate_sample_rate = data->alternate_sample_rate;
else
s->alternate_sample_rate = s->core->alternate_sample_rate;
+#ifdef __TIZEN__
+ s->avoid_resampling = data->avoid_resampling;
+#endif
s->inputs = pa_idxset_new(NULL, NULL);
s->n_corked = 0;
pa_sink_input *i;
bool default_rate_is_usable = false;
bool alternate_rate_is_usable = false;
+#ifdef __TIZEN__
+ bool avoid_resampling = s->avoid_resampling;
+#else
bool avoid_resampling = s->core->avoid_resampling;
+#endif
/* We currently only try to reconfigure the sample rate */
if (!passthrough && pa_sink_used_by(s) > 0)
return -1;
- pa_log_debug("Suspending sink %s due to changing format.", s->name);
+#ifdef __TIZEN__
+ pa_log_debug("Suspending sink %s due to changing format, desired rate = %u", s->name, desired_spec.rate);
+#else
+ pa_log_debug("Suspending sink %s due to changing format", s->name);
+#endif
pa_sink_suspend(s, true, PA_SUSPEND_INTERNAL);
if (s->reconfigure(s, &desired_spec, passthrough) >= 0) {
pa_channel_map channel_map;
uint32_t default_sample_rate;
uint32_t alternate_sample_rate;
+#ifdef __TIZEN__
+ bool avoid_resampling:1;
+#endif
pa_idxset *inputs;
unsigned n_corked;
pa_sample_spec sample_spec;
pa_channel_map channel_map;
uint32_t alternate_sample_rate;
+#ifdef __TIZEN__
+ bool avoid_resampling:1;
+#endif
pa_cvolume volume;
bool muted:1;
s->alternate_sample_rate = data->alternate_sample_rate;
else
s->alternate_sample_rate = s->core->alternate_sample_rate;
+#ifdef __TIZEN__
+ s->avoid_resampling = data->avoid_resampling;
+#endif
s->outputs = pa_idxset_new(NULL, NULL);
s->n_corked = 0;
uint32_t alternate_rate = s->alternate_sample_rate;
bool default_rate_is_usable = false;
bool alternate_rate_is_usable = false;
+#ifdef __TIZEN__
+ bool avoid_resampling = s->avoid_resampling;
+#else
bool avoid_resampling = s->core->avoid_resampling;
+#endif
/* We currently only try to reconfigure the sample rate */
if (!passthrough && pa_source_used_by(s) > 0)
return -1;
- pa_log_debug("Suspending source %s due to changing the sample rate.", s->name);
+#ifdef __TIZEN__
+ pa_log_debug("Suspending source %s due to changing the sample rate to %u", s->name, desired_spec.rate);
+#else
+ pa_log_debug("Suspending source %s due to changing the sample rate", s->name);
+#endif
pa_source_suspend(s, true, PA_SUSPEND_INTERNAL);
if (s->reconfigure)
pa_channel_map channel_map;
uint32_t default_sample_rate;
uint32_t alternate_sample_rate;
+#ifdef __TIZEN__
+ bool avoid_resampling:1;
+#endif
pa_idxset *outputs;
unsigned n_corked;
pa_sample_spec sample_spec;
pa_channel_map channel_map;
uint32_t alternate_sample_rate;
+#ifdef __TIZEN__
+ bool avoid_resampling:1;
+#endif
pa_cvolume volume;
bool muted:1;