meta-tizen: Fix avsystem build : set suitable pulseaudio depedencies, adding subdir_o...
authorValentin Cupif <valentin.cupif@open.eurogiciel.org>
Mon, 19 May 2014 13:03:37 +0000 (15:03 +0200)
committerPatrick Ohly <patrick.ohly@intel.com>
Fri, 9 Jan 2015 17:20:00 +0000 (09:20 -0800)
Change-Id: Iff4d79c513f3d255fb3d22b3ded44acd897c73e3
(From meta-tizen rev: f7da273efe6e3fa19a6202db0b6b994be15cfc31)

Signed-off-by: Valentin Cupif <valentin.cupif@open.eurogiciel.org>
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
meta-tizen/recipes-multimedia/pulseaudio/pulseaudio_5.0.bbappend [new file with mode: 0644]
meta-tizen/recipes-multimedia/pulseaudio/pulseaudio_5.0/changes-to-pa-simple-api-samsung.patch [new file with mode: 0644]
meta-tizen/recipes-tizen/alsa-scenario-0.2/alsa-scenario-0.2-extraconf.inc
meta-tizen/recipes-tizen/avsystem/avsystem-extraconf.inc
meta-tizen/recipes-tizen/avsystem/avsystem/add-PA_PROP_MEDIA_POLICY-Define.patch [new file with mode: 0644]
meta-tizen/recipes-tizen/avsystem/avsystem/add-subdir-objects-option.patch [new file with mode: 0644]

diff --git a/meta-tizen/recipes-multimedia/pulseaudio/pulseaudio_5.0.bbappend b/meta-tizen/recipes-multimedia/pulseaudio/pulseaudio_5.0.bbappend
new file mode 100644 (file)
index 0000000..4c64b51
--- /dev/null
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/pulseaudio_5.0"
+
+SRC_URI += "file://changes-to-pa-simple-api-samsung.patch"
diff --git a/meta-tizen/recipes-multimedia/pulseaudio/pulseaudio_5.0/changes-to-pa-simple-api-samsung.patch b/meta-tizen/recipes-multimedia/pulseaudio/pulseaudio_5.0/changes-to-pa-simple-api-samsung.patch
new file mode 100644 (file)
index 0000000..a39ae06
--- /dev/null
@@ -0,0 +1,426 @@
+From: "vivian,zhang" <vivian.zhang@intel.com>
+Date: Tue, 18 Jun 2013 16:10:15 +0800
+Subject: changes to pa simple api - samsung
+
+Change-Id: I997c02217a8dc14524480164aa0baeea901c7b4e
+---
+ src/Makefile.am    |    4 +-
+ src/map-file       |    6 +
+ src/pulse/simple.c |  278 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/pulse/simple.h |   28 +++++
+ 4 files changed, 314 insertions(+), 2 deletions(-)
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 6340dbc..ebbed80 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -815,7 +815,7 @@ libpulse_la_SOURCES = \
+               pulse/volume.c pulse/volume.h \
+               pulse/xmalloc.c pulse/xmalloc.h
+-libpulse_la_CFLAGS = $(AM_CFLAGS) $(LIBJSON_CFLAGS)
++libpulse_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS) $(LIBJSON_CFLAGS)
+ libpulse_la_LIBADD = $(AM_LIBADD) $(WINSOCK_LIBS) $(LTLIBICONV) $(LIBJSON_LIBS) libpulsecommon-@PA_MAJORMINOR@.la
+ libpulse_la_LDFLAGS = $(AM_LDFLAGS) $(VERSIONING_LDFLAGS) -version-info $(LIBPULSE_VERSION_INFO)
+@@ -825,7 +825,7 @@ libpulse_la_LIBADD += $(DBUS_LIBS)
+ endif
+ libpulse_simple_la_SOURCES = pulse/simple.c pulse/simple.h
+-libpulse_simple_la_CFLAGS = $(AM_CFLAGS)
++libpulse_simple_la_CFLAGS = $(AM_CFLAGS) $(DBUS_CFLAGS)
+ libpulse_simple_la_LIBADD = $(AM_LIBADD) libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
+ libpulse_simple_la_LDFLAGS = $(AM_LDFLAGS) $(VERSIONING_LDFLAGS) -version-info $(LIBPULSE_SIMPLE_VERSION_INFO)
+diff --git a/src/map-file b/src/map-file
+index 3dee7ee..a074a49 100644
+--- a/src/map-file
++++ b/src/map-file
+@@ -274,11 +274,17 @@ pa_signal_new;
+ pa_signal_set_destroy;
+ pa_simple_drain;
+ pa_simple_flush;
++pa_simple_mute;
+ pa_simple_free;
+ pa_simple_get_latency;
+ pa_simple_new;
++pa_simple_new_proplist;
+ pa_simple_read;
+ pa_simple_write;
++pa_simple_set_volume;
++pa_simple_get_stream_index;
++pa_simple_cork;
++pa_simple_is_corked;
+ pa_stream_begin_write;
+ pa_stream_cancel_write;
+ pa_stream_connect_playback;
+diff --git a/src/pulse/simple.c b/src/pulse/simple.c
+index 860cd18..fa11b30 100644
+--- a/src/pulse/simple.c
++++ b/src/pulse/simple.c
+@@ -32,10 +32,12 @@
+ #include <pulse/thread-mainloop.h>
+ #include <pulse/xmalloc.h>
++#include <pulsecore/native-common.h>
+ #include <pulsecore/log.h>
+ #include <pulsecore/macro.h>
+ #include "simple.h"
++#include "internal.h"
+ struct pa_simple {
+     pa_threaded_mainloop *mainloop;
+@@ -102,6 +104,14 @@ static void context_state_cb(pa_context *c, void *userdata) {
+     }
+ }
++static void success_context_cb(pa_context *c, int success, void *userdata) {
++      pa_simple *p = userdata;
++      pa_assert(c);
++      pa_assert(p);
++
++    p->operation_success = success;
++    pa_threaded_mainloop_signal(p->mainloop, 0);
++}
+ static void stream_state_cb(pa_stream *s, void * userdata) {
+     pa_simple *p = userdata;
+     pa_assert(s);
+@@ -251,6 +261,122 @@ fail:
+     return NULL;
+ }
++pa_simple* pa_simple_new_proplist(
++        const char *server,
++        const char *name,
++        pa_stream_direction_t dir,
++        const char *dev,
++        const char *stream_name,
++        const pa_sample_spec *ss,
++        const pa_channel_map *map,
++        const pa_buffer_attr *attr,
++        pa_proplist *proplist,
++        int *rerror) {
++
++    pa_simple *p;
++    int error = PA_ERR_INTERNAL, r;
++
++    CHECK_VALIDITY_RETURN_ANY(rerror, !server || *server, PA_ERR_INVALID, NULL);
++    CHECK_VALIDITY_RETURN_ANY(rerror, dir == PA_STREAM_PLAYBACK || dir == PA_STREAM_RECORD, PA_ERR_INVALID, NULL);
++    CHECK_VALIDITY_RETURN_ANY(rerror, !dev || *dev, PA_ERR_INVALID, NULL);
++    CHECK_VALIDITY_RETURN_ANY(rerror, ss && pa_sample_spec_valid(ss), PA_ERR_INVALID, NULL);
++    CHECK_VALIDITY_RETURN_ANY(rerror, !map || (pa_channel_map_valid(map) && map->channels == ss->channels), PA_ERR_INVALID, NULL)
++
++    p = pa_xnew0(pa_simple, 1);
++    p->direction = dir;
++
++    if (!(p->mainloop = pa_threaded_mainloop_new()))
++        goto fail;
++
++    if (!(p->context = pa_context_new(pa_threaded_mainloop_get_api(p->mainloop), name)))
++        goto fail;
++
++    pa_context_set_state_callback(p->context, context_state_cb, p);
++
++    if (pa_context_connect(p->context, server, 0, NULL) < 0) {
++        error = pa_context_errno(p->context);
++        goto fail;
++    }
++
++    pa_threaded_mainloop_lock(p->mainloop);
++
++    if (pa_threaded_mainloop_start(p->mainloop) < 0)
++        goto unlock_and_fail;
++
++    for (;;) {
++        pa_context_state_t state;
++
++        state = pa_context_get_state(p->context);
++
++        if (state == PA_CONTEXT_READY)
++            break;
++
++        if (!PA_CONTEXT_IS_GOOD(state)) {
++            error = pa_context_errno(p->context);
++            goto unlock_and_fail;
++        }
++
++        /* Wait until the context is ready */
++        pa_threaded_mainloop_wait(p->mainloop);
++    }
++
++    if (!(p->stream = pa_stream_new_with_proplist(p->context, stream_name, ss, map, proplist))) {
++        error = pa_context_errno(p->context);
++        goto unlock_and_fail;
++    }
++
++    pa_stream_set_state_callback(p->stream, stream_state_cb, p);
++    pa_stream_set_read_callback(p->stream, stream_request_cb, p);
++    pa_stream_set_write_callback(p->stream, stream_request_cb, p);
++    pa_stream_set_latency_update_callback(p->stream, stream_latency_update_cb, p);
++
++    if (dir == PA_STREAM_PLAYBACK)
++        r = pa_stream_connect_playback(p->stream, dev, attr,
++                                       PA_STREAM_INTERPOLATE_TIMING
++                                       |PA_STREAM_ADJUST_LATENCY
++                                       |PA_STREAM_AUTO_TIMING_UPDATE, NULL, NULL);
++    else
++        r = pa_stream_connect_record(p->stream, dev, attr,
++                                     PA_STREAM_INTERPOLATE_TIMING
++                                     |PA_STREAM_ADJUST_LATENCY
++                                     |PA_STREAM_AUTO_TIMING_UPDATE
++                                     |PA_STREAM_START_CORKED);
++
++    if (r < 0) {
++        error = pa_context_errno(p->context);
++        goto unlock_and_fail;
++    }
++
++    for (;;) {
++        pa_stream_state_t state;
++
++        state = pa_stream_get_state(p->stream);
++
++        if (state == PA_STREAM_READY)
++            break;
++
++        if (!PA_STREAM_IS_GOOD(state)) {
++            error = pa_context_errno(p->context);
++            goto unlock_and_fail;
++        }
++
++        /* Wait until the stream is ready */
++        pa_threaded_mainloop_wait(p->mainloop);
++    }
++
++    pa_threaded_mainloop_unlock(p->mainloop);
++
++    return p;
++
++unlock_and_fail:
++    pa_threaded_mainloop_unlock(p->mainloop);
++
++fail:
++    if (rerror)
++        *rerror = error;
++    pa_simple_free(p);
++    return NULL;
++}
+ void pa_simple_free(pa_simple *s) {
+     pa_assert(s);
+@@ -454,6 +580,111 @@ unlock_and_fail:
+     return -1;
+ }
++int pa_simple_mute(pa_simple *p, int mute, int *rerror) {
++    pa_operation *o = NULL;
++    uint32_t idx;
++
++    pa_assert(p);
++
++    CHECK_VALIDITY_RETURN_ANY(rerror, p->direction == PA_STREAM_PLAYBACK, PA_ERR_BADSTATE, -1);
++
++    pa_threaded_mainloop_lock(p->mainloop);
++    CHECK_DEAD_GOTO(p, rerror, unlock_and_fail);
++
++    CHECK_SUCCESS_GOTO(p, rerror, ((idx = pa_stream_get_index (p->stream)) != PA_INVALID_INDEX), unlock_and_fail);
++
++
++    o = pa_context_set_sink_input_mute (p->context, idx, mute, success_context_cb, p);
++    CHECK_SUCCESS_GOTO(p, rerror, o, unlock_and_fail);
++
++    p->operation_success = 0;
++    while (pa_operation_get_state(o) == PA_OPERATION_RUNNING) {
++        pa_threaded_mainloop_wait(p->mainloop);
++        CHECK_DEAD_GOTO(p, rerror, unlock_and_fail);
++    }
++    CHECK_SUCCESS_GOTO(p, rerror, p->operation_success, unlock_and_fail);
++
++    pa_operation_unref(o);
++    pa_threaded_mainloop_unlock(p->mainloop);
++
++    return 0;
++
++unlock_and_fail:
++
++    if (o) {
++        pa_operation_cancel(o);
++        pa_operation_unref(o);
++    }
++
++    pa_threaded_mainloop_unlock(p->mainloop);
++    return -1;
++}
++
++int pa_simple_get_stream_index(pa_simple *p, unsigned int *idx, int *rerror) {
++    pa_assert(p);
++    CHECK_VALIDITY_RETURN_ANY(rerror, idx != NULL, PA_ERR_INVALID, -1);
++
++    pa_threaded_mainloop_lock(p->mainloop);
++
++    CHECK_DEAD_GOTO(p, rerror, unlock_and_fail);
++
++      *idx = pa_stream_get_index(p->stream);
++
++    pa_threaded_mainloop_unlock(p->mainloop);
++    return 0;
++
++unlock_and_fail:
++    pa_threaded_mainloop_unlock(p->mainloop);
++    return -1;
++}
++
++int pa_simple_set_volume(pa_simple *p, int volume, int *rerror) {
++    pa_operation *o = NULL;
++    pa_stream *s = NULL;
++    uint32_t idx;
++    pa_cvolume cv;
++    pa_volume_t v;
++
++    pa_assert(p);
++
++    CHECK_VALIDITY_RETURN_ANY(rerror, p->direction == PA_STREAM_PLAYBACK, PA_ERR_BADSTATE, -1);
++    CHECK_VALIDITY_RETURN_ANY(rerror, volume >= 0, PA_ERR_INVALID, -1);
++    CHECK_VALIDITY_RETURN_ANY(rerror, volume <= 65535, PA_ERR_INVALID, -1);
++
++    pa_threaded_mainloop_lock(p->mainloop);
++    CHECK_DEAD_GOTO(p, rerror, unlock_and_fail);
++
++    CHECK_SUCCESS_GOTO(p, rerror, ((idx = pa_stream_get_index (p->stream)) != PA_INVALID_INDEX), unlock_and_fail);
++
++    s = p->stream;
++    pa_assert(s);
++    pa_cvolume_set(&cv, s->sample_spec.channels, volume);
++
++    o = pa_context_set_sink_input_volume (p->context, idx, &cv, success_context_cb, p);
++    CHECK_SUCCESS_GOTO(p, rerror, o, unlock_and_fail);
++
++    p->operation_success = 0;
++    while (pa_operation_get_state(o) == PA_OPERATION_RUNNING) {
++        pa_threaded_mainloop_wait(p->mainloop);
++        CHECK_DEAD_GOTO(p, rerror, unlock_and_fail);
++    }
++    CHECK_SUCCESS_GOTO(p, rerror, p->operation_success, unlock_and_fail);
++
++    pa_operation_unref(o);
++    pa_threaded_mainloop_unlock(p->mainloop);
++
++    return 0;
++
++unlock_and_fail:
++
++    if (o) {
++        pa_operation_cancel(o);
++        pa_operation_unref(o);
++    }
++
++    pa_threaded_mainloop_unlock(p->mainloop);
++    return -1;
++}
+ pa_usec_t pa_simple_get_latency(pa_simple *p, int *rerror) {
+     pa_usec_t t;
+     int negative;
+@@ -483,3 +714,50 @@ unlock_and_fail:
+     pa_threaded_mainloop_unlock(p->mainloop);
+     return (pa_usec_t) -1;
+ }
++
++int pa_simple_cork(pa_simple *p, int cork, int *rerror) {
++    pa_operation *o = NULL;
++
++    pa_assert(p);
++
++    pa_threaded_mainloop_lock(p->mainloop);
++    CHECK_DEAD_GOTO(p, rerror, unlock_and_fail);
++
++    o = pa_stream_cork(p->stream, cork, success_context_cb, p);
++    CHECK_SUCCESS_GOTO(p, rerror, o, unlock_and_fail);
++
++    p->operation_success = 0;
++    while (pa_operation_get_state(o) == PA_OPERATION_RUNNING) {
++        pa_threaded_mainloop_wait(p->mainloop);
++        CHECK_DEAD_GOTO(p, rerror, unlock_and_fail);
++    }
++    CHECK_SUCCESS_GOTO(p, rerror, p->operation_success, unlock_and_fail);
++
++    pa_operation_unref(o);
++    pa_threaded_mainloop_unlock(p->mainloop);
++
++    return 0;
++
++unlock_and_fail:
++
++    if (o) {
++        pa_operation_cancel(o);
++        pa_operation_unref(o);
++    }
++
++    pa_threaded_mainloop_unlock(p->mainloop);
++    return -1;
++}
++
++int pa_simple_is_corked(pa_simple *p) {
++      int is_cork;
++    pa_assert(p);
++
++    pa_threaded_mainloop_lock(p->mainloop);
++
++    is_cork = pa_stream_is_corked(p->stream);
++
++    pa_threaded_mainloop_unlock(p->mainloop);
++
++    return is_cork;
++}
+diff --git a/src/pulse/simple.h b/src/pulse/simple.h
+index 0fab8ee..bff9dbb 100644
+--- a/src/pulse/simple.h
++++ b/src/pulse/simple.h
+@@ -31,6 +31,7 @@
+ #include <pulse/cdecl.h>
+ #include <pulse/version.h>
++#include <pulse/proplist.h>
+ /** \page simple Simple API
+  *
+  * \section overv_sec Overview
+@@ -128,6 +129,19 @@ pa_simple* pa_simple_new(
+     int *error                          /**< A pointer where the error code is stored when the routine returns NULL. It is OK to pass NULL here. */
+     );
++/** Create a new connection to the server with proplist */
++pa_simple* pa_simple_new_proplist(
++    const char *server,                 /**< Server name, or NULL for default */
++    const char *name,                   /**< A descriptive name for this client (application name, ...) */
++    pa_stream_direction_t dir,          /**< Open this stream for recording or playback? */
++    const char *dev,                    /**< Sink (resp. source) name, or NULL for default */
++    const char *stream_name,            /**< A descriptive name for this client (application name, song title, ...) */
++    const pa_sample_spec *ss,           /**< The sample type to use */
++    const pa_channel_map *map,          /**< The channel map to use, or NULL for default */
++    const pa_buffer_attr *attr,         /**< Buffering attributes, or NULL for default */
++    pa_proplist *proplist,    /**< Properties, or NULL for default */
++    int *error                          /**< A pointer where the error code is stored when the routine returns NULL. It is OK to pass NULL here. */
++    );
+ /** Close and free the connection to the server. The connection object becomes invalid when this is called. */
+ void pa_simple_free(pa_simple *s);
+@@ -145,6 +159,20 @@ pa_usec_t pa_simple_get_latency(pa_simple *s, int *error);
+ /** Flush the playback buffer. This discards any audio in the buffer. */
+ int pa_simple_flush(pa_simple *s, int *error);
++/** Mute the playback stream */
++int pa_simple_mute(pa_simple *p, int mute, int *rerror);
++
++/** Volume control the playback stream */
++int pa_simple_set_volume(pa_simple *p, int volume, int *rerror);
++
++/** Get stream index */
++int pa_simple_get_stream_index(pa_simple *p, unsigned int *idx, int *rerror);
++
++/** Cork on=1/off=0 stream */
++int pa_simple_cork(pa_simple *p, int cork, int *rerror);
++
++/** Check whether stream is corked or not */
++int pa_simple_is_corked(pa_simple *p);
+ PA_C_DECL_END
index e69de29..7203678 100644 (file)
@@ -0,0 +1,38 @@
+do_compile() {
+ cd ${S}
+ LANG=C
+ export LANG
+ unset DISPLAY
+ CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
+ CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
+ FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
+ LDFLAGS="${LDFLAGS: ${LDFLAGS} }"; export LDFLAGS;
+ LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
+
+ cp -f ${PKG_CONFIG_SYSROOT_DIR}${datadir}/libtool/config/config.guess ${WORKDIR}
+ cp -f ${PKG_CONFIG_SYSROOT_DIR}${datadir}/libtool/config/config.sub ${WORKDIR}
+   CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
+   CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
+   FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
+   LDFLAGS="${LDFLAGS: ${LDFLAGS}}"; export LDFLAGS;
+   autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
+         --target=x86_64-tizen-linux \
+         --program-prefix= \
+         --prefix=${prefix} \
+         --exec-prefix=${prefix} \
+         --bindir=${prefix}/bin \
+         --sbindir=${prefix}/sbin \
+         --sysconfdir=${sysconfdir} \
+         --datadir=${prefix}/share \
+         --includedir=${prefix}/include \
+         --libdir=${prefix}/lib \
+         --libexecdir=${prefix}/libexec \
+         --localstatedir=${localstatedir} \
+         --sharedstatedir=${prefix}/com \
+         --mandir=${mandir} \
+         --infodir=${infodir} --disable-static
+ make -j16
+}
index e69de29..95540f4 100644 (file)
@@ -0,0 +1,67 @@
+SRC_URI += "file://add-subdir-objects-option.patch"
+SRC_URI += "file://add-PA_PROP_MEDIA_POLICY-Define.patch"
+
+
+
+
+do_compile() {
+ cd ${S}
+ LANG=C
+ export LANG
+ unset DISPLAY
+ CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ; 
+ CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
+ FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
+ LD_AS_NEEDED=1; export LD_AS_NEEDED ; 
+   CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
+   CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
+   FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
+    autoreconf -v --install --force
+    ./configure --host=${HOST_SYS}
+   CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ; 
+   CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ; 
+   FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ; 
+   autoreconf -v --install --force
+   ./configure --host=${HOST_SYS} \
+       --enable-audiotest
+ make -j16
+}
+#PACKAGES += "avsystem-dbg"
+
+#avsystem-dbg_files = ""
+#avsystem-dbg_files += "avsystem.manifest"
+avsystem-dbg_files += "${prefix}/local/bin/.debug"
+avsystem-dbg_files += "${prefix}/local/bin/.debug/*"
+avsystem-dbg_files += "${prefix}/local/lib/.debug/*.so.*"
+
+
+avsystem-dev_files = ""
+avsystem-dev_files += "avsystem.manifest"
+avsystem-dev_files += "${prefix}/local/lib/pkgconfig/*.pc"
+avsystem-dev_files += "${prefix}/local/lib/*.so"
+avsystem-dev_files += "${prefix}/local/include/avsystem/*.h"
+
+
+libavsysaudio_files = ""
+libavsysaudio_files += "avsystem.manifest"
+libavsysaudio_files += "${prefix}/local/lib/lib*.so.*"
+libavsysaudio_files += "${prefix}/local/bin/sound_initializer"
+libavsysaudio_files += "${prefix}/local/bin/avsys_volume_dump"
+libavsysaudio_files += "${prefix}/local/bin/avsys_audio_test"
+
+FILES_${PN} = "${avsystem_files}"
+FILES_${PN}-dbg += "${avsystem-dbg_files}"
+FILES_${PN}-dev = "${avsystem-dev_files}"
+FILES_libavsysaudio = "${libavsysaudio_files}"
+
+PKG_avsystem= "avsystem"
+PKG_avsystem-dev= "avsystem-dev"
+PKG_avsystem-dbg = "avsystem-dbg"
+PKG_libavsysaudio= "libavsysaudio"
+
diff --git a/meta-tizen/recipes-tizen/avsystem/avsystem/add-PA_PROP_MEDIA_POLICY-Define.patch b/meta-tizen/recipes-tizen/avsystem/avsystem/add-PA_PROP_MEDIA_POLICY-Define.patch
new file mode 100644 (file)
index 0000000..768f01e
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/avsys-audio-pasimple.c b/avsys-audio-pasimple.c
+index aeeb999..a56d8bc 100644
+--- a/avsys-audio-pasimple.c
++++ b/avsys-audio-pasimple.c
+@@ -39,6 +39,8 @@
+ #define PA_SIMPLE_PERIOD_TIME_FOR_MID_LATENCY_MSEC                    50
+ #define PA_SIMPLE_PERIOD_TIME_FOR_HIGH_LATENCY_MSEC                   75
++#define PA_PROP_MEDIA_POLICY    "media.policy"
++
+ #define MSEC_TO_SAMPLE(samplerate,period_time)                (samplerate*period_time/1000)
+ #define CHECK_VALID_HANDLE(handle) \
diff --git a/meta-tizen/recipes-tizen/avsystem/avsystem/add-subdir-objects-option.patch b/meta-tizen/recipes-tizen/avsystem/avsystem/add-subdir-objects-option.patch
new file mode 100644 (file)
index 0000000..bdaaaff
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/configure.ac b/configure.ac
+index 2df8b4f..316c693 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1,7 +1,7 @@
+ AC_PREREQ(2.52)
+ AC_INIT([avsystem], [1.0])
+-AM_INIT_AUTOMAKE([-Wall -Werror foreign])
++AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects])
+ AC_CONFIG_HEADERS([config.h:config.hin])
+ AC_CONFIG_MACRO_DIR([m4])