[meego-commits] 7669: Changes to Trunk:Testing/pulseaudio

Carsten V. Munk no_reply at build.meego.com
Wed Sep 22 08:36:14 UTC 2010


Hi,
I have made the following changes to pulseaudio in project Trunk:Testing. Please review and accept ASAP.

Thank You,
Carsten V. Munk

[This message was auto-generated]

---

Request #7669:

  submit:   devel:devices:n900:feature11_modem/pulseaudio(r8) -> Trunk:Testing/pulseaudio


Message:
    Enables patches to provide call audio ability on Nokia N900. Automatic Pulseaudio testcases has been run on netbook.

Part of a larger submission which makes FEA#4133, FEA#4134, FEA#4135, FEA#4136 (Call capability) satisfied for ARM/N900. 
Will make MeeGo Handset 1.1 able to make actual audio phone calls on a reference device (N900).

Feature freeze exception granted by Gavin Hindman & co based on material at http://wiki.meego.com/ARM/N900/Features/CallAudio
- please contact them if there's any doubts about permission.

Packaging review welcome, naturally.


State:   new          2010-09-22T01:36:14 cvm
Comment: None



changes files:
--------------
--- pulseaudio.changes
+++ pulseaudio.changes
@@ -0,0 +1,9 @@
+* Wed Sep 22 2010 Carsten V. Munk <carsten at maemo.org> - 0.9.21
+- Add patches that makes pulseaudio support call audio functionality on Nokia N900:
+  old-sink.patch: Several patches related to adding alsa-old sink and build dependancies
+  flat-sink.patch: Patches to include flat sink functionality
+  call-state-tracker.patch: Singleton for central administration if a call is ongoing.  
+  0027-build-add-pulsecore.pc-Nokia-specific.patch: Add pulsecore.pc pkgconfig and headers
+- Fix up packaging to match.
+- These changes have been verified with Jyri Sarha and by automatic test cases on netbook.
+

new:
----
  0027-build-add-pulsecore.pc-Nokia-specific.patch
  call-state-tracker.patch
  flat-sink-branch.patch
  old-sink.patch

spec files:
-----------
--- pulseaudio.spec
+++ pulseaudio.spec
@@ -1,6 +1,6 @@
-# 
-# Do not Edit! Generated by:
-# spectacle version 0.14
+ 
+# Do NOT Edit the Auto-generated Part!
+# Generated by: spectacle version 0.18
 # 
 # >> macros
 # << macros
@@ -25,6 +25,10 @@
 Patch5:     fix-6960-auto-move-to-bluez-sink.patch
 Patch6:     pulseaudio-0.9.21-svolume-arm.patch
 Patch7:     fix-122-CVE-insecure-temporary-file-creation.patch
+Patch8:     old-sink.patch
+Patch9:     call-state-tracker.patch
+Patch10:     flat-sink-branch.patch
+Patch11:     0027-build-add-pulsecore.pc-Nokia-specific.patch
 Requires:   udev >= 145-3
 Requires:   rtkit
 Requires(post):  /sbin/ldconfig
@@ -53,6 +57,7 @@
 BuildRequires:  libatomic_ops-devel
 BuildRequires:  fdupes
 
+
 %description
 PulseAudio is a sound server for Linux and other Unix like operating
 systems. It is intended to be an improved drop-in replacement for the
@@ -98,6 +103,14 @@
 %patch6 -p1
 # fix-122-CVE-insecure-temporary-file-creation.patch
 %patch7 -p1
+# old-sink.patch
+%patch8 -p1
+# call-state-tracker.patch
+%patch9 -p1
+# flat-sink-branch.patch
+%patch10 -p1
+# 0027-build-add-pulsecore.pc-Nokia-specific.patch
+%patch11 -p1
 # >> setup
 # << setup
 
@@ -144,6 +157,10 @@
 rm %{buildroot}%{_libdir}/pulse-%{version}/modules/module-device-manager.so
 rm %{buildroot}%{_bindir}/start-pulseaudio-kde
 rm %{buildroot}%{_sysconfdir}/xdg/autostart/pulseaudio-kde.desktop
+
+install -d                        %{buildroot}/usr/include/pulse-modules-headers/pulsecore/
+install -m 644 src/pulsecore/*.h  %{buildroot}/usr/include/pulse-modules-headers/pulsecore/
+
 # << install post
 %find_lang pulseaudio
 %fdupes  %{buildroot}/%{_datadir}
@@ -154,9 +171,11 @@
 
 %postun -p /sbin/ldconfig
 
-%post module-x11 -p /sbin/ldconfig
 
-%postun module-x11 -p /sbin/ldconfig
+
+
+
+
 
 
 %files -f pulseaudio.lang
@@ -273,6 +292,8 @@
 %{_bindir}/parecord
 %{_libdir}/pulse-0.9.21/modules/module-intended-roles.so
 %{_libdir}/pulse-0.9.21/modules/module-rygel-media-server.so
+%{_libdir}/pulse-0.9.21/modules/module-alsa-sink-old.so
+%{_libdir}/pulse-0.9.21/modules/module-alsa-source-old.so
 # << files
 
 
@@ -304,6 +325,7 @@
 %{_libdir}/pkgconfig/libpulse-mainloop-glib.pc
 %{_libdir}/pkgconfig/libpulse-simple.pc
 %{_libdir}/pkgconfig/libpulse.pc
+%{_libdir}/pkgconfig/pulsecore.pc
 %{_datadir}/vala/vapi/libpulse.vapi
 # << files devel
 

other changes:
--------------

++++++ 0027-build-add-pulsecore.pc-Nokia-specific.patch (new)
--- 0027-build-add-pulsecore.pc-Nokia-specific.patch
+++ 0027-build-add-pulsecore.pc-Nokia-specific.patch
+From a9900dd2f56708ca9a481327ff8215dcd50454ed Mon Sep 17 00:00:00 2001
+From: Ismo Puustinen <ismo.h.puustinen at nokia.com>
+Date: Tue, 30 Sep 2008 18:45:55 +0300
+Subject: [PATCH 027/115] build: add pulsecore.pc (Nokia specific)
+
+Original patch updated for 0.9.14 with pulse/pulsecore/pulsecommon.
+
+Modified for 0.9.21
+
+Signed-off-by: Carsten Valdemar Munk <carsten at maemo.org>
+
+---
+ Makefile.am     |    2 +-
+ configure.ac    |    1 +
+ pulsecore.pc.in |   12 ++++++++++++
+ 3 files changed, 14 insertions(+), 1 deletions(-)
+ create mode 100644 pulsecore.pc.in
+
+diff --git a/Makefile.am b/Makefile.am
+index 2713c0a..63bc545 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -39,7 +39,7 @@ vapidir = $(datadir)/vala/vapi
+ vapi_DATA = vala/libpulse.vapi
+ 
+ pkgconfigdir = $(libdir)/pkgconfig
+-pkgconfig_DATA = libpulse.pc libpulse-simple.pc
++pkgconfig_DATA = libpulse.pc libpulse-simple.pc pulsecore.pc
+ 
+ if HAVE_AVAHI
+ pkgconfig_DATA += \
+diff --git a/configure.ac b/configure.ac
+index 2bc068e..f9fb9c0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1420,6 +1420,7 @@ libpulse.pc
+ libpulse-simple.pc
+ libpulse-browse.pc
+ libpulse-mainloop-glib.pc
++pulsecore.pc
+ doxygen/Makefile
+ doxygen/doxygen.conf
+ src/pulse/version.h
+diff --git a/pulsecore.pc.in b/pulsecore.pc.in
+new file mode 100644
+index 0000000..8f39d59
+--- /dev/null
++++ b/pulsecore.pc.in
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=${prefix}
++libdir=@libdir@
++includedir=${prefix}/include
++libexecdir=@libexecdir@
++pulsetestdir=${libexecdir}/pulse-tests
++
++Name: pulsecore
++Description: Module building interface for pulseaudio
++Version: @PACKAGE_VERSION@
++Libs: -L${libdir} -lpulsecore- at PA_MAJORMINORMICRO@ -lpulsecommon- at PA_MAJORMINORMICRO@ -lpulse @PTHREAD_LIBS@
++Cflags: -D_REENTRANT -I${includedir} -I${includedir}/pulse-modules-headers
+-- 
+1.6.3.3
+

++++++ call-state-tracker.patch (new)
--- call-state-tracker.patch
+++ call-state-tracker.patch
+From e8d58cd2a6443b8f735c3f84c13e3a67bfbf8759 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <ext-tanu.kaskinen at nokia.com>
+Date: Fri, 15 Jan 2010 14:19:55 +0200
+Subject: [PATCH 078/115] call-state-tracker: New component.
+
+This is a quick hack for storing a boolean in pa_core.shared with the "special"
+feature that changing the boolean value fires hooks. The boolean is used to
+store the state of "phone call is active" or "phone call is not active".
+
+This is really silly component, and should be replaced by something more
+generic. A good solution might be to extend pa_core.shared to support value
+change notifications.
+---
+
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -826,6 +826,7 @@ libpulsecore_ at PA_MAJORMINORMICRO@_la_SOURCES = \
+ 		pulsecore/asyncmsgq.c pulsecore/asyncmsgq.h \
+ 		pulsecore/asyncq.c pulsecore/asyncq.h \
+ 		pulsecore/auth-cookie.c pulsecore/auth-cookie.h \
++		pulsecore/call-state-tracker.c pulsecore/call-state-tracker.h \
+ 		pulsecore/cli-command.c pulsecore/cli-command.h \
+ 		pulsecore/cli-text.c pulsecore/cli-text.h \
+ 		pulsecore/client.c pulsecore/client.h \
+
+--- a/dev/null
++++ b/src/pulsecore/call-state-tracker.c
+@@ -0,0 +1,127 @@
++/***
++  This file is part of PulseAudio.
++
++  Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
++
++  PulseAudio is free software; you can redistribute it and/or modify
++  it under the terms of the GNU Lesser General Public License as published
++  by the Free Software Foundation; either version 2.1 of the License,
++  or (at your option) any later version.
++
++  PulseAudio is distributed in the hope that it will be useful, but
++  WITHOUT ANY WARRANTY; without even the implied warranty of
++  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++  General Public License for more details.
++
++  You should have received a copy of the GNU Lesser General Public License
++  along with PulseAudio; if not, write to the Free Software
++  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
++  USA.
++***/
++
++#ifdef HAVE_CONFIG_H
++#include <config.h>
++#endif
++
++#include <pulsecore/core.h>
++#include <pulsecore/hook-list.h>
++#include <pulsecore/log.h>
++#include <pulsecore/macro.h>
++#include <pulsecore/refcnt.h>
++#include <pulsecore/shared.h>
++
++#include "call-state-tracker.h"
++
++struct pa_call_state_tracker {
++    PA_REFCNT_DECLARE;
++
++    pa_core *core;
++    pa_bool_t active;
++    pa_hook hooks[PA_CALL_STATE_HOOK_MAX];
++};
++
++static pa_call_state_tracker* call_state_tracker_new(pa_core *c) {
++    pa_call_state_tracker *t;
++    pa_call_state_hook_t h;
++
++    pa_assert(c);
++
++    t = pa_xnew0(pa_call_state_tracker, 1);
++    PA_REFCNT_INIT(t);
++    t->core = pa_core_ref(c);
++    t->active = FALSE;
++
++    for (h = 0; h < PA_CALL_STATE_HOOK_MAX; h++)
++        pa_hook_init(&t->hooks[h], t);
++
++    pa_assert_se(pa_shared_set(c, "call-state-tracker", t) >= 0);
++
++    return t;
++}
++
++pa_call_state_tracker *pa_call_state_tracker_get(pa_core *core) {
++    pa_call_state_tracker *t;
++
++    if ((t = pa_shared_get(core, "call-state-tracker")))
++        return pa_call_state_tracker_ref(t);
++
++    return call_state_tracker_new(core);
++}
++
++pa_call_state_tracker *pa_call_state_tracker_ref(pa_call_state_tracker *t) {
++    pa_assert(t);
++    pa_assert(PA_REFCNT_VALUE(t) >= 1);
++
++    PA_REFCNT_INC(t);
++
++    return t;
++}
++
++void pa_call_state_tracker_unref(pa_call_state_tracker *t) {
++    pa_call_state_hook_t h;
++
++    pa_assert(t);
++    pa_assert(PA_REFCNT_VALUE(t) >= 1);
++
++    if (PA_REFCNT_DEC(t) > 0)
++        return;
++
++    for (h = 0; h < PA_CALL_STATE_HOOK_MAX; h++)
++        pa_hook_done(&t->hooks[h]);
++
++    pa_assert_se(pa_shared_remove(t->core, "call-state-tracker") >= 0);
++
++    pa_core_unref(t->core);
++
++    pa_xfree(t);
++}
++
++pa_bool_t pa_call_state_tracker_get_active(pa_call_state_tracker *t) {
++    pa_assert(t);
++    pa_assert(PA_REFCNT_VALUE(t) >= 1);
++
++    return t->active;
++}
++
++void pa_call_state_tracker_set_active(pa_call_state_tracker *t, pa_bool_t active) {
++    pa_bool_t changed;
++
++    pa_assert(t);
++    pa_assert(PA_REFCNT_VALUE(t) >= 1);
++
++    changed = active != t->active;
++
++    t->active = active;
++
++    if (changed)
++        pa_hook_fire(&t->hooks[PA_CALL_STATE_HOOK_CHANGED], (void *) active);
++
++    pa_log_debug("Call state set %s (%s)", active ? "active" : "inactive", changed ? "changed" : "not changed");
++}
++
++pa_hook *pa_call_state_tracker_hooks(pa_call_state_tracker *t) {
++    pa_assert(t);
++    pa_assert(PA_REFCNT_VALUE(t) >= 1);
++
++    return t->hooks;
++}
+--- /dev/null
++++ b/src/pulsecore/call-state-tracker.h
+@@ -0,0 +1,60 @@
++#ifndef foocallstatetrackerhfoo
++#define foocallstatetrackerhfoo
++
++/***
++  This file is part of PulseAudio.
++
++  Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
++
++  PulseAudio is free software; you can redistribute it and/or modify
++  it under the terms of the GNU Lesser General Public License as published
++  by the Free Software Foundation; either version 2.1 of the License,
++  or (at your option) any later version.
++
++  PulseAudio is distributed in the hope that it will be useful, but
++  WITHOUT ANY WARRANTY; without even the implied warranty of
++  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++  General Public License for more details.
++
++  You should have received a copy of the GNU Lesser General Public License
++  along with PulseAudio; if not, write to the Free Software
++  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
++  USA.
++***/
++
++/* This is a silly little shared singleton object used by module-nokia-voice
++ * and module-policy-enforcement. The purpose of the object is just to maintain
++ * a boolean state of "call is active" or "call is not active", and to provide
++ * notification hooks for tracking state changes. module-nokia-voice takes care
++ * of setting the correct state whenever it changes, and
++ * module-policy-enforcement listens to those state changes so that it can take
++ * the state into account in its own operation.
++ *
++ * FIXME: It would probably make more sense to implement a generic shared state
++ * system, which would do pretty much the same thing as pa_core.shared, except
++ * that value changes would fire hooks. Or maybe pa_core should have its own
++ * proplist and define a new hook PA_CORE_HOOK_PROPLIST_CHANGED... */
++
++#include <pulsecore/core.h>
++#include <pulsecore/hook-list.h>
++
(20 more lines skipped)

++++++ flat-sink-branch.patch (new)
--- flat-sink-branch.patch
+++ flat-sink-branch.patch
+From 0bfff617385e52ffad4bc3153a6492314e1840be Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <ext-tanu.kaskinen at nokia.com>
+Date: Wed, 11 Nov 2009 13:59:21 +0200
+Subject: [PATCH 024/115] pulsecore: Port the old flat-sink branch to the new upstream code base.
+
+diff --git a/src/modules/module-remap-sink.c b/src/modules/module-remap-sink.c
+index 43748bd..7127fc8 100644
+--- a/src/modules/module-remap-sink.c
++++ b/src/modules/module-remap-sink.c
+@@ -246,6 +246,7 @@ static void sink_input_attach_cb(pa_sink_input *i) {
+     pa_sink_set_max_request_within_thread(u->sink, pa_sink_input_get_max_request(i));
+     pa_sink_set_max_rewind_within_thread(u->sink, pa_sink_input_get_max_rewind(i));
+ 
++    u->sink->flat_volume_sink = i->sink;
+     pa_sink_attach_within_thread(u->sink);
+ }
+ 
+@@ -379,6 +380,7 @@ int pa__init(pa_module*m) {
+     pa_sink_new_data_init(&sink_data);
+     sink_data.driver = __FILE__;
+     sink_data.module = m;
++    sink_data.flat_volume_sink = master;
+     if (!(sink_data.name = pa_xstrdup(pa_modargs_get_value(ma, "sink_name", NULL))))
+         sink_data.name = pa_sprintf_malloc("%s.remapped", master->name);
+     pa_sink_new_data_set_sample_spec(&sink_data, &ss);
+@@ -420,6 +422,7 @@ int pa__init(pa_module*m) {
+     sink_input_data.driver = __FILE__;
+     sink_input_data.module = m;
+     sink_input_data.sink = master;
++    sink_input_data.origin_sink = u->sink;
+     pa_proplist_sets(sink_input_data.proplist, PA_PROP_MEDIA_NAME, "Remapped Stream");
+     pa_proplist_sets(sink_input_data.proplist, PA_PROP_MEDIA_ROLE, "filter");
+     pa_sink_input_new_data_set_sample_spec(&sink_input_data, &ss);
+diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c
+index aa84ccb..c1d2fd8 100644
+--- a/src/pulsecore/sink-input.c
++++ b/src/pulsecore/sink-input.c
+@@ -279,6 +279,7 @@ int pa_sink_input_new(
+     i->driver = pa_xstrdup(pa_path_get_filename(data->driver));
+     i->module = data->module;
+     i->sink = data->sink;
++    i->origin_sink = data->origin_sink;
+     i->client = data->client;
+ 
+     i->requested_resample_method = data->resample_method;
+@@ -286,6 +287,20 @@ int pa_sink_input_new(
+     i->sample_spec = data->sample_spec;
+     i->channel_map = data->channel_map;
+ 
++    /* If this sink input is an intermediary stream from a flattened sink, make
++     * sure that the stream is played at 0dB. */
++    if (i->origin_sink) {
++        if (data->volume_is_set) {
++            if (!data->volume_is_absolute)
++                pa_log_debug("Overriding data->volume_is_absolute for a flattened sink output.");
++            if (!pa_cvolume_is_norm(&data->volume))
++                pa_log_debug("Overriding data->volume for a flattened sink output.");
++        }
++        data->volume_is_set = TRUE;
++        data->volume_is_absolute = TRUE;
++        pa_cvolume_reset(&data->volume, i->sample_spec.channels);
++    }
++
+     if ((i->sink->flags & PA_SINK_FLAT_VOLUME) && !data->volume_is_absolute) {
+         pa_cvolume remapped;
+ 
+diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h
+index 415a801..8bf842d 100644
+--- a/src/pulsecore/sink-input.h
++++ b/src/pulsecore/sink-input.h
+@@ -82,6 +82,7 @@ struct pa_sink_input {
+     pa_client *client;                  /* may be NULL */
+ 
+     pa_sink *sink; /* NULL while we are being moved */
++    pa_sink *origin_sink; /* may be NULL */
+ 
+     /* A sink input may be connected to multiple source outputs
+      * directly, so that they don't get mixed data of the entire
+@@ -267,6 +268,7 @@ typedef struct pa_sink_input_new_data {
+     pa_client *client;
+ 
+     pa_sink *sink;
++    pa_sink *origin_sink;
+ 
+     pa_resample_method_t resample_method;
+ 
+diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c
+index c8ad48a..0ad8f1a 100644
+--- a/src/pulsecore/sink.c
++++ b/src/pulsecore/sink.c
+@@ -1,7 +1,7 @@
+ /***
+   This file is part of PulseAudio.
+ 
+-  Copyright 2004-2006 Lennart Poettering
++  Copyright 2004-2006, 2009 Lennart Poettering
+   Copyright 2006 Pierre Ossman <ossman at cendio.se> for Cendio AB
+ 
+   PulseAudio is free software; you can redistribute it and/or modify
+@@ -247,6 +247,7 @@ pa_sink* pa_sink_new(
+     s->driver = pa_xstrdup(pa_path_get_filename(data->driver));
+     s->module = data->module;
+     s->card = data->card;
++    s->flat_volume_sink = data->flat_volume_sink;
+ 
+     s->priority = pa_device_init_priority(s->proplist);
+ 
+@@ -1191,6 +1192,13 @@ static void compute_reference_ratios(pa_sink *s) {
+         unsigned c;
+         pa_cvolume remapped;
+ 
++        if (i->origin_sink) {
++            /* go recursively on slaved flattened sink
++             * and ignore this intermediate sink-input. */
++            compute_reference_ratios(i->origin_sink);
++            continue;
++        }
++
+         /*
+          * Calculates the reference volume from the sink's reference
+          * volume. This basically calculates:
+@@ -1236,6 +1244,13 @@ static void compute_real_ratios(pa_sink *s) {
+         unsigned c;
+         pa_cvolume remapped;
+ 
++        if (i->origin_sink) {
++            /* go recursively on slaved flattened sink
++             * and ignore this intermediate sink-input. */
++            compute_real_ratios(i->origin_sink);
++            continue;
++        }
++
+         /*
+          * This basically calculates:
+          *
+@@ -1277,22 +1292,82 @@ static void compute_real_ratios(pa_sink *s) {
+ }
+ 
+ /* Called from main thread */
+-static void compute_real_volume(pa_sink *s) {
++static void get_maximum_input_volume(pa_sink *s, pa_cvolume *max_volume, const pa_channel_map *channel_map) {
+     pa_sink_input *i;
+     uint32_t idx;
+ 
+     pa_sink_assert_ref(s);
++    pa_assert(max_volume);
++    pa_assert(channel_map);
++
++    PA_IDXSET_FOREACH(i, s->inputs, idx) {
++        pa_cvolume remapped_volume;
++
++        if (i->origin_sink) {
++            /* go recursively on slaved flatten sink
++             * and ignore this intermediate sink-input. */
++            get_maximum_input_volume(i->origin_sink, max_volume, channel_map);
++            continue;
++        }
++
++        remapped_volume = i->volume;
++        pa_cvolume_remap(&remapped_volume, &i->channel_map, channel_map);
++        pa_cvolume_merge(max_volume, max_volume, &remapped_volume);
++    }
++}
++
++static pa_bool_t flat_sink_has_inputs(pa_sink *s) {
++    pa_sink_input *i;
++    uint32_t idx;
++
++    if (pa_idxset_isempty(s->inputs))
++        return FALSE;
++
++    if (!(s->flags & PA_SINK_FLAT_VOLUME))
++        return TRUE;
++
++    PA_IDXSET_FOREACH(i, s->inputs, idx) {
++        if (!i->origin_sink || flat_sink_has_inputs(i->origin_sink))
++            return TRUE;
++    }
++
++    return FALSE;
++}
++
++/* Called from main thread. */
++static void update_flattened_real_volume(pa_sink *s, pa_cvolume *new_volume, pa_channel_map *channel_map) {
++    pa_sink_input *i;
++    uint32_t idx;
++
++    pa_sink_assert_ref(s);
++    pa_assert(new_volume);
++    pa_assert(channel_map);
++
++    s->real_volume = *new_volume;
++    pa_cvolume_remap(&s->real_volume, channel_map, &s->channel_map);
++
++    if (s->flags & PA_SINK_FLAT_VOLUME)
++        PA_IDXSET_FOREACH(i, s->inputs, idx)
++            if (i->origin_sink)
++                update_flattened_real_volume(i->origin_sink, new_volume, channel_map);
(429 more lines skipped)

++++++ old-sink.patch (new)
--- old-sink.patch
+++ old-sink.patch
+Several patches related to adding alsa-old sink and build dependancies, needed for Nokia N900 call audio.
+
+Signed-off-by: Carsten Valdemar Munk <carsten at maemo.org>
+
+From 6e12aeb6fbada5df342186890fa7c26609620587 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <ext-tanu.kaskinen at nokia.com>
+Date: Wed, 28 Oct 2009 14:53:00 +0200
+Subject: [PATCH 001/115] alsa-old: Import the alsa-*-old modules from 0.9.15. DOESN'T COMPILE YET
+
+From dd3d45d6638b2573cb829f728c72fe60f6039a75 Mon Sep 17 00:00:00 2001
+From: Jyri Sarha <jyri.sarha at nokia.com>
+Date: Wed, 14 Oct 2009 18:14:15 +0300
+Subject: [PATCH 002/115] alsa-old: Move buffer mode switching to IO thread with internal message. DOESN'T COMPILE YET
+
+From 973ab1d5df1e598f90185291f799d42212f66cd2 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <ext-tanu.kaskinen at nokia.com>
+Date: Wed, 28 Oct 2009 14:55:59 +0200
+Subject: [PATCH 003/115] alsa-old: Adapt to the changed pa_alsa_set_hw_params() interface. DOESN'T COMPILE YET
+
+From aa2d59bc49495f6c584e91c244afc887c080b58e Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <ext-tanu.kaskinen at nokia.com>
+Date: Thu, 29 Oct 2009 10:28:21 +0200
+Subject: [PATCH 004/115] alsa-old: Adapt to the changed pa_alsa_set_sw_params() interface. DOESN'T COMPILE YET
+
+From 1b940121890d9bbfbfd904bfcf707f9d2eb397ba Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <ext-tanu.kaskinen at nokia.com>
+Date: Thu, 29 Oct 2009 11:02:00 +0200
+Subject: [PATCH 005/115] alsa-old: Remove the deprecated pa_rtpoll_install() calls. DOESN'T COMPILE YET
+
+From 9e745a371aa426896ab9a5adfc88ef3d34c08e3b Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <ext-tanu.kaskinen at nokia.com>
+Date: Thu, 29 Oct 2009 16:14:13 +0200
+Subject: [PATCH 015/115] alsa-old: Adapt to the changed pa_alsa_open_by_device_{id_auto,string}() interfaces. DOESN'T COMPILE YET
+
+From 15a987643119ee5d8c3269bc651b0dc261fdbd32 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <ext-tanu.kaskinen at nokia.com>
+Date: Fri, 30 Oct 2009 11:10:52 +0200
+Subject: [PATCH 016/115] alsa-old: Adapt to the changed pa_alsa_init_proplist_pcm() interface. DOESN'T COMPILE YET
+
+From 1cc771d340248547c0253ec0b35e0a1513bb74f1 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <ext-tanu.kaskinen at nokia.com>
+Date: Fri, 30 Oct 2009 13:17:18 +0200
+Subject: [PATCH 017/115] alsa-old: Use pa_{sink,source}_set_fixed_latency() for setting the fixed latency. DOESN'T COMPILE YET
+
+From b845e8482393bdbbc80c5b8af90253a2ca79aa06 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <ext-tanu.kaskinen at nokia.com>
+Date: Fri, 30 Oct 2009 13:23:35 +0200
+Subject: [PATCH 018/115] alsa-old: Adapt to the changed pa_{sink,source}_suspend() interfaces. DOESN'T COMPILE YET
+
+From 5fa328a247b8c99f4fc24cf6651bf3361858343b Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <ext-tanu.kaskinen at nokia.com>
+Date: Fri, 30 Oct 2009 14:28:54 +0200
+Subject: [PATCH 019/115] alsa-old: pa_source.virtual_volume doesn't exist anymore, use pa_source.volume instead. DOESN'T COMPILE YET
+
+From c800d253021055c3704415b469bd980260e338e2 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <ext-tanu.kaskinen at nokia.com>
+Date: Fri, 30 Oct 2009 16:27:55 +0200
+Subject: [PATCH 045/115] alsa-old: Adapt partially to the changed alsa mixer handling interfaces.
+
+The mixer handling in module-alsa-source-old isn't yet fully converted to the
+new mixer logic, which is why we need two deprecated functions in
+alsa-util-old.* for now.
+
+From c5d6e0b16bfa070d81e88264d850b5f456eac910 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Juho=20H=C3=A4m=C3=A4l=C3=A4inen?= <ext-juho.hamalainen at nokia.com>
+Date: Wed, 21 Oct 2009 12:19:39 +0300
+Subject: [PATCH 046/115] alsa-old: update buffer metrics correctly to proplist
+
+From e951e583766fc5200fcd643f1748d24d3fc7601a Mon Sep 17 00:00:00 2001
+From: Jyri Sarha <jyri.sarha at nokia.com>
+Date: Mon, 7 Dec 2009 18:17:31 +0200
+Subject: [PATCH 065/115] alsa-old: Don't push the first captured frames
+
+The first captured frames after device open on N900 may be crap, so
+let's skip them.
+From eba993273eee5e2311302bce770aedb7d27200bc Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <ext-tanu.kaskinen at nokia.com>
+Date: Thu, 10 Dec 2009 15:56:50 +0200
+Subject: [PATCH 068/115] alsa-old: Split the modules into a module part and a library part.
+
+This makes it possible for module-alsa-card to load "old" alsa sinks and
+sources.
+
+From 535c8d39ed1df891252e52138c3aeeaf2a1d6ec7 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <ext-tanu.kaskinen at nokia.com>
+Date: Fri, 11 Dec 2009 14:33:29 +0200
+Subject: [PATCH 069/115] alsa-old: Copy (and adapt as needed) volume handling with ports from the upstream modules.
+
+From e04faa694d7f1a062d67a861aec5fcbd543260ac Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <ext-tanu.kaskinen at nokia.com>
+Date: Wed, 16 Dec 2009 14:52:07 +0200
+Subject: [PATCH 070/115] alsa-old: Add the 'paths' argument to the modules, and use it to generate a mapping.
+
+From f88bbb58557024ce64850d7b740714accc2106ad Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <ext-tanu.kaskinen at nokia.com>
+Date: Tue, 22 Dec 2009 13:59:31 +0200
+Subject: [PATCH 074/115] alsa-old: Add "db_fixes" argument to the modules and make the mapping parameter of sink/source_old_new() mandatory.
+
+Having the mapping parameter mandatory simplifies mixer setup.
+
+From 4fafdd24deb52929d3ac368c5b0bced2f70a79ec Mon Sep 17 00:00:00 2001
+From: Jyri Sarha <jyri.sarha at nokia.com>
+Date: Tue, 25 May 2010 19:42:05 +0300
+Subject: [PATCH 115/115] alsa-old: Fix period_frames calculation from start suspended code
+
+From 46b1ae641bbfe209ce1837c7795177b7d604949b Mon Sep 17 00:00:00 2001
+From: Jyri Sarha <jyri.sarha at nokia.com>
+Date: Wed, 22 Jul 2009 12:00:59 +0300
+Subject: [PATCH 037/115] core: Add infrastructure for delayed HW volume setting
+
+To make concurrent use of SW and HW volume glitchles their application
+needs to be syncronized. For accurate syncronization the HW volume
+needs to be applied in IO thread. This patch adds infrastructure to
+delay the applying of HW volume to match with SW volume. For this patch
+to have any effect it needs to be taken into use by sink implementor.
+
+From 6c573b1a03cfe2f6e5b649371f002be60ea3cf01 Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <ext-tanu.kaskinen at nokia.com>
+Date: Mon, 21 Dec 2009 14:11:31 +0200
+Subject: [PATCH 072/115] alsa-mixer: Add DecibelFix section to the profile set config file format.
+
+This commit only implements the parser, the decibel fix data is not yet used
+for anything.
+
+From 91fe0803afe864016e446cb1535cac5e5826fe5c Mon Sep 17 00:00:00 2001
+From: Tanu Kaskinen <ext-tanu.kaskinen at nokia.com>
+Date: Tue, 29 Dec 2009 14:51:09 +0200
+Subject: [PATCH 073/115] alsa-mixer: Use decibel fixes when getting and setting decibel volumes.
+
+---
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 598e77f..4eed8b9 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -84,8 +84,8 @@ AM_CFLAGS = \
+ 	-DAO_REQUIRE_CAS \
+ 	-DPULSE_LOCALEDIR=\"$(pulselocaledir)\" \
+ 	-DPA_MACHINE_ID=\"$(localstatedir)/lib/dbus/machine-id\" \
+-        -DPA_ALSA_PATHS_DIR=\"$(alsapathsdir)\" \
+-        -DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\"
++	-DPA_ALSA_PATHS_DIR=\"$(alsapathsdir)\" \
++	-DPA_ALSA_PROFILE_SETS_DIR=\"$(alsaprofilesetsdir)\"
+ 
+ AM_LIBADD = $(PTHREAD_LIBS) $(INTLLIBS)
+ AM_LDADD = $(PTHREAD_LIBS) $(INTLLIBS)
+@@ -1082,7 +1082,9 @@ modlibexec_LTLIBRARIES += \
+ 		libalsa-util.la \
+ 		module-alsa-sink.la \
+ 		module-alsa-source.la \
+-		module-alsa-card.la
++		module-alsa-card.la \
++		module-alsa-sink-old.la \
++		module-alsa-source-old.la
+ 
+ alsaprofilesets_DATA = ${ALSA_PROFILES}
+ 
+@@ -1219,6 +1221,8 @@ SYMDEF_FILES = \
+ 		modules/alsa/module-alsa-sink-symdef.h \
+ 		modules/alsa/module-alsa-source-symdef.h \
+ 		modules/alsa/module-alsa-card-symdef.h \
++		modules/alsa/module-alsa-sink-old-symdef.h \
++		modules/alsa/module-alsa-source-old-symdef.h \
+ 		modules/module-solaris-symdef.h \
+ 		modules/module-waveout-symdef.h \
+ 		modules/module-detect-symdef.h \
+@@ -1428,7 +1432,15 @@ module_oss_la_LIBADD = $(AM_LIBADD) liboss-util.la libpulsecore- at PA_MAJORMINORMI
+ 
+ # ALSA
+ 
+-libalsa_util_la_SOURCES = modules/alsa/alsa-util.c modules/alsa/alsa-util.h modules/alsa/alsa-mixer.c modules/alsa/alsa-mixer.h modules/alsa/alsa-sink.c modules/alsa/alsa-sink.h modules/alsa/alsa-source.c modules/alsa/alsa-source.h modules/reserve-wrap.c modules/reserve-wrap.h
++libalsa_util_la_SOURCES = \
++		modules/alsa/alsa-util.c modules/alsa/alsa-util.h \
++		modules/alsa/alsa-util-old.c modules/alsa/alsa-util-old.h \
++		modules/alsa/alsa-mixer.c modules/alsa/alsa-mixer.h \
++		modules/alsa/alsa-sink.c modules/alsa/alsa-sink.h \
++		modules/alsa/alsa-source.c modules/alsa/alsa-source.h \
++		modules/reserve-wrap.c modules/reserve-wrap.h \
++		modules/alsa/alsa-sink-old.c modules/alsa/alsa-sink-old.h \
++		modules/alsa/alsa-source-old.c modules/alsa/alsa-source-old.h
+ libalsa_util_la_LDFLAGS = -avoid-version
+ libalsa_util_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS) libpulsecore- at PA_MAJORMINORMICRO@.la libpulsecommon- at PA_MAJORMINORMICRO@.la libpulse.la
+ libalsa_util_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS)
+@@ -1466,6 +1478,16 @@ module_alsa_card_la_LDFLAGS = $(MODULE_LDFLAGS)
+ module_alsa_card_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS) libalsa-util.la libpulsecore- at PA_MAJORMINORMICRO@.la libpulsecommon- at PA_MAJORMINORMICRO@.la libpulse.la
+ module_alsa_card_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS)
+ 
++module_alsa_sink_old_la_SOURCES = modules/alsa/module-alsa-sink-old.c
++module_alsa_sink_old_la_LDFLAGS = $(MODULE_LDFLAGS)
++module_alsa_sink_old_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS) libalsa-util.la libpulsecore- at PA_MAJORMINORMICRO@.la libpulsecommon- at PA_MAJORMINORMICRO@.la libpulse.la
++module_alsa_sink_old_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS)
++
++module_alsa_source_old_la_SOURCES = modules/alsa/module-alsa-source-old.c
++module_alsa_source_old_la_LDFLAGS = $(MODULE_LDFLAGS)
++module_alsa_source_old_la_LIBADD = $(AM_LIBADD) $(ASOUNDLIB_LIBS) libalsa-util.la libpulsecore- at PA_MAJORMINORMICRO@.la libpulsecommon- at PA_MAJORMINORMICRO@.la libpulse.la
++module_alsa_source_old_la_CFLAGS = $(AM_CFLAGS) $(ASOUNDLIB_CFLAGS)
++
+ # Solaris
(4929 more lines skipped)

++++++ pulseaudio.yaml
--- pulseaudio.yaml
+++ pulseaudio.yaml
@@ -20,6 +20,10 @@
     - fix-6960-auto-move-to-bluez-sink.patch
     - pulseaudio-0.9.21-svolume-arm.patch
     - fix-122-CVE-insecure-temporary-file-creation.patch
+    - old-sink.patch
+    - call-state-tracker.patch
+    - flat-sink-branch.patch 
+    - 0027-build-add-pulsecore.pc-Nokia-specific.patch
 Description: |
     PulseAudio is a sound server for Linux and other Unix like operating
     systems. It is intended to be an improved drop-in replacement for the




More information about the MeeGo-commits mailing list