Name: pulseaudio-modules-tizen
Summary: Pulseaudio modules for Tizen
-Version: 13.0.64
+Version: 13.0.65
Release: 0
Group: Multimedia/Audio
License: LGPL-2.1+
%setup -q
%build
-export CFLAGS="%{optflags} -fno-strict-aliasing -D__TIZEN__ -DSYSCONFDIR=\\\"%{_sysconfdir}\\\" "
+export CFLAGS="%{optflags} -fno-strict-aliasing -D__TIZEN__ -DSYSCONFDIR=\\\"%{_hal_sysconfdir}\\\" "
+%if "%{tizen_profile_name}" != "tv"
+ export CFLAGS+=" -DTIZEN_TV";
+%endif
export LD_AS_NEEDED=0
%reconfigure --prefix=%{_prefix} \
if (u->first) {
pa_log_debug("Fill initial buffer");
+#ifdef TIZEN_TV
frames_to_write = pa_usec_to_bytes(u->block_usec, &u->sink->sample_spec) / frame_size;
+#else
+ frames_to_write = u->frag_size / frame_size;
+#endif
u->timestamp = u->timestamp_written = now;
} else {
+#ifdef TIZEN_TV
/* Write pcm every 10ms */
frames_to_write = pa_usec_to_bytes((10 * PA_USEC_PER_MSEC), &u->sink->sample_spec) / frame_size;
+#else
+ frames_to_write = (u->frag_size / u->nfrags);
+#endif
if (frames_to_write > avail)
break;
}
goto fail;
if (work_done == 0) {
+#ifdef TIZEN_TV
pa_rtpoll_set_timer_relative(u->rtpoll, (10 * PA_USEC_PER_MSEC));
+#else
+ pa_rtpoll_set_timer_relative(u->rtpoll, (20 * PA_USEC_PER_MSEC));
+#endif
} else {
if (u->first) {
pa_log_info("Starting playback.");
pa_hal_interface_pcm_start(u->hal_interface, u->pcm_handle);
u->first = false;
}
+#ifdef TIZEN_TV
pa_rtpoll_set_timer_relative(u->rtpoll, (10 * PA_USEC_PER_MSEC));
+#else
+ pa_rtpoll_set_timer_relative(u->rtpoll, (20 * PA_USEC_PER_MSEC));
+#endif
}
} else {
pa_rtpoll_set_timer_disabled(u->rtpoll);
break;
}
+#ifdef TIZEN_TV
frames_to_read = pa_usec_to_bytes(u->block_usec, &u->source->sample_spec) / frame_size;
-
chunk.length = pa_usec_to_bytes(u->block_usec, &u->source->sample_spec);
+#else
+ frames_to_read = (u->frag_size / u->nfrags);
+ chunk.length = frames_to_read * frame_size;
+#endif
chunk.memblock = pa_memblock_new(u->core->mempool, chunk.length);
if (frames_to_read > (size_t)avail)
goto fail;
if (work_done == 0) {
+#ifdef TIZEN_TV
pa_rtpoll_set_timer_relative(u->rtpoll, (10 * PA_USEC_PER_MSEC));
+#else
+ pa_rtpoll_set_timer_relative(u->rtpoll, (20 * PA_USEC_PER_MSEC));
+#endif
} else {
pa_rtpoll_set_timer_absolute(u->rtpoll, u->timestamp);
}