I have made the following changes intended for : CE:Adaptation:N900 / pulseaudio-modules-n900
Please review and accept ASAP - BOSS has already processed this request and suggests ??? See the "Messages from BOSS" section below https://build.pub.meego.com/request/show/2742 Thank You, bossbot ([email protected]) [This message was auto-generated] --- Request # 2742: Messages from BOSS: None State: new 2011-10-25T07:41:02 bossbot Reviews: from bossbot :BOSS suggests accepting this review. See email for more details. BOSS accepted this review because: Target repo CE_Mer_Core_armv7hl found. accepted on No date Changes: submit: home:stskeeps:mer:hw:n900 / pulseaudio-modules-n900 -> CE:Adaptation:N900 / pulseaudio-modules-n900 Index: pa-0.9.22-Insert-PA_LOG_NOTICE-at-param-of-pa_log_ratelim_B.patch =================================================================== --- pa-0.9.22-Insert-PA_LOG_NOTICE-at-param-of-pa_log_ratelim_B.patch (revision 0) +++ pa-0.9.22-Insert-PA_LOG_NOTICE-at-param-of-pa_log_ratelim_B.patch (revision 1) @@ -0,0 +1,16 @@ +diff --git a/src/cmtspeech/cmtspeech-sink-input.c b/src/cmtspeech/cmtspeech-sink-input.c +index 4650531..a27a156 100644 +--- a/src/cmtspeech/cmtspeech-sink-input.c ++++ b/src/cmtspeech/cmtspeech-sink-input.c +@@ -177,7 +177,7 @@ static int cmtspeech_sink_input_pop_cb(pa_sink_input *i, size_t length, pa_memch + cmtspeech_dl_sideinfo_forward(u); + } + else { +- if (u->cmt_connection.first_dl_frame_received && pa_log_ratelimit()) ++ if (u->cmt_connection.first_dl_frame_received && pa_log_ratelimit(PA_LOG_NOTICE)) + pa_log_debug("No DL audio: %d bytes in queue %d needed", + pa_memblockq_get_length(u->dl_memblockq), u->dl_frame_size); + cmtspeech_dl_sideinfo_bogus(u); +-- +1.7.2.3 + Index: pulseaudio-modules-n900.changes =================================================================== --- pulseaudio-modules-n900.changes (revision 0) +++ pulseaudio-modules-n900.changes (revision 1) @@ -0,0 +1,67 @@ +* Tue Apr 26 2011 Sami Sirkia <[email protected]> - 0.9.19.0.11 +- Added a change that was lost in cleanup. (BMC#15950) +- Merged the pa-0.9.22-audio-routing-null-pointer-fix.patch + into earlier pa-0.9.22-remove-flat-volume-for-n900.patch + +* Thu Apr 21 2011 Jouni Peltonen <[email protected]> - 0.9.19.0.11 +- Audio routing updated to handle also NULL valued + pointers with meego_parameter_update_args. (BMC#15950) + Added pa-0.9.22-audio-routing-null-pointer-fix.patch + +* Wed Apr 13 2011 Sami Sirkia <[email protected]> - 0.9.19.0.11 +- Missing header files added into -devel rpm. (still part of BMC#15688) + Needed by pulseaudio-modules-nokia. + +* Wed Apr 13 2011 Sami Sirkia <[email protected]> - 0.9.19.0.11 +- Added patches to be compatible with PA .22 (BMC#15688) + Stopped using flat_volume_sink. Most patches copied from modules-mfld. + +* Fri Mar 4 2011 Sami Sirkia <[email protected]> - 0.9.19.0.11 +- Partial fix for BMC#8108: [N900] Volume control does not work + Enabled mainvolume module in build and added as separate rpm. +- Removed unnecessary ldconfigs +- Got rid of many %excludes with '%configure --disable-static' +- Changed Group: Multimedia/PulseAudio +- Corrected spelling of PulseAudio + +* Thu Feb 17 2011 Sami Sirkia <[email protected]> - 0.9.19.0.11 +- Added missing ExclusiveArch: %arm as clearly requested in BMC#12745 +- Renamed as requested in BMC#12745 : modules-meego -> modules-n900 +- Went back to the 0.9.19.0.11 style versioning. Recommended by upstream. +- Source.tar is git tag 0.9.19.0-11_released. No diff to previous source. +- Package now yamlified. +- pulseaudio-modules-n900-static-*.rpm removed as unnecessary. + +* Mon Jan 10 2011 Sami Sirkia <[email protected]> - 1.0 +- This is part of fullfilling Fea 6701 Policy - Audio Policy for n900 +- Dropped patch requiring PA version .21 +- Changed into sane versioning, independent of PA version. + +* Wed Oct 27 2010 Jouni Peltonen <[email protected]> - 0.9.21.0.20100915 +- New call states added to cmtspeech module patch. +- Buffer change signal sent to old_alsa_sink only when needed. +- Added 1 second sleepon cmtspeech disconnect to give busytone after call. + +* Thu Oct 26 2010 Jouni Peltonen <[email protected]> - 0.9.21.0.20100915 +- Cmtspeech module patch changed to include alsa_sink_old primary and alternative + buffer switching. Part of the fix for BMC#8423, BMC#8428 and BMC#8605. + +* Tue Oct 14 2010 Sami Sirkia <[email protected]> - 0.9.21.0.20100915 +- Unnecessary build requirements removed. +- Requirement for libpulse-browse causes pulseaudio-modules-meego to fail, + since it is no longer available. + +* Tue Oct 6 2010 Sami Sirkia <[email protected]> - 0.9.21.0.20100915 +- Part of the solution for Bug 8039: "Current N900 telephony audio + implementation does not live up to audio standards required + by 3GPP for handsets on networks" +- Updated source package to 0.9.19.0-20100915 +- Added static libs into pulseaudio-module-meego-static.rpm +- Updated the include file paths to new style in -devel.rpm + +* Tue Sep 21 2010 Marko Saukko <[email protected]> - 0.9.21.0 +- Cleaned up the packagaging. +- Renamed to pulseaudio-modules-meego +- Renamed some patches +- This package implements part of implementation for FEA#4134 FEA#4135 FEA#4136 on ARM + (Dialer - Make a Call, Receive a Call, End Call) Index: maemo-multimedia-pulseaudio-modules-meego-0.9.19.0-11_released.tar.gz =================================================================== Binary file maemo-multimedia-pulseaudio-modules-meego-0.9.19.0-11_released.tar.gz added Index: pulseaudio-modules-n900.spec =================================================================== --- pulseaudio-modules-n900.spec (revision 0) +++ pulseaudio-modules-n900.spec (revision 1) @@ -0,0 +1,216 @@ +# +# Do NOT Edit the Auto-generated Part! +# Generated by: spectacle version 0.22 +# +# >> macros +# << macros + +Name: pulseaudio-modules-n900 +Summary: PulseAudio modules for Nokia N900 handset +Version: 0.9.19.0.11 +Release: 0 +Group: Multimedia/PulseAudio +License: LGPLv2.1+ +ExclusiveArch: %arm +URL: http://meego.gitorious.org/maemo-multimedia/pulseaudio-modules-meego +Source0: maemo-multimedia-pulseaudio-modules-meego-0.9.19.0-11_released.tar.gz +Source100: pulseaudio-modules-n900.yaml +Patch0: %{name}-include-call-state-tracker_h.patch +Patch1: %{name}-cmtspeech-ofono.patch +Patch2: pa-0.9.22-alignment-with-new-pa_thread_new-for-cmtspeech.patch +Patch3: pa-0.9.22-Insert-PA_LOG_NOTICE-at-param-of-pa_log_ratelim_B.patch +Patch4: pa-0.9.19-mfld-common-updated-parameter-hook-interface.patch +Patch5: pa-0.9.22-remove-flat-volume-for-n900.patch +BuildRequires: pkgconfig(check) +BuildRequires: pkgconfig(dbus-1) +BuildRequires: pkgconfig(pulsecore) +BuildRequires: libcmtspeechdata-devel +BuildRequires: libtool-ltdl-devel + + +%description +PulseAudio modules for Nokia N900 handset. + + +%package devel +Summary: Development files for MeeGo PulseAudio modules for N900 +Group: Development/Libraries +Requires: %{name}-common = %{version}-%{release} +Requires: %{name}-music = %{version}-%{release} +Requires: %{name}-record = %{version}-%{release} +Requires: %{name}-voice = %{version}-%{release} +Requires: %{name}-cmtspeech = %{version}-%{release} +Requires: %{name}-mainvolume = %{version}-%{release} + +%description devel +This package contains development headers for MeeGo PulseAudio modules + +%package common +Summary: Common libs for the MeeGo PulseAudio modules +Group: Multimedia/PulseAudio + +%description common +This contains common libs for the MeeGo PulseAudio modules. + +%package music +Summary: Music module for PulseAudio +Group: Multimedia/PulseAudio +Requires: %{name}-common = %{version}-%{release} + +%description music +This contains music module for MeeGo PulseAudio + +%package record +Summary: Cmtspeech module for PulseAudio +Group: Multimedia/PulseAudio +Requires: %{name}-common = %{version}-%{release} + +%description record +This contains record module for MeeGo PulseAudio + +%package voice +Summary: Voice module for PulseAudio +Group: Multimedia/PulseAudio +Requires: %{name}-common = %{version}-%{release} + +%description voice +This contains voice module for MeeGo PulseAudio + +%package cmtspeech +Summary: Cmtspeech module for PulseAudio +Group: Multimedia/PulseAudio +Requires: %{name}-common = %{version}-%{release} + +%description cmtspeech +This contains cmtspeech module for MeeGo PulseAudio with Nokia N900 modem + +%package mainvolume +Summary: Mainvolume module for PulseAudio +Group: Multimedia/PulseAudio +Requires: %{name}-common = %{version}-%{release} + +%description mainvolume +This contains mainvolume module for MeeGo PulseAudio + + +%prep +%setup -q -n maemo-multimedia-pulseaudio-modules-meego + +# %{name}-include-call-state-tracker_h.patch +%patch0 -p1 +# %{name}-cmtspeech-ofono.patch +%patch1 -p1 +# pa-0.9.22-alignment-with-new-pa_thread_new-for-cmtspeech.patch +%patch2 -p1 +# pa-0.9.22-Insert-PA_LOG_NOTICE-at-param-of-pa_log_ratelim_B.patch +%patch3 -p1 +# pa-0.9.19-mfld-common-updated-parameter-hook-interface.patch +%patch4 -p1 +# pa-0.9.22-remove-flat-volume-for-n900.patch +%patch5 -p1 +# >> setup +# << setup + +%build +# >> build pre +autoreconf -vfi +# << build pre + +%configure --disable-static +make %{?jobs:-j%jobs} + +# >> build post +# << build post +%install +rm -rf %{buildroot} +# >> install pre +# << install pre +%make_install + +# >> install post +install -d %{buildroot}/usr/include/pulse-modules-headers/modules/meego/ +install -m 644 src/common/algorithm-hook.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/ +install -m 644 src/common/memory.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/ +install -m 644 src/common/optimized.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/ +install -m 644 src/common/pa-optimized.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/ +install -m 644 src/common/parameter-hook.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/ +install -m 644 src/common/parameter-hook-implementor.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/ +install -m 644 src/common/proplist-meego.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/ +install -m 644 src/common/src-48-to-8.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/ +install -m 644 src/common/src-8-to-48.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/ +install -m 644 src/voice/module-voice-api.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/ +install -m 644 src/music/module-music-api.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/ +install -m 644 src/record/module-record-api.h %{buildroot}/usr/include/pulse-modules-headers/modules/meego/ +# << install post + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +%files devel +%defattr(-,root,root,-) +# >> files devel +%{_includedir}/pulse-modules-headers/modules/meego/* +%exclude %{_libdir}/pulse-0.9.22/modules/module-meego-test.so +# << files devel + +%files common +%defattr(-,root,root,-) +# >> files common +%{_libdir}/pulse-0.9.22/modules/libmeego-common.so +# << files common + +%files music +%defattr(-,root,root,-) +# >> files music +%{_libdir}/pulse-0.9.22/modules/module-meego-music.so +# << files music + +%files record +%defattr(-,root,root,-) +# >> files record +%{_libdir}/pulse-0.9.22/modules/module-meego-record.so +# << files record + +%files voice +%defattr(-,root,root,-) (16 more lines skipped) Index: pa-0.9.22-cmtspeech-connection-alignment-with-new-pa_thread_ne.patch =================================================================== --- pa-0.9.22-cmtspeech-connection-alignment-with-new-pa_thread_ne.patch (revision 0) +++ pa-0.9.22-cmtspeech-connection-alignment-with-new-pa_thread_ne.patch (revision 1) @@ -0,0 +1,26 @@ +From 77d344f72715badcdfbc2d5106b783b8b193fe64 Mon Sep 17 00:00:00 2001 +From: Mael Pouessel <[email protected]> +Date: Tue, 5 Apr 2011 10:54:55 +0200 +Subject: [PATCH 23/28] cmtspeech-connection: alignment with new pa_thread_new API + Signed-off-by: Mael Pouessel <[email protected]> + +--- + src/cmtspeech-ifx/cmtspeech-connection.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/cmtspeech-ifx/cmtspeech-connection.c b/src/cmtspeech-ifx/cmtspeech-connection.c +index 7d03437..4e76ff3 100644 +--- a/src/cmtspeech-ifx/cmtspeech-connection.c ++++ b/src/cmtspeech-ifx/cmtspeech-connection.c +@@ -642,7 +642,7 @@ int cmtspeech_connection_init(struct userdata *u) + c->ul_prepare_time_usec = DEFAULT_PROCESSING_TIME_USEC; + c->adjust_time_usec = 0; + +- if (!(c->thread = pa_thread_new(thread_func, u))) { ++ if (!(c->thread = pa_thread_new("cmtspeech",thread_func, u))) { + pa_log_error("Failed to create thread."); + pa_atomic_store(&c->thread_state, CMT_QUIT); + cmtspeech_connection_unload(u); +-- +1.7.2.3 + Index: pa-0.9.22-remove-flat-volume-for-n900.patch =================================================================== --- pa-0.9.22-remove-flat-volume-for-n900.patch (revision 0) +++ pa-0.9.22-remove-flat-volume-for-n900.patch (revision 1) @@ -0,0 +1,742 @@ +diff -ruN a/bootstrap.sh c/bootstrap.sh +--- a/bootstrap.sh 2010-09-15 10:44:14.000000000 +0300 ++++ c/bootstrap.sh 2011-04-11 10:19:22.241078002 +0300 +@@ -9,6 +9,6 @@ + export CFLAGS=${CFLAGS-"-g -O0"} + + if test "x$NOCONFIGURE" = "x"; then +- ./configure --enable-maintainer-mode --disable-processing --enable-shave "$@" ++ ./configure --disable-processing --enable-shave "$@" + make clean + fi +diff -ruN a/configure.ac c/configure.ac +--- a/configure.ac 2010-09-15 10:44:14.000000000 +0300 ++++ c/configure.ac 2011-04-11 10:19:22.241078002 +0300 +@@ -2,7 +2,7 @@ + + m4_define(PA_MAJOR, [0]) + m4_define(PA_MINOR, [9]) +-m4_define(PA_MICRO, [19]) ++m4_define(PA_MICRO, [22]) + + AC_INIT([pulseaudio-meego], [PA_MAJOR.PA_MINOR.PA_MICRO.0], [[email protected]]) + AC_CONFIG_HEADER([config.h]) +diff -ruN a/src/common/src-16-to-48.c c/src/common/src-16-to-48.c +--- a/src/common/src-16-to-48.c 2010-09-15 10:44:14.000000000 +0300 ++++ c/src/common/src-16-to-48.c 2011-04-11 10:19:22.242078001 +0300 +@@ -1,16 +1,24 @@ + /* +- +-Copyright (C) 2008, 2009 Nokia Corporation. +-This material, including documentation and any related +-computer programs, is protected by copyright controlled by +-Nokia Corporation. All rights are reserved. Copying, +-including reproducing, storing, adapting or translating, any +-or all of this material requires the prior written consent of +-Nokia Corporation. This material also contains confidential +-information which may not be disclosed to others without the +-prior written consent of Nokia Corporation. +- +-*/ ++ * Copyright (C) 2010 Nokia Corporation. ++ * ++ * Contact: Maemo MMF Audio <[email protected]> ++ * or Jaska Uimonen <[email protected]> ++ * ++ * PulseAudio Meego modules are free software; you can redistribute ++ * them and/or modify them under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation ++ * version 2.1 of the License. ++ * ++ * This library 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 ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ++ * USA. ++ */ + + #include <string.h> + #include <stdlib.h> +diff -ruN a/src/common/src-16-to-48.h c/src/common/src-16-to-48.h +--- a/src/common/src-16-to-48.h 2010-09-15 10:44:14.000000000 +0300 ++++ c/src/common/src-16-to-48.h 2011-04-11 10:19:22.242078001 +0300 +@@ -2,18 +2,26 @@ + #define __SRC_16_TO_48_H__ + + /* +- +-Copyright (C) 2008, 2009 Nokia Corporation. +-This material, including documentation and any related +-computer programs, is protected by copyright controlled by +-Nokia Corporation. All rights are reserved. Copying, +-including reproducing, storing, adapting or translating, any +-or all of this material requires the prior written consent of +-Nokia Corporation. This material also contains confidential +-information which may not be disclosed to others without the +-prior written consent of Nokia Corporation. +- +-*/ ++ * Copyright (C) 2010 Nokia Corporation. ++ * ++ * Contact: Maemo MMF Audio <[email protected]> ++ * or Jaska Uimonen <[email protected]> ++ * ++ * PulseAudio Meego modules are free software; you can redistribute ++ * them and/or modify them under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation ++ * version 2.1 of the License. ++ * ++ * This library 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 ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ++ * USA. ++ */ + + /* 320 frames equals 20ms */ + #define SRC_16_TO_48_MAX_INPUT_FRAMES 320 +diff -ruN a/src/common/src-48-to-16.c c/src/common/src-48-to-16.c +--- a/src/common/src-48-to-16.c 2010-09-15 10:44:14.000000000 +0300 ++++ c/src/common/src-48-to-16.c 2011-04-11 10:19:22.242078001 +0300 +@@ -1,16 +1,24 @@ + /* +- +-Copyright (C) 2008, 2009 Nokia Corporation. +-This material, including documentation and any related +-computer programs, is protected by copyright controlled by +-Nokia Corporation. All rights are reserved. Copying, +-including reproducing, storing, adapting or translating, any +-or all of this material requires the prior written consent of +-Nokia Corporation. This material also contains confidential +-information which may not be disclosed to others without the +-prior written consent of Nokia Corporation. +- +-*/ ++ * Copyright (C) 2010 Nokia Corporation. ++ * ++ * Contact: Maemo MMF Audio <[email protected]> ++ * or Jaska Uimonen <[email protected]> ++ * ++ * PulseAudio Meego modules are free software; you can redistribute ++ * them and/or modify them under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation ++ * version 2.1 of the License. ++ * ++ * This library 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 ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ++ * USA. ++ */ + + #include <stdio.h> + +diff -ruN a/src/common/src-48-to-16.h c/src/common/src-48-to-16.h +--- a/src/common/src-48-to-16.h 2010-09-15 10:44:14.000000000 +0300 ++++ c/src/common/src-48-to-16.h 2011-04-11 10:19:22.243078000 +0300 +@@ -2,18 +2,26 @@ + #define __SRC_48_TO_16_H__ + + /* +- +-Copyright (C) 2008, 2009 Nokia Corporation. +-This material, including documentation and any related +-computer programs, is protected by copyright controlled by +-Nokia Corporation. All rights are reserved. Copying, +-including reproducing, storing, adapting or translating, any +-or all of this material requires the prior written consent of +-Nokia Corporation. This material also contains confidential +-information which may not be disclosed to others without the +-prior written consent of Nokia Corporation. +- +-*/ ++ * Copyright (C) 2010 Nokia Corporation. ++ * ++ * Contact: Maemo MMF Audio <[email protected]> ++ * or Jaska Uimonen <[email protected]> ++ * ++ * PulseAudio Meego modules are free software; you can redistribute ++ * them and/or modify them under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation ++ * version 2.1 of the License. ++ * ++ * This library 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 ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ++ * USA. ++ */ + + #define SRC_48_TO_16_MAX_INPUT_FRAMES 960 + +diff -ruN a/src/mainvolume/module-meego-mainvolume.c c/src/mainvolume/module-meego-mainvolume.c +--- a/src/mainvolume/module-meego-mainvolume.c 2010-09-15 10:44:14.000000000 +0300 ++++ c/src/mainvolume/module-meego-mainvolume.c 2011-04-11 14:33:21.034078010 +0300 +@@ -163,7 +163,7 @@ + return PA_HOOK_OK; + } + +-static pa_hook_result_t parameters_changed_cb(pa_core *c, struct update_args *ua, struct mv_userdata *u) { ++static pa_hook_result_t parameters_changed_cb(pa_core *c, meego_parameter_update_args *ua, struct mv_userdata *u) { + struct mv_volume_steps_set *set; + pa_proplist *p = NULL; + int ret = 0; +@@ -301,8 +305,8 @@ (542 more lines skipped) Index: pulseaudio-modules-n900-cmtspeech-ofono.patch =================================================================== --- pulseaudio-modules-n900-cmtspeech-ofono.patch (revision 0) +++ pulseaudio-modules-n900-cmtspeech-ofono.patch (revision 1) @@ -0,0 +1,191 @@ +--- a/src/cmtspeech/cmtspeech-connection.h ++++ b/src/cmtspeech/cmtspeech-connection.h +@@ -35,6 +35,18 @@ + #define CMTSPEECH_DBUS_PHONE_SSC_STATE_IF "com.nokia.phone.SSC" + #define CMTSPEECH_DBUS_PHONE_SSC_STATE_SIG "modem_state_changed_ind" + ++#define OFONO_DBUS_VOICECALL_IF "org.ofono.VoiceCall" ++#define OFONO_DBUS_VOICECALL_CHANGE_SIG "PropertyChanged" ++#define ALSA_OLD_ALTERNATIVE_PROP "x-maemo.alsa_sink.buffers=alternative" ++#define ALSA_OLD_PRIMARY_PROP "x-maemo.alsa_sink.buffers=primary" ++#define OFONO_DBUS_VOICECALL_ACTIVE "active" ++#define OFONO_DBUS_VOICECALL_HELD "held" ++#define OFONO_DBUS_VOICECALL_DIALING "dialing" ++#define OFONO_DBUS_VOICECALL_ALERTING "alerting" ++#define OFONO_DBUS_VOICECALL_INCOMING "incoming" ++#define OFONO_DBUS_VOICECALL_WAITING "waiting" ++#define OFONO_DBUS_VOICECALL_DISCONNECTED "disconnected" ++ + #include <cmtspeech_msgs.h> + + typedef cmtspeech_buffer_t cmtspeech_dl_buf_t; +--- a/src/cmtspeech/cmtspeech-connection.c ++++ b/src/cmtspeech/cmtspeech-connection.c +@@ -830,6 +830,70 @@ + } + } + } ++ } else if (dbus_message_is_signal(msg, OFONO_DBUS_VOICECALL_IF, OFONO_DBUS_VOICECALL_CHANGE_SIG)) { ++ pa_log_debug("Received voicecall change"); ++ if (dbus_message_iter_init(msg, &args) == TRUE) { ++ if ((type = dbus_message_iter_get_arg_type(&args)) == DBUS_TYPE_STRING) { ++ const char* callstr; ++ dbus_message_iter_get_basic(&args,&callstr); ++ if (strcmp(callstr,"State") == 0) { ++ pa_log_debug("Received voicecall state change"); ++ if (dbus_message_iter_next (&args) == TRUE) { ++ DBusMessageIter callstate; ++ const char* callstatestr; ++ dbus_bool_t val = FALSE; ++ dbus_message_iter_recurse(&args,&callstate); ++ dbus_message_iter_get_basic(&callstate,&callstatestr); ++ if (strcmp(callstatestr,OFONO_DBUS_VOICECALL_ACTIVE) == 0) { ++ pa_log_debug("Call active"); ++ val = TRUE; ++ } else if (strcmp(callstatestr,OFONO_DBUS_VOICECALL_ALERTING) == 0) { ++ pa_log_debug("Call alerting"); ++ val = TRUE; ++ } else if (strcmp(callstatestr,OFONO_DBUS_VOICECALL_HELD) == 0) { ++ pa_log_debug("Call held"); ++ val = TRUE; ++ } else if (strcmp(callstatestr,OFONO_DBUS_VOICECALL_WAITING) == 0) { ++ pa_log_debug("Call waiting"); ++ val = TRUE; ++ } else if (strcmp(callstatestr,OFONO_DBUS_VOICECALL_INCOMING) == 0) { ++ pa_log_debug("Incoming call"); ++ val = FALSE; ++ } else if (strcmp(callstatestr,OFONO_DBUS_VOICECALL_DIALING) == 0) { ++ pa_log_debug("Dialing out"); ++ val = FALSE; ++ } else if (strcmp(callstatestr,OFONO_DBUS_VOICECALL_DISCONNECTED) == 0) { ++ pa_log_debug("Call disconnected"); ++ val = FALSE; ++ } ++ if (u->old_alsa_sink) { ++ if ((val) && (!u->old_alsa_sink_alternative_used)){ ++ pa_sink_update_proplist(u->old_alsa_sink,PA_UPDATE_REPLACE,pa_proplist_from_string(ALSA_OLD_ALTERNATIVE_PROP)); ++ u->old_alsa_sink_alternative_used = TRUE; ++ pa_log_debug("Alternative buffers used on alsa_sink_old"); ++ } else if ((!val) && (u->old_alsa_sink_alternative_used)){ ++ /* Sleep one second to give busy tone. */ ++ sleep(1); ++ pa_sink_update_proplist(u->old_alsa_sink,PA_UPDATE_REPLACE,pa_proplist_from_string(ALSA_OLD_PRIMARY_PROP)); ++ u->old_alsa_sink_alternative_used = FALSE; ++ pa_log_debug("Primary buffers used on alsa_sink_old"); ++ } ++ } else { ++ pa_log_debug("No alsa_sink_old found"); ++ } ++ pa_log_debug("Set ServerStatus to %d.", val == TRUE); ++ /* note: very rarely taken code path */ ++ pa_mutex_lock(c->cmtspeech_mutex); ++ if (c->cmtspeech) ++ cmtspeech_state_change_call_status(c->cmtspeech, val == TRUE); ++ pa_mutex_unlock(c->cmtspeech_mutex); ++ } ++ } ++ } ++ } else ++ pa_log_error("Received %s with invalid parameters", OFONO_DBUS_VOICECALL_CHANGE_SIG); ++ ++ return DBUS_HANDLER_RESULT_HANDLED; + } + + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; +--- a/src/cmtspeech/cmtspeech-dbus.c ++++ b/src/cmtspeech/cmtspeech-dbus.c +@@ -109,7 +109,12 @@ + + snprintf(rule, sizeof(rule), "type='signal',interface='%s'", CMTSPEECH_DBUS_PHONE_SSC_STATE_IF); + if (add_dbus_match(e, dbusconn, rule)) { + goto fail; ++ } ++ ++ snprintf(rule, sizeof(rule), "type='signal',interface='%s'", OFONO_DBUS_VOICECALL_IF); ++ if (add_dbus_match(e, dbusconn, rule)) { ++ goto fail; + } + + return 0; +--- a/src/cmtspeech/module-meego-cmtspeech.h ++++ b/src/cmtspeech/module-meego-cmtspeech.h +@@ -68,6 +68,9 @@ + + pa_sink_input *sink_input; + pa_source_output *source_output; ++ ++ pa_sink *old_alsa_sink; ++ bool old_alsa_sink_alternative_used; + + /* Access only from sink IO-thread */ + pa_queue *local_sideinfoq; +--- a/src/cmtspeech/module-meego-cmtspeech.c ++++ b/src/cmtspeech/module-meego-cmtspeech.c +@@ -42,6 +42,7 @@ + "sink=<sink to connect to> " + "source=<source to connect to> " + "dbus_type=<defaults to session> " ++ "old_alsa_sink_name=<name of the old alsa sink>" + ); + PA_MODULE_VERSION(PACKAGE_VERSION); + +@@ -49,6 +50,7 @@ + "sink", + "source", + "dbus_type", ++ "old_alsa_sink_name", + NULL, + }; + +@@ -100,9 +102,10 @@ + int pa__init(pa_module*m) { + pa_modargs *ma = NULL; + struct userdata *u; +- const char *sink_name, *source_name, *dbus_type; ++ const char *sink_name, *source_name, *dbus_type, *old_alsa_sink_name; + pa_sink *sink = NULL; + pa_source *source = NULL; ++ pa_sink *old_alsa_sink = NULL; + + pa_assert(m); + +@@ -114,9 +117,10 @@ + sink_name = pa_modargs_get_value(ma, "sink", NULL); + source_name = pa_modargs_get_value(ma, "source", NULL); + dbus_type = pa_modargs_get_value(ma, "dbus_type", "session"); ++ old_alsa_sink_name = pa_modargs_get_value(ma, "old_alsa_sink_name", PROPLIST_SINK); + +- pa_log_debug("Got arguments: sink=\"%s\" source=\"%s\" dbus_type=\"%s\"", +- sink_name, source_name, dbus_type); ++ pa_log_debug("Got arguments: sink=\"%s\" source=\"%s\" dbus_type=\"%s\" old_alsa_sink_name=\"%s\"", ++ sink_name, source_name, dbus_type, old_alsa_sink_name); + + u = pa_xnew0(struct userdata, 1); + m->userdata = u; +@@ -140,6 +144,13 @@ + pa_log_error("Sink \"%s\" not found", sink_name); + goto fail; + } ++ ++ if (!(old_alsa_sink = pa_namereg_get(m->core, old_alsa_sink_name, PA_NAMEREG_SINK))) { ++ pa_log_error("Old alsa sink \"%s\" not found", old_alsa_sink_name); ++ } ++ ++ u->old_alsa_sink = old_alsa_sink; ++ u->old_alsa_sink_alternative_used = FALSE; + + u->sink_name = pa_xstrdup(sink_name); + u->source_name = pa_xstrdup(source_name); +@@ -217,6 +228,11 @@ + + if (u->source_name) + pa_xfree(u->source_name); +- ++ ++ if ((u->old_alsa_sink) && (u->old_alsa_sink_alternative_used)) { ++ pa_sink_update_proplist(u->old_alsa_sink,PA_UPDATE_REPLACE,pa_proplist_from_string(ALSA_OLD_PRIMARY_PROP)); ++ u->old_alsa_sink_alternative_used = FALSE; ++ } ++ + pa_xfree(u); + } Index: pa-0.9.19-mfld-common-updated-parameter-hook-interface.patch =================================================================== --- pa-0.9.19-mfld-common-updated-parameter-hook-interface.patch (revision 0) +++ pa-0.9.19-mfld-common-updated-parameter-hook-interface.patch (revision 1) @@ -0,0 +1,220 @@ +From 02f7bde92e93b0588cbba750184e86a22cb4c4ed Mon Sep 17 00:00:00 2001 +From: Mael Pouessel <[email protected]> +Date: Wed, 26 Jan 2011 15:15:42 +0100 +Subject: [PATCH 08/17] common: updated parameter hook interface + +Signed-off-by: Mael Pouessel <[email protected]> +--- + src/common/Makefile.am | 2 +- + src/common/parameter-hook-implementor.h | 39 +++++++++++++++++++ + src/common/parameter-hook.c | 38 +++++++++++-------- + src/common/parameter-hook.h | 63 +++++++++++++++++++++++++------ + 4 files changed, 113 insertions(+), 29 deletions(-) + create mode 100644 src/common/parameter-hook-implementor.h + +diff --git a/src/common/Makefile.am b/src/common/Makefile.am +index b7c8ee4..4193298 100644 +--- a/src/common/Makefile.am ++++ b/src/common/Makefile.am +@@ -7,7 +7,7 @@ libmeego_common_la_SOURCES = \ + optimized.c optimized.h \ + pa-optimized.c pa-optimized.h \ + memory.c memory.h \ +- parameter-hook.c parameter-hook.h \ ++ parameter-hook.c parameter-hook.h parameter-hook-implementor.h \ + algorithm-hook.c algorithm-hook.h \ + latency-controller.c latency-controller.h \ + master-trigger.c master-trigger.h \ +diff --git a/src/common/parameter-hook-implementor.h b/src/common/parameter-hook-implementor.h +new file mode 100644 +index 0000000..73e176f +--- /dev/null ++++ b/src/common/parameter-hook-implementor.h +@@ -0,0 +1,39 @@ ++/* ++ * Copyright (C) 2010 Nokia Corporation. ++ * ++ * Contact: Maemo MMF Audio <[email protected]> ++ * or Jyri Sarha <[email protected]> ++ * ++ * These PulseAudio Modules are 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 ++ * version 2.1 of the License. ++ * ++ * This library 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 ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with this library; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 ++ * USA. ++ */ ++#ifndef _parameter_hook_implementor_h_ ++#define _parameter_hook_implementor_h_ ++ ++#include "parameter-hook.h" ++ ++typedef struct meego_parameter_connection_args { ++ const char *name; ++ pa_hook_cb_t cb; ++ pa_hook_priority_t prio; ++ pa_bool_t full_updates; ++ void *userdata; ++} meego_parameter_connection_args; ++ ++pa_hook_slot* meego_parameter_receive_update_requests(pa_core *c, pa_hook_cb_t cb, void *userdata); ++void meego_parameter_discontinue_update_requests(pa_hook_slot *slot); ++ ++ ++#endif +diff --git a/src/common/parameter-hook.c b/src/common/parameter-hook.c +index fbf40f9..0b05500 100644 +--- a/src/common/parameter-hook.c ++++ b/src/common/parameter-hook.c +@@ -24,16 +24,21 @@ + #include <config.h> + #endif + ++#include <pulsecore/core.h> + #include <pulsecore/hook-list.h> + + #include "parameter-hook.h" ++#include "parameter-hook-implementor.h" + +-static pa_hook *parameter_update_requests = NULL; ++static pa_hook parameter_update_requests; ++static pa_hook *parameter_update_requests_ptr = NULL; + +-int request_parameter_updates(const char *name, pa_hook_cb_t cb, pa_hook_priority_t prio, void *u) { +- struct connect_args args; ++int meego_parameter_request_updates(const char *name, pa_hook_cb_t cb, pa_hook_priority_t prio, pa_bool_t full_updates, void *userdata) { ++ meego_parameter_connection_args args; + +- if (!parameter_update_requests) { ++ pa_assert(cb); ++ ++ if (!parameter_update_requests_ptr) { + pa_log_warn("Parameter update service not available"); + return -1; + } +@@ -41,25 +46,26 @@ int request_parameter_updates(const char *name, pa_hook_cb_t cb, pa_hook_priorit + args.name = name; + args.cb = cb; + args.prio = prio; +- args.u = u; +- +- pa_log_warn("Requesting updates for %s", name); ++ args.full_updates = full_updates; ++ args.userdata = userdata; ++ ++ pa_log_debug("Requesting updates for %s", name ? name : "mode changes"); + +- pa_hook_fire(parameter_update_requests, &args); ++ pa_hook_fire(parameter_update_requests_ptr, &args); + + return 0; + } + +-pa_hook_slot *receive_update_requests(pa_hook_cb_t cb, void *p) { +- if (!parameter_update_requests) { +- parameter_update_requests = pa_xnew0(pa_hook, 1); +- pa_hook_init(parameter_update_requests, p); ++pa_hook_slot* meego_parameter_receive_update_requests(pa_core *c, pa_hook_cb_t cb, void *userdata) { ++ if (!parameter_update_requests_ptr) { ++ parameter_update_requests_ptr = ¶meter_update_requests; ++ pa_hook_init(parameter_update_requests_ptr, c); + } + +- return pa_hook_connect(parameter_update_requests, PA_HOOK_NORMAL, cb, p); ++ return pa_hook_connect(parameter_update_requests_ptr, PA_HOOK_NORMAL, cb, userdata); + } + +-void discontinue_update_requests(pa_hook_slot *s) { +- pa_hook_slot_free(s); ++void meego_parameter_discontinue_update_requests(pa_hook_slot *slot) { ++ pa_hook_slot_free(slot); ++ parameter_update_requests_ptr = NULL; + } +- +diff --git a/src/common/parameter-hook.h b/src/common/parameter-hook.h +index c5c9598..8fc9829 100644 +--- a/src/common/parameter-hook.h ++++ b/src/common/parameter-hook.h +@@ -22,20 +22,59 @@ + #ifndef _parameter_hook_h_ + #define _parameter_hook_h_ + +-struct connect_args { +- const char *name; +- pa_hook_cb_t cb; +- pa_hook_priority_t prio; +- void *u; +-}; ++typedef enum meego_parameter_status { ++ MEEGO_PARAM_ENABLE, ++ MEEGO_PARAM_DISABLE, ++ MEEGO_PARAM_UPDATE, ++ MEEGO_PARAM_MODE_CHANGE ++} meego_parameter_status_t; + +-struct update_args { +- void *parameters; ++/* ++ * Parameter updates are received in pa_hook_cb_t. ++ * hook_data is pointer to pa_core. ++ * call_data is pointer to meego_parameter_update_args explained below. ++ * slot_data is pointer to userdata given in meego_parameter_request_updates(). ++ * ++ * mode ++ * Null-terminated string of current audio mode. ++ * ++ * status MEEGO_PARAM_ENABLE: ++ * Parameters for given mode are already loaded, but mode ++ * changes to one with parameter. ++ * parameters and length are set to current parameter. ++ * ++ * status MEEGO_PARAM_DISABLE: ++ * Parameters are disabled for current mode, that is, no ++ * parameter are defined. ++ * parameters is NULL and length 0. ++ * ++ * status MEEGO_PARAM_UPDATE: ++ * Parameters for mode have changed from previous values. This ++ * also implies Enable. ++ * parameters and length are set to updated parameter. ++ * ++ * status MEEGO_PARAM_MODE_CHANGE: ++ * Mode has changed, but parameter state has not changed, that ++ * is, if status was disabled it is still so. This status ++ * is received only if full_updates was TRUE in connection. ++ * parameters and length are set to currently active parameters. ++ * This status is also always set if only mode changes ++ * are requested. In that case parameters is NULL and length 0. ++ * ++ * Hook callback should always return PA_HOOK_OK. ++ */ ++typedef struct meego_parameter_update_args { ++ const char *mode; (20 more lines skipped) Index: pa-0.9.22-alignment-with-new-pa_thread_new-for-cmtspeech.patch =================================================================== --- pa-0.9.22-alignment-with-new-pa_thread_new-for-cmtspeech.patch (revision 0) +++ pa-0.9.22-alignment-with-new-pa_thread_new-for-cmtspeech.patch (revision 1) @@ -0,0 +1,25 @@ +From 1bf2d24978e1c11f8c0f370d853d6d33fbcb9e36 Mon Sep 17 00:00:00 2001 +From: FBarthes <[email protected]> +Date: Wed, 6 Apr 2011 10:48:23 +0200 +Subject: [PATCH] alignment with new pa_thread_new for cmtspeech + +--- + src/cmtspeech/cmtspeech-connection.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/cmtspeech/cmtspeech-connection.c b/src/cmtspeech/cmtspeech-connection.c +index 6069605..8a554ed 100644 +--- a/src/cmtspeech/cmtspeech-connection.c ++++ b/src/cmtspeech/cmtspeech-connection.c +@@ -597,7 +597,7 @@ int cmtspeech_connection_init(struct userdata *u) + c->record_running = FALSE; + c->playback_running = FALSE; + +- if (!(c->thread = pa_thread_new(thread_func, u))) { ++ if (!(c->thread = pa_thread_new("cmtspeech",thread_func, u))) { + pa_log_error("Failed to create thread."); + pa_atomic_store(&c->thread_state, CMT_QUIT); + cmtspeech_connection_unload(u); +-- +1.7.2.3 + Index: pulseaudio-modules-n900-include-call-state-tracker_h.patch =================================================================== --- pulseaudio-modules-n900-include-call-state-tracker_h.patch (revision 0) +++ pulseaudio-modules-n900-include-call-state-tracker_h.patch (revision 1) @@ -0,0 +1,10 @@ +--- a/src/voice/module-meego-voice.c ++++ b/src/voice/module-meego-voice.c +@@ -20,6 +20,7 @@ + #include <pulsecore/modargs.h> + #include <pulsecore/namereg.h> + #include <pulsecore/sample-util.h> ++#include <pulsecore/call-state-tracker.h> + + #include "voice-convert.h" + #include "voice-aep-sink-input.h" Index: pulseaudio-modules-n900.yaml =================================================================== --- pulseaudio-modules-n900.yaml (revision 0) +++ pulseaudio-modules-n900.yaml (revision 1) @@ -0,0 +1,81 @@ +Name: pulseaudio-modules-n900 +Summary: PulseAudio modules for Nokia N900 handset +Version: 0.9.19.0.11 +Release: 0 +Group: Multimedia/PulseAudio +License: LGPLv2.1+ +URL: http://meego.gitorious.org/maemo-multimedia/pulseaudio-modules-meego +Sources: + - maemo-multimedia-pulseaudio-modules-meego-0.9.19.0-11_released.tar.gz +Patches: + - "%{name}-include-call-state-tracker_h.patch" + - "%{name}-cmtspeech-ofono.patch" + - "pa-0.9.22-alignment-with-new-pa_thread_new-for-cmtspeech.patch" + - "pa-0.9.22-Insert-PA_LOG_NOTICE-at-param-of-pa_log_ratelim_B.patch" + - "pa-0.9.19-mfld-common-updated-parameter-hook-interface.patch" + - "pa-0.9.22-remove-flat-volume-for-n900.patch" +Description: PulseAudio modules for Nokia N900 handset. +ExclusiveArch: "%arm" +PkgBR: + - libcmtspeechdata-devel + - libtool-ltdl-devel +PkgConfigBR: + - check + - dbus-1 + - pulsecore +Configure: configure +Builder: make +NoFiles: yes +SubPackages: + - Name: devel + Summary: Development files for MeeGo PulseAudio modules for N900 + Group: Development/Libraries + Description: This package contains development headers for MeeGo PulseAudio modules + Requires: + - "%{name}-common = %{version}-%{release}" + - "%{name}-music = %{version}-%{release}" + - "%{name}-record = %{version}-%{release}" + - "%{name}-voice = %{version}-%{release}" + - "%{name}-cmtspeech = %{version}-%{release}" + - "%{name}-mainvolume = %{version}-%{release}" + + - Name: common + Summary: Common libs for the MeeGo PulseAudio modules + Group: Multimedia/PulseAudio + Description: This contains common libs for the MeeGo PulseAudio modules. + + - Name: music + Summary: Music module for PulseAudio + Group: Multimedia/PulseAudio + Description: This contains music module for MeeGo PulseAudio + Requires: + - "%{name}-common = %{version}-%{release}" + + - Name: record + Summary: Cmtspeech module for PulseAudio + Group: Multimedia/PulseAudio + Description: This contains record module for MeeGo PulseAudio + Requires: + - "%{name}-common = %{version}-%{release}" + + - Name: voice + Summary: Voice module for PulseAudio + Group: Multimedia/PulseAudio + Description: This contains voice module for MeeGo PulseAudio + Requires: + - "%{name}-common = %{version}-%{release}" + + - Name: cmtspeech + Summary: Cmtspeech module for PulseAudio + Group: Multimedia/PulseAudio + Description: This contains cmtspeech module for MeeGo PulseAudio with Nokia N900 modem + Requires: + - "%{name}-common = %{version}-%{release}" + + - Name: mainvolume + Summary: Mainvolume module for PulseAudio + Group: Multimedia/PulseAudio + Description: This contains mainvolume module for MeeGo PulseAudio + Requires: + - "%{name}-common = %{version}-%{release}" +
