],[TIZEN_UDEV_USB_ONLY=no])
AM_CONDITIONAL(TIZEN_UDEV_USB_ONLY, test "x$TIZEN_UDEV_USB_ONLY" = "xyes")
+#### PA READY ####
+
+AC_ARG_ENABLE(paready, AC_HELP_STRING([--enable-paready], [enable pulseaudio ready feature]),
+[
+ case "${enableval}" in
+ yes) TIZEN_PA_READY=yes ;;
+ no) TIZEN_PA_READY=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-paready) ;;
+ esac
+ ],[TIZEN_PA_READY=no])
+AM_CONDITIONAL([TIZEN_PA_READY], [test "x$TIZEN_PA_READY" = "xyes"])
+
###################################
# Output #
###################################
pcm dump: ${TIZEN_PCM_DUMP}
security: ${TIZEN_SECURITY}
udev with usb only: ${TIZEN_UDEV_USB_ONLY}
+ pa ready: ${TIZEN_PA_READY}
"
if test "${ENABLE_SPEEX}" = "no" && test "${ENABLE_WEBRTC}" = "no" && test "${ENABLE_ADRIAN_EC}" = "no" ; then
Name: pulseaudio
Summary: Improved Linux sound server
Version: 11.1
-Release: 10
+Release: 11
Group: Multimedia/Audio
License: LGPL-2.1
URL: http://pulseaudio.org
--enable-pcm-dump \
--enable-security \
--enable-udev-with-usb-only \
+ --enable-paready \
%__make %{?_smp_mflags} V=0
pulseaudio_CFLAGS += -DTIZEN_DLOG
endif
+if TIZEN_PA_READY
+pulseaudio_CFLAGS += -DTIZEN_PA_READY
+endif
+
###################################
# Utility programs #
###################################
#include "ltdl-bind-now.h"
#include "server-lookup.h"
+#ifdef TIZEN_PA_READY
+#include <fcntl.h>
+#define PA_READY "/tmp/.pa_ready"
+#endif
+
#ifdef HAVE_LIBWRAP
/* Only one instance of these variables */
int allow_severity = LOG_INFO;
}
#endif
+#ifdef TIZEN_PA_READY
+static int create_ready_file(const char *path) {
+ int ready_fd = -1;
+
+ if (path == NULL) {
+ pa_log_error("Ready file path is null");
+ return -1;
+ }
+
+ if ((ready_fd = creat(path, 0644)) == -1) {
+ pa_log_error("Failed to create READY FILE(%s) : %s", path, pa_cstrerror(errno));
+ return -1;
+ }
+
+ pa_log_warn("READY FILE (%s) was created", path);
+ close(ready_fd);
+ return 0;
+}
+
+static void notify_daemon_ready(void) {
+ if (create_ready_file(PA_READY) < 0)
+ pa_log_error("Failed to create ready file(%s) for other audio service", PA_READY);
+}
+#endif /* TIZEN_PA_READY */
+
int main(int argc, char *argv[]) {
pa_core *c = NULL;
pa_strbuf *buf = NULL;
pa_log_info("Daemon startup complete.");
+#ifdef TIZEN_PA_READY
+ /* broadcast if we're ready */
+ notify_daemon_ready();
+#endif
+
#ifdef HAVE_SYSTEMD_DAEMON
sd_notify(0, "READY=1");
#endif