[meego-packaging] [meego-commits] 9150: Changes to Trunk:Testing/pulseaudio
Carsten Munk
carsten at maemo.org
Tue Nov 2 07:20:58 PDT 2010
Wouldn't it be better to seperate this voice module into it's own
package? In N900 we already have a voice module in
pulseaudio-modules-meego and with this change, you're breaking N900
images.
Please let's work out a solution.
BR
Carsten Munk
MeeGo Nokia N900 hardware adaptation maintainer
2010/11/2 Vivian Zhang <no_reply at build.meego.com>:
> Hi,
> I have made the following changes to pulseaudio in project Trunk:Testing. Please review and accept ASAP.
>
> Thank You,
> Vivian Zhang
>
> [This message was auto-generated]
>
> ---
>
> Request #9150:
>
> submit: devel:multimedia/pulseaudio(r6) -> Trunk:Testing/pulseaudio
>
>
> Message:
> Split desktop and startup script out to pulseaudio-startup package, which handles the pa launch on system startup(BMC #9604); Merged the patch from Pouessel, Mael which contains the new voice module; Add new package pulseaudio-settings-mfld which includes the PA config files for MFLD EB platform(#BMC #9607)
>
> State: new 2010-11-02T07:13:43 vivian
> Comment: None
>
>
>
> changes files:
> --------------
> --- pulseaudio.changes
> +++ pulseaudio.changes
> @@ -0,0 +1,15 @@
> +* Mon Nov 01 2010 Vivian Zhang <vivian.zhang at intel.com> - 0.9.21
> +- Split desktop and startup script out to pulseaudio-startup package, which handles the pa launch on system startup (BMC #9604)
> +- Merged the patch from Pouessel, Mael which contains the new voice module for enabling the Circuit Switch Voice call on MFLD EB hardware
> + 0001-audio-voice-call-enabled-HSD-3669129.patch
> + 0002-HSD3576159-Don-t-cork-the-cs-voice-sink-input-and-cs.patch
> + 0003-HSD3667148-Add-POLLOUT-event-support-from-modem-even.patch
> + 0004-HSD3669166-Pulseaudio-Add-Burst-mode-support.patch
> + 0005-HSD-3576250-Pulseaudio-uplink-delayed.patch
> + 0006-Pulseaudio-CS-Voice-Call-Add-WB-AMR-support.-Add-SRC.patch
> + 0007-Pulseaudio-Voice-module-Fix-sink-memblockq-corruptio.patch
> + 0008-Remove-UMG-contributions-to-config-files.patch
> + 0009-Align-cs-protocol.h-with-cmt_speech-driver.patch
> + 0010-Add-Pulseaudio-configuration-files-for-Medfield-EB-h.patch
> +- Add new package pulseaudio-settings-mfld which includes the pulseaudio config files for MFLD EB hardware (BMC #9607)
> +
>
> new:
> ----
> 0001-audio-voice-call-enabled-HSD-3669129.patch
> 0002-HSD3576159-Don-t-cork-the-cs-voice-sink-input-and-cs.patch
> 0003-HSD3667148-Add-POLLOUT-event-support-from-modem-even.patch
> 0004-HSD3669166-Pulseaudio-Add-Burst-mode-support.patch
> 0005-HSD-3576250-Pulseaudio-uplink-delayed.patch
> 0006-Pulseaudio-CS-Voice-Call-Add-WB-AMR-support.-Add-SRC.patch
> 0007-Pulseaudio-Voice-module-Fix-sink-memblockq-corruptio.patch
> 0008-Remove-UMG-contributions-to-config-files.patch
> 0009-Align-cs-protocol.h-with-cmt_speech-driver.patch
> 0010-Add-Pulseaudio-configuration-files-for-Medfield-EB-h.patch
> daemon_mfld.conf
> default_mfld.pa
> pa-0.9.21-desktopfile.patch
> start-pulseaudio
>
> spec files:
> -----------
> --- pulseaudio.spec
> +++ pulseaudio.spec
> @@ -1,6 +1,6 @@
> -
> -# Do NOT Edit the Auto-generated Part!
> -# Generated by: spectacle version 0.18
> +#
> +# Do not Edit! Generated by:
> +# spectacle version 0.17
> #
> # >> macros
> # << macros
> @@ -16,6 +16,9 @@
> Source1: default.pa
> Source2: daemon.conf
> Source3: 90-pulse.conf
> +Source4: start-pulseaudio
> +Source5: default_mfld.pa
> +Source6: daemon_mfld.conf
> Source100: pulseaudio.yaml
> Patch0: pa-0.9.14-helper-assert.patch
> Patch1: pa-0.9.18-export-headfile-for-modules.patch
> @@ -29,6 +32,17 @@
> Patch9: call-state-tracker.patch
> Patch10: flat-sink-branch.patch
> Patch11: 0027-build-add-pulsecore.pc-Nokia-specific.patch
> +Patch12: pa-0.9.21-desktopfile.patch
> +Patch13: 0001-audio-voice-call-enabled-HSD-3669129.patch
> +Patch14: 0002-HSD3576159-Don-t-cork-the-cs-voice-sink-input-and-cs.patch
> +Patch15: 0003-HSD3667148-Add-POLLOUT-event-support-from-modem-even.patch
> +Patch16: 0004-HSD3669166-Pulseaudio-Add-Burst-mode-support.patch
> +Patch17: 0005-HSD-3576250-Pulseaudio-uplink-delayed.patch
> +Patch18: 0006-Pulseaudio-CS-Voice-Call-Add-WB-AMR-support.-Add-SRC.patch
> +Patch19: 0007-Pulseaudio-Voice-module-Fix-sink-memblockq-corruptio.patch
> +Patch20: 0008-Remove-UMG-contributions-to-config-files.patch
> +Patch21: 0009-Align-cs-protocol.h-with-cmt_speech-driver.patch
> +Patch22: 0010-Add-Pulseaudio-configuration-files-for-Medfield-EB-h.patch
> Requires: udev >= 145-3
> Requires: rtkit
> Requires(post): /sbin/ldconfig
> @@ -64,12 +78,27 @@
>
>
>
> +%package startup
> +Summary: PulseAudio desktop file and startup script
> +Group: System/Desktop
> +Requires: %{name} = %{version}-%{release}
> +
> +%description startup
> +Description: %{summary}
> +
> +%package settings-mfld
> +Summary: PulseAudio config files for medfield platform
> +Group: Applications/System
> +Requires: %{name} = %{version}-%{release}
> +
> +%description settings-mfld
> +Description: %{summary}
> +
> %package module-x11
> Summary: PulseAudio components needed for starting x11 User session
> Group: System/Libraries
> Requires: %{name} = %{version}-%{release}
> -Requires(post): /sbin/ldconfig
> -Requires(postun): /sbin/ldconfig
> +Requires: pulseaudio-startup
>
> %description module-x11
> Description: %{summary}
> @@ -110,6 +139,28 @@
> %patch10 -p1
> # 0027-build-add-pulsecore.pc-Nokia-specific.patch
> %patch11 -p1
> +# pa-0.9.21-desktopfile.patch
> +%patch12 -p1
> +# 0001-audio-voice-call-enabled-HSD-3669129.patch
> +%patch13 -p1
> +# 0002-HSD3576159-Don-t-cork-the-cs-voice-sink-input-and-cs.patch
> +%patch14 -p1
> +# 0003-HSD3667148-Add-POLLOUT-event-support-from-modem-even.patch
> +%patch15 -p1
> +# 0004-HSD3669166-Pulseaudio-Add-Burst-mode-support.patch
> +%patch16 -p1
> +# 0005-HSD-3576250-Pulseaudio-uplink-delayed.patch
> +%patch17 -p1
> +# 0006-Pulseaudio-CS-Voice-Call-Add-WB-AMR-support.-Add-SRC.patch
> +%patch18 -p1
> +# 0007-Pulseaudio-Voice-module-Fix-sink-memblockq-corruptio.patch
> +%patch19 -p1
> +# 0008-Remove-UMG-contributions-to-config-files.patch
> +%patch20 -p1
> +# 0009-Align-cs-protocol.h-with-cmt_speech-driver.patch
> +%patch21 -p1
> +# 0010-Add-Pulseaudio-configuration-files-for-Medfield-EB-h.patch
> +%patch22 -p1
> # >> setup
> # << setup
>
> @@ -158,6 +209,10 @@
> rm %{buildroot}%{_bindir}/start-pulseaudio-kde
> rm %{buildroot}%{_sysconfdir}/xdg/autostart/pulseaudio-kde.desktop
>
> +install -m 755 %{SOURCE4} %{buildroot}/usr/bin/start-pulseaudio
> +install -d %{buildroot}/etc/skel/.pulse
> +install -m 644 %{SOURCE5} %{buildroot}/etc/skel/.pulse/default.pa
> +install -m 644 %{SOURCE6} %{buildroot}/etc/skel/.pulse/daemon.conf
> install -d %{buildroot}/usr/include/pulse-modules-headers/pulsecore/
> install -m 644 src/pulsecore/*.h %{buildroot}/usr/include/pulse-modules-headers/pulsecore/
>
> @@ -178,6 +233,12 @@
>
>
>
> +
> +
> +
> +
> +
> +
> %files -f pulseaudio.lang
> %defattr(-,root,root,-)
> # >> files
> @@ -294,14 +355,28 @@
> %{_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
> +%{_libdir}/pulse-0.9.21/modules/module-voice.so
> # << files
>
>
> +%files startup
> +%defattr(-,root,root,-)
> +# >> files startup
> +%config %{_sysconfdir}/xdg/autostart/pulseaudio.desktop
> +%{_bindir}/start-pulseaudio
> +# << files startup
> +
> +%files settings-mfld
> +%defattr(-,root,root,-)
> +# >> files settings-mfld
> +%config /etc/skel/.pulse/default.pa
> +%config /etc/skel/.pulse/daemon.conf
> +# << files settings-mfld
> +
> %files module-x11
> %defattr(-,root,root,-)
> # >> files module-x11
> %doc %{_mandir}/man1/pax11publish.1.gz
> -%config %{_sysconfdir}/xdg/autostart/pulseaudio.desktop
> %{_bindir}/start-pulseaudio-x11
> %{_bindir}/pax11publish
> %{_libdir}/pulse-0.9.21/modules/module-x11-bell.so
>
> other changes:
> --------------
>
> ++++++ 0001-audio-voice-call-enabled-HSD-3669129.patch (new)
> --- 0001-audio-voice-call-enabled-HSD-3669129.patch
> +++ 0001-audio-voice-call-enabled-HSD-3669129.patch
> +From e7ffc5e08ac5c87ca622c7a85e42b2c06740d5c9 Mon Sep 17 00:00:00 2001
> +From: Jean-Pascal Blondin <jean-pascal.blondin at intel.com>
> +Date: Wed, 28 Jul 2010 12:03:00 +0200
> +Subject: [PATCH 01/10] audio voice call enabled HSD 3669129
> +
> +initial delivery of pulseaudio for audio voice call feature
> +Squashed rebase from branch voice_module_3669129
> +
> +Signed-off-by: Jean-Pascal Blondin <jean-pascal.blondin at intel.com>
> +---
> + src/Makefile.am | 13 +-
> + src/modules/cs-protocol.h | 131 +++
> + src/modules/module-voice.c | 2354 ++++++++++++++++++++++++++++++++++++++++++++
> + 3 files changed, 2495 insertions(+), 3 deletions(-)
> + create mode 100755 src/modules/cs-protocol.h
> + create mode 100644 src/modules/module-voice.c
> +
> +diff --git a/src/Makefile.am b/src/Makefile.am
> +index 598e77f..177f627 100644
> +--- a/src/Makefile.am
> ++++ b/src/Makefile.am
> +@@ -116,7 +116,7 @@ ALSA_PATHS = \
> + modules/alsa/mixer/paths/analog-input-aux.conf \
> + modules/alsa/mixer/paths/analog-input.conf \
> + modules/alsa/mixer/paths/analog-input.conf.common \
> +- modules/alsa/mixer/paths/analog-input-fm.conf \
> ++ modules/alsa/mixer/paths/analog-input-fm.conf \
> + modules/alsa/mixer/paths/analog-input-linein.conf \
> + modules/alsa/mixer/paths/analog-input-mic.conf \
> + modules/alsa/mixer/paths/analog-input-mic.conf.common \
> +@@ -1026,7 +1026,8 @@ modlibexec_LTLIBRARIES += \
> + module-position-event-sounds.la \
> + module-augment-properties.la \
> + module-cork-music-on-phone.la \
> +- module-loopback.la
> ++ module-loopback.la \
> ++ module-voice.la
> +
> + # See comment at librtp.la above
> + if !OS_IS_WIN32
> +@@ -1248,7 +1249,9 @@ SYMDEF_FILES = \
> + modules/module-augment-properties-symdef.h \
> + modules/module-cork-music-on-phone-symdef.h \
> + modules/module-console-kit-symdef.h \
> +- modules/module-loopback-symdef.h
> ++ modules/module-loopback-symdef.h \
> ++ modules/module-voice-symdef.h
> ++
> +
> + EXTRA_DIST += $(SYMDEF_FILES)
> + BUILT_SOURCES += $(SYMDEF_FILES)
> +@@ -1394,6 +1397,10 @@ module_loopback_la_SOURCES = modules/module-loopback.c
> + module_loopback_la_LDFLAGS = $(MODULE_LDFLAGS)
> + module_loopback_la_LIBADD = $(AM_LIBADD) libpulsecore- at PA_MAJORMINORMICRO@.la libpulsecommon- at PA_MAJORMINORMICRO@.la libpulse.la
> +
> ++module_voice_la_SOURCES = modules/module-voice.c
> ++module_voice_la_LDFLAGS = $(MODULE_LDFLAGS)
> ++module_voice_la_LIBADD = $(AM_LIBADD) libpulsecore- at PA_MAJORMINORMICRO@.la libpulsecommon- at PA_MAJORMINORMICRO@.la libpulse.la
> ++
> + # X11
> +
> + module_x11_bell_la_SOURCES = modules/x11/module-x11-bell.c
> +diff --git a/src/modules/cs-protocol.h b/src/modules/cs-protocol.h
> +new file mode 100755
> +index 0000000..06cbdd8
> +--- /dev/null
> ++++ b/src/modules/cs-protocol.h
> +@@ -0,0 +1,131 @@
> ++/*
> ++ * cs-protocol.h
> ++ *
> ++ * Part of the CMT speech driver. Protocol definitions.
> ++ *
> ++ * Copyright (C) 2008,2009 Nokia Corporation. All rights reserved.
> ++ *
> ++ * Contact: Kai Vehmanen <kai.vehmanen at nokia.com>
> ++ * Original author: Peter Ujfalusi <peter.ujfalusi at nokia.com>
> ++ *
> ++ * This program is free software; you can redistribute it and/or
> ++ * modify it under the terms of the GNU General Public License
> ++ * version 2 as published by the Free Software Foundation.
> ++ *
> ++ * This program 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 General Public License
> ++ * along with this program; if not, write to the Free Software
> ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> ++ * 02110-1301 USA
> ++ */
> ++
> ++
> ++#ifndef _CS_PROTOCOL_H
> ++#define _CS_PROTOCOL_H
> ++
> ++#include <linux/types.h>
> ++#include <linux/ioctl.h>
> ++
> ++/* chardev parameters
> ++ * ***********************************/
> ++
> ++#define CS_DEV_FILE_NAME "/dev/cmt_speech"
> ++
> ++/* APE kernel <-> user space messages
> ++ * ***********************************/
> ++
> ++#define CS_CMD_SHIFT 28
> ++#define CS_DOMAIN_SHIFT 24
> ++
> ++#define CS_CMD_MASK (0xff000000)
> ++#define CS_PARAM_MASK (0x00ffffff)
> ++
> ++#define CS_CDSP_RESET_DONE (0x1<<CS_CMD_SHIFT|0x0<<CS_DOMAIN_SHIFT)
> ++#define CS_RX_DATA_RECEIVED (0x2<<CS_CMD_SHIFT|0x0<<CS_DOMAIN_SHIFT)
> ++#define CS_TX_DATA_READY (0x3<<CS_CMD_SHIFT|0x0<<CS_DOMAIN_SHIFT)
> ++#define CS_TX_DATA_SENT (0x4<<CS_CMD_SHIFT|0x0<<CS_DOMAIN_SHIFT)
> ++
> ++/* ioctl interface
> ++ * ***************/
> ++
> ++/* parameters to CS_CONFIG_BUGS ioctl */
> ++#define CS_FEAT_TSTAMP_RX_CTRL (1 << 0)
> ++
> ++/* parameters to CS_GET_STATE ioctl */
> ++#define CS_STATE_CLOSED 0
> ++#define CS_STATE_OPENED 1 /* resource allocated */
> ++#define CS_STATE_CONFIGURED 2 /* data path active*/
> ++
> ++#define CS_MAX_BUFFERS 16 /* maximum number of TX/RX buffers */
> ++
> ++/* Parameters to CS_GET_CAPABILITIES*/
> ++#define CS_CAP_MMAP (1 << 0)
> ++
> ++/*
> ++ * Parameters for setting up the data buffers
> ++ */
> ++struct cs_buffer_config {
> ++ __u32 rx_bufs; /* number of RX buffer slots */
> ++ __u32 tx_bufs; /* number of TX buffer slots */
> ++ __u32 buf_size; /* bytes */
> ++ __u32 flags; /* see CS_FEAT_* */
> ++ __u32 reserved[4];
> ++};
> ++
> ++/*
> ++ * Struct describing the layout and contents of
> ++ * the driver mmap area. This information is meant
> ++ * as read-only information for the application.
> ++ */
> ++struct cs_mmap_config_block {
> ++ __u16 version; /* 8bit major, 8bit minor */
> ++ __u16 reserved1;
> ++ __u32 buf_size; /* 0=disabled, otherwise the transfer size */
> ++ __u32 rx_bufs; /* # of RX buffers */
> ++ __u32 tx_bufs; /* # of TX buffers */
> ++ __u32 reserved2;
> ++ /* array of offsets within the mmap area for
> ++ * each RX and TX buffer */
> ++ __u32 rx_offsets[CS_MAX_BUFFERS];
> ++ __u32 tx_offsets[CS_MAX_BUFFERS];
> ++ __u32 reserved3[4];
> ++ /* if enabled with CS_FEAT_TSTAMP_RX_CTRL, monotonic
> ++ * timestamp taken when the last control command was
> ++ * received */
> ++ struct timespec tstamp_rx_ctrl;
> ++};
> ++
> ++#define CS_IO_MAGIC 'C'
> ++
> ++#define CS_IOW(num, dtype) _IOW(CS_IO_MAGIC, num, dtype)
> ++#define CS_IOR(num, dtype) _IOR(CS_IO_MAGIC, num, dtype)
> ++#define CS_IOWR(num, dtype) _IOWR(CS_IO_MAGIC, num, dtype)
> ++#define CS_IO(num) _IO(CS_IO_MAGIC, num)
> ++
> ++#define CS_GET_STATE CS_IOR(21, unsigned int)
> ++#define CS_CONFIG CS_IOW(22, struct cs_config)
> ++#define CS_SET_WAKELINE CS_IOW(23, unsigned int)
> ++#define CS_CONFIG_BUFS CS_IOW(31, struct cs_buffer_config)
> ++
> ++/* ioctl arguments (deprecated commands)
> ++ * *************************************/
> ++
> ++/** Deprecated V0.1.x interface (CS_CONFIG ioctl) */
> ++struct cs_config {
> ++ unsigned long tstamp_offset; /* valid, if:
> ++ if (~timestamp_offset){} is true*/
> ++
> ++ unsigned long dl_data_start_offset; /* offset from mmap base */
> ++ unsigned int dl_slots; /* number of dl slots */
> ++
> ++ unsigned long ul_data_start_offset; /* offset from mmap base */
> ++ unsigned int ul_slots; /* number of ul slots */
> ++
> ++ unsigned int slot_size; /* bytes */
> ++};
> ++
> (2364 more lines skipped)
>
> ++++++ 0002-HSD3576159-Don-t-cork-the-cs-voice-sink-input-and-cs.patch (new)
> --- 0002-HSD3576159-Don-t-cork-the-cs-voice-sink-input-and-cs.patch
> +++ 0002-HSD3576159-Don-t-cork-the-cs-voice-sink-input-and-cs.patch
> +From 5c4d86b057d5112ed4e399c87b26b918a3113755 Mon Sep 17 00:00:00 2001
> +From: Mael Pouessel <mael.pouessel at intel.com>
> +Date: Tue, 3 Aug 2010 14:41:30 +0200
> +Subject: [PATCH 02/10] HSD3576159 - Don't cork the cs voice sink input and cs voice source output even if module-suspend_on_idle is active
> + Fix issue during the unloading of voice module
> + Signed-off-by: Mael Pouessel <mael.pouessel at intel.com>
> +
> +---
> + src/modules/module-voice.c | 17 ++++++-----------
> + 1 files changed, 6 insertions(+), 11 deletions(-)
> +
> +diff --git a/src/modules/module-voice.c b/src/modules/module-voice.c
> +index 2df8a08..ba60842 100644
> +--- a/src/modules/module-voice.c
> ++++ b/src/modules/module-voice.c
> +@@ -359,8 +359,9 @@ static int source_set_state_cb(pa_source *s, pa_source_state_t state) {
> + if (!PA_SOURCE_IS_LINKED(state) ||
> + !PA_SOURCE_OUTPUT_IS_LINKED(pa_source_output_get_state(u->source_output)))
> + return 0;
> +-
> ++#if 0 /*MP Fix Me: The CS source output must be in RUNNING state until the CS call release*/
> + pa_source_output_cork(u->source_output, state == PA_SOURCE_SUSPENDED);
> ++#endif
> + return 0;
> + }
> +
> +@@ -1428,8 +1429,9 @@ static int sink_set_state_cb(pa_sink *s, pa_sink_state_t state) {
> + if (!PA_SINK_IS_LINKED(state) ||
> + !PA_SINK_INPUT_IS_LINKED(pa_sink_input_get_state(u->sink_input)))
> + return 0;
> +-
> ++#if 0 /*MP Fix Me: The CS sink input must be in RUNNING state until the CS call release*/
> + pa_sink_input_cork(u->sink_input, state == PA_SINK_SUSPENDED);
> ++#endif
> + return 0;
> + }
> +
> +@@ -2297,15 +2299,9 @@ void pa__done(pa_module*m) {
> + if (u->sink)
> + pa_sink_unlink(u->sink);
> + if (u->source_output)
> +- pa_source_output_unref(u->source_output);
> ++ pa_source_output_unlink(u->source_output);
> + if (u->source)
> + pa_source_unlink(u->source);
> +- if (u->thread) {
> +- pa_asyncmsgq_send(u->thread_mq.inq, NULL, PA_MESSAGE_SHUTDOWN, NULL, 0, NULL);
> +- pa_thread_free(u->thread);
> +- }
> +-
> +-// pa_thread_mq_done(&u->thread_mq);
> + if (u->sink_input)
> + pa_sink_input_unref(u->sink_input);
> + if (u->sink)
> +@@ -2320,8 +2316,7 @@ void pa__done(pa_module*m) {
> + pa_rtpoll_item_free(u->sink_rtpoll_item);
> + if (u->source_rtpoll_item)
> + pa_rtpoll_item_free(u->source_rtpoll_item);
> +- if (u->rtpoll)
> +- pa_rtpoll_free(u->rtpoll);
> ++
> + if (u->out_mmap_memblocks) {
> + unsigned i;
> + for (i = 0; i < u->out_nfrags; i++)
> +--
> +1.7.2.3
> +
>
> ++++++ 0003-HSD3667148-Add-POLLOUT-event-support-from-modem-even.patch (new)
> --- 0003-HSD3667148-Add-POLLOUT-event-support-from-modem-even.patch
> +++ 0003-HSD3667148-Add-POLLOUT-event-support-from-modem-even.patch
> +From 6687501541137aaf308f4b6c0c14fa4a4b2362c2 Mon Sep 17 00:00:00 2001
> +From: Mael Pouessel <mael.pouessel at intel.com>
> +Date: Fri, 6 Aug 2010 12:04:40 +0200
> +Subject: [PATCH 03/10] HSD3667148 - Add POLLOUT event support from modem event.
> +
> +Fix the copy of Tx memblockq
> +
> +Signed-off-by: Mael Pouessel <mael.pouessel at intel.com>
> +---
> + src/modules/module-voice.c | 350 ++++++++++++++++++++------------------------
> + 1 files changed, 162 insertions(+), 188 deletions(-)
> +
> +diff --git a/src/modules/module-voice.c b/src/modules/module-voice.c
> +index ba60842..f48b7a7 100644
> +--- a/src/modules/module-voice.c
> ++++ b/src/modules/module-voice.c
> +@@ -106,7 +106,7 @@ PA_MODULE_USAGE(
> + "fragment_size=<fragment size> "
> + "mmap=<enable memory mapping?>");
> +
> +-#define DEFAULT_DEVICE "/dev/ifx_speech"
> ++#define DEFAULT_DEVICE "/dev/cmt_speech"
> + #define MEMBLOCKQ_MAXLENGTH (1024*1024*40)
> + #define MAP_SIZE 4096UL
> +
> +@@ -118,6 +118,12 @@ struct cs_ssp_iface {
> + /* mmap states/info exposed by ssp speech driver to application */
> + struct cs_mmap_config_block *mmap_cfg;
> +
> ++ unsigned int rx_slot; /*index of current rx_slot*/
> ++ unsigned int tx_slot; /*index of current rx_slot*/
> ++ int pcm_data_size; /*320 for NB, 640 for WB*/
> ++ char *env_burst_mode;
> ++ int burst_mode;
> ++ enum codec_type;
> + int fd;
> + };
> +
> +@@ -172,9 +178,9 @@ struct userdata {
> +
> + struct cs_ssp_iface ssp_iface;
> +
> +- /*MP -To compute period elapsed between 2 reads*/
> +- struct timeval first,second,lapsed; /*MP -To compute period elapsed between 2 reads*/
> +- struct timezone tzp;
> ++ /*MP -To compute period elapsed between 2 reads and 2 writes*/
> ++ struct timeval sinkfirst,sinksecond,sinklapsed,sourcefirst,sourcesecond,sourcelapsed;
> ++ struct timezone sinktzp,sourcetzp;
> +
> + };
> +
> +@@ -217,7 +223,7 @@ static int cs_mmap_read(struct userdata *u, pa_memchunk *chunk) {
> + pa_assert(u);
> + pa_assert(u->sink);
> +
> +- // pa_log("Mmmap reading...fd is: %d",u->fd);
> ++// pa_log("Mmmap reading...fd is: %d",u->fd);
> +
> + if (read(u->fd, &cs_cmd, sizeof(cs_cmd))<0){
> + pa_log("CS Read: %s\n", pa_cstrerror(errno));
> +@@ -229,26 +235,12 @@ static int cs_mmap_read(struct userdata *u, pa_memchunk *chunk) {
> + if ((cs_cmd & CS_RX_DATA_RECEIVED) && (u->cs_revents&POLLIN))
> + {
> + slot_idx=(cs_cmd&CS_PARAM_MASK);
> +- //pa_log("CS Read - CS_RX_DATA_RECEIVED: %d - fragment index: %d - in_mmap_current: %d", cs_cmd, slot_idx,u->in_mmap_current);
> ++// pa_log("CS Read - CS_RX_DATA_RECEIVED: %d - fragment index: %d - in_mmap_current: %d", cs_cmd, slot_idx,u->in_mmap_current);
> + }else{
> + pa_log("Failure: Rx command = %d", cs_cmd);
> + }
> +-/*
> +- if (!u->in_mmap_memblocks[u->in_mmap_current]) {
> +- pa_log("create memblock %d", u->in_mmap_current);
> +-
> +- chunk->memblock = u->in_mmap_memblocks[u->in_mmap_current] =
> +- pa_memblock_new_fixed(
> +- u->core->mempool,
> +- (uint8_t*) u->in_mmap + u->in_fragment_size*slot_idx,
> +- u->in_fragment_size,
> +- 1);
> +-
> +- chunk->length = pa_memblock_get_length(chunk->memblock);
> +- chunk->index = 0;
> ++
> +
> +- }
> +-*/
> + chunk->memblock =
> + pa_memblock_new_fixed(
> + u->core->mempool,
> +@@ -285,7 +277,8 @@ static int sink_rtpoll_work_cb(pa_rtpoll_item *i) {
> + if ((p->revents & POLLIN) == 0)
> + return 0;
> + u->cs_revents|=p->revents;
> +- //pa_log("poll() signalled POLLIN revents fd=%d",p->fd);
> ++// pa_log("poll() signalled POLLIN revents fd=%d",p->fd);
> ++
> + /*MP Read data from Modem and perform acoustic processing here*/
> + /*push it into u->sink_memblockq ASAP*/
> + /*Force to 0 the vchunk_length*/
> +@@ -294,13 +287,13 @@ static int sink_rtpoll_work_cb(pa_rtpoll_item *i) {
> + /*The right place should in sink_rtpoll_work_cb to get sample from modem*/
> + if (u->use_mmap) {
> + if (u->cs_revents & POLLIN){
> +- //pa_log("prepare mmap_read");
> ++// pa_log("preapre mmap_read");
> + if ((ret = cs_mmap_read(u,&vchunk)) < 0){
> + pa_log("Failed to read data from Modem: %s\n", pa_cstrerror(errno));
> + return -1;
> + }
> + u->cs_revents &= ~POLLIN;
> +- //pa_log("mmap_read");
> ++// pa_log("mmap_read");
> + }
> + }
> + else {
> +@@ -327,6 +320,8 @@ static int sink_rtpoll_work_cb(pa_rtpoll_item *i) {
> + static int source_rtpoll_work_cb(pa_rtpoll_item *i) {
> + struct userdata *u;
> + struct pollfd *p;
> ++ pa_memchunk *dummychunk;
> ++
> + pa_assert_se(u = pa_rtpoll_item_get_userdata(i));
> +
> + p = pa_rtpoll_item_get_pollfd(i, NULL);
> +@@ -340,13 +335,15 @@ static int source_rtpoll_work_cb(pa_rtpoll_item *i) {
> + return 0;
> + u->cs_revents|=p->revents;
> +
> +- //pa_log("poll() signalled POLLOUT revents.");
> ++// pa_log("poll() signalled POLLOUT revents.");
> +
> + /*MP Read data from Modem and perform acoustic processing*/
> ++ cs_mmap_write(u,dummychunk);
> +
> + p->revents = 0;
> ++ u->cs_revents &= ~POLLOUT;
> +
> +- return 1;
> ++ return 0;
> + }
> +
> + /* Called from main context */
> +@@ -359,7 +356,7 @@ static int source_set_state_cb(pa_source *s, pa_source_state_t state) {
> + if (!PA_SOURCE_IS_LINKED(state) ||
> + !PA_SOURCE_OUTPUT_IS_LINKED(pa_source_output_get_state(u->source_output)))
> + return 0;
> +-#if 0 /*MP Fix Me: The CS source output must be in RUNNING state until the CS call release*/
> ++#if 0 /*MP FIXME: The CS source output must be in RUNNING state until the CS call release*/
> + pa_source_output_cork(u->source_output, state == PA_SOURCE_SUSPENDED);
> + #endif
> + return 0;
> +@@ -449,6 +446,61 @@ static void source_get_mute_cb(pa_source *s) {
> + pa_source_get_mute(u->source_output->source, TRUE);
> + }
> +
> ++// This should actually be in memblockq.c to check that length % base == 0
> ++int util_memblockq_to_chunk(pa_mempool *mempool, pa_memblockq *memblockq, pa_memchunk *ochunk, size_t length) {
> ++
> ++ if (pa_memblockq_get_length(memblockq) >= length) {
> ++ pa_memchunk tchunk = { .memblock = NULL, .length = 0, .index = 0 };
> ++ //pa_assert_se(!pa_memblockq_peek(memblockq, &tchunk));
> ++ if (pa_memblockq_peek(memblockq, &tchunk)) {
> ++ pa_log("pa_memblockq_peek failed unexpectedly (%d bytes left %d)", pa_memblockq_get_length(memblockq), tchunk.length);
> ++ return 0;
> ++ }
> ++
> ++ if (tchunk.length >= length) { // We can reuse the single block...
> ++ ochunk->memblock = tchunk.memblock;
> ++ ochunk->index = tchunk.index;
> ++ ochunk->length = length;
> ++ pa_memblockq_drop(memblockq, length);
> ++ return 1;
> ++ }
> ++ else {
> ++ char *d, *s;
> ++ ochunk->memblock = pa_memblock_new(mempool, length);
> ++ ochunk->length = 0;
> ++ ochunk->index = 0;
> ++ d = pa_memblock_acquire(ochunk->memblock);
> ++ while (ochunk->length + tchunk.length <= length) {
> ++ s = pa_memblock_acquire(tchunk.memblock);
> ++ memcpy(d + ochunk->length, s + tchunk.index, tchunk.length);
> ++ ochunk->length += tchunk.length;
> ++ pa_memblock_release(tchunk.memblock);
> ++ pa_memblockq_drop(memblockq, tchunk.length);
> ++ if (tchunk.memblock) {
> ++ pa_memblock_unref(tchunk.memblock);
> ++ tchunk.memblock = NULL;
> ++ }
> ++ pa_memblockq_peek(memblockq, &tchunk);
> ++ }
> ++ if (ochunk->length < length) {
> ++ size_t len = length - ochunk->length;
> ++ pa_assert(len < tchunk.length);
> ++ s = pa_memblock_acquire(tchunk.memblock);
> ++ memcpy(d + ochunk->length, s + tchunk.index, len);
> ++ ochunk->length += len;
> ++ pa_memblock_release(tchunk.memblock);
> (590 more lines skipped)
>
> ++++++ 0004-HSD3669166-Pulseaudio-Add-Burst-mode-support.patch (new)
> --- 0004-HSD3669166-Pulseaudio-Add-Burst-mode-support.patch
> +++ 0004-HSD3669166-Pulseaudio-Add-Burst-mode-support.patch
> +From 77471fa6b30fa97552e420fb32f0b1bf196faa6f Mon Sep 17 00:00:00 2001
> +From: Mael Pouessel <mael.pouessel at intel.com>
> +Date: Fri, 13 Aug 2010 09:10:16 +0200
> +Subject: [PATCH 04/10] HSD3669166-Pulseaudio Add Burst mode support
> +
> +Add PCM Inband Protocol and burst mode support
> +
> +Signed-off-by: Mael Pouessel <mael.pouessel at intel.com>
> +---
> + src/modules/cs-protocol.h | 4 +-
> + src/modules/module-voice.c | 360 ++++++++++++++++++++++++++++++++------------
> + 2 files changed, 264 insertions(+), 100 deletions(-)
> +
> +diff --git a/src/modules/cs-protocol.h b/src/modules/cs-protocol.h
> +index 06cbdd8..922e4a2 100755
> +--- a/src/modules/cs-protocol.h
> ++++ b/src/modules/cs-protocol.h
> +@@ -54,6 +54,7 @@
> +
> + /* parameters to CS_CONFIG_BUGS ioctl */
> + #define CS_FEAT_TSTAMP_RX_CTRL (1 << 0)
> ++#define CS_FEAT_BURST_MODE (1 << 1)
> +
> + /* parameters to CS_GET_STATE ioctl */
> + #define CS_STATE_CLOSED 0
> +@@ -62,9 +63,6 @@
> +
> + #define CS_MAX_BUFFERS 16 /* maximum number of TX/RX buffers */
> +
> +-/* Parameters to CS_GET_CAPABILITIES*/
> +-#define CS_CAP_MMAP (1 << 0)
> +-
> + /*
> + * Parameters for setting up the data buffers
> + */
> +diff --git a/src/modules/module-voice.c b/src/modules/module-voice.c
> +index f48b7a7..21df3f8 100644
> +--- a/src/modules/module-voice.c
> ++++ b/src/modules/module-voice.c
> +@@ -108,7 +108,63 @@ PA_MODULE_USAGE(
> +
> + #define DEFAULT_DEVICE "/dev/cmt_speech"
> + #define MEMBLOCKQ_MAXLENGTH (1024*1024*40)
> ++
> ++#define BURSTEMODE_ENVVAR "BURST_MODE"
> ++#define BURSTEMODE_96KHZ "96"
> ++#define BURSTEMODE_48KHZ "48"
> ++
> + #define MAP_SIZE 4096UL
> ++#define SPEECH_BUFFER_SIZE 4096UL
> ++
> ++#define NB_RX_BUFS 2 /*Number of max Rx fragments in Burst Mode*/
> ++#define NB_TX_BUFS 2 /*Number of max Tx fragments in Burst Mode*/
> ++
> ++/*PCM InBand Protocol mapping*/
> ++#define PCM_INBAND_SIG_SIZE 10 /* Within PCM Inband Protocol messages, the first 10 bytes are dedicated to SIGNATURE */
> ++#define PCM_INBAND_CTRL_SIZE 6 /* Within PCM Inband Protocol messages, the next 6 bytes are dedicated to CONTROL messages */
> ++#define PCM_INBAND_HEADER_SIZE (PCM_INBAND_SIG_SIZE+PCM_INBAND_CTRL_SIZE)
> ++#define PCM_DATA_BUF_SIZE 640 /*Size in Bytes 640 for WB data PCM samples*/
> ++#define PCM_BUF_SIZE (PCM_INBAND_HEADER_SIZE+PCM_DATA_BUF_SIZE) /*656 bytes per fragments in Burst Mode */
> ++
> ++#define DL_CTRL_CODEC(p) ((p[2] & (1 << 6)) >> 6) /**/
> ++
> ++enum bfi_type{
> ++ BFI_NO,
> ++ BFI_YES
> ++};
> ++
> ++enum frame_type{
> ++ FRM_SILENCE,
> ++ FRM_SPEECH
> ++};
> ++
> ++enum codec_type {
> ++ CODEC_NB,
> ++ CODEC_WB
> ++};
> ++
> ++struct pcm_inband_ctrl_dwn {
> ++
> ++ uint16_t cif : 1; /* Change Indicator Flag */
> ++ uint16_t reserved0 : 15; /* Reserved word 0 */
> ++ uint16_t ho : 3; /* Handover information */
> ++ uint16_t ct : 1; /* Call Termination */
> ++ uint16_t reserved1 : 12; /* Reserved word 1 */
> ++ uint16_t bfi : 1; /* Bad Frame Indicator */
> ++ uint16_t sp : 1; /* Speech Flag */
> ++ uint16_t codectype : 4; /* Codec */
> ++ uint16_t st : 1; /* Speech Type */
> ++ uint16_t reserved2 : 9; /* Reserved word 2 */
> ++};
> ++
> ++struct pcm_inband_ctrl_up {
> ++
> ++ uint16_t reserved0; /* Reserved word 0 */
> ++ uint16_t reserved1; /* Reserved word 1 */
> ++ uint16_t lfi : 1; /* Lost Frame Indicator */
> ++ uint16_t st : 1; /* Speech Type */
> ++ uint16_t reserved2 : 14; /* Reserved word 2 */
> ++};
> +
> + /* SSP Interface */
> + struct cs_ssp_iface {
> +@@ -120,10 +176,10 @@ struct cs_ssp_iface {
> +
> + unsigned int rx_slot; /*index of current rx_slot*/
> + unsigned int tx_slot; /*index of current rx_slot*/
> +- int pcm_data_size; /*320 for NB, 640 for WB*/
> ++ int pcm_data_size; /*320 for NB, 640 for WB*/
> + char *env_burst_mode;
> + int burst_mode;
> +- enum codec_type;
> ++ enum codec_type codec;
> + int fd;
> + };
> +
> +@@ -164,7 +220,7 @@ struct userdata {
> +
> + pa_bool_t use_mmap;
> + unsigned out_mmap_current, in_mmap_current;
> +- void *in_mmap, *out_mmap;
> ++ unsigned short *in_mmap, *out_mmap;
> + pa_memblock **in_mmap_memblocks, **out_mmap_memblocks;
> +
> + int in_mmap_saved_nfrags, out_mmap_saved_nfrags;
> +@@ -179,7 +235,7 @@ struct userdata {
> + struct cs_ssp_iface ssp_iface;
> +
> + /*MP -To compute period elapsed between 2 reads and 2 writes*/
> +- struct timeval sinkfirst,sinksecond,sinklapsed,sourcefirst,sourcesecond,sourcelapsed;
> ++ struct timeval sinkfirst,sinksecond,sinklapsed,sourcefirst,sourcesecond,sourcelapsed;
> + struct timezone sinktzp,sourcetzp;
> +
> + };
> +@@ -215,10 +271,14 @@ enum {
> +
> +
> + static int cs_read(struct userdata *u, pa_memchunk *chunk);
> ++static int util_memblockq_to_chunk(pa_mempool *mempool, pa_memblockq *memblockq, pa_memchunk *ochunk, size_t length);
> ++static int cs_mmap_write(struct userdata *u);
> ++static void pa_cs_voice_reset_fragments(struct userdata *u);
> ++
> +
> + static int cs_mmap_read(struct userdata *u, pa_memchunk *chunk) {
> + unsigned int cs_cmd;
> +- unsigned int slot_idx;
> ++ uint8_t* rx_slot_ptr;
> +
> + pa_assert(u);
> + pa_assert(u->sink);
> +@@ -234,22 +294,42 @@ static int cs_mmap_read(struct userdata *u, pa_memchunk *chunk) {
> + /*Get the the fragment index*/
> + if ((cs_cmd & CS_RX_DATA_RECEIVED) && (u->cs_revents&POLLIN))
> + {
> +- slot_idx=(cs_cmd&CS_PARAM_MASK);
> ++ u->ssp_iface.rx_slot=(cs_cmd&CS_PARAM_MASK);
> + // pa_log("CS Read - CS_RX_DATA_RECEIVED: %d - fragment index: %d - in_mmap_current: %d", cs_cmd, slot_idx,u->in_mmap_current);
> + }else{
> + pa_log("Failure: Rx command = %d", cs_cmd);
> + }
> +-
> ++
> ++ rx_slot_ptr = (uint8_t *) (u->ssp_iface.mmap_base +
> ++ u->ssp_iface.mmap_cfg->rx_offsets[u->ssp_iface.rx_slot]);
> ++
> ++ if (u->ssp_iface.burst_mode) {
> ++ /* check for codec type change */
> ++#if 1
> ++ struct pcm_inband_ctrl_dwn *ptr_dl_ctrl = (struct pcm_inband_ctrl_dwn *) (rx_slot_ptr + PCM_INBAND_SIG_SIZE);
> ++ u->ssp_iface.codec = ptr_dl_ctrl->st;
> ++ u->ssp_iface.pcm_data_size = u->ssp_iface.codec == CODEC_NB ? 320 : 640;
> ++#endif
> ++#if 0
> ++ unsigned short *ptr_dl_ctrl = (unsigned short *)(rx_slot_ptr + PCM_INBAND_SIG_SIZE);
> ++ u->ssp_iface.codec = DL_CTRL_CODEC(ptr_dl_ctrl);
> ++ u->ssp_iface.pcm_data_size = u->ssp_iface.codec == CODEC_NB ? 320 : 640;
> ++#endif
> ++ /* pcm data address */
> ++ rx_slot_ptr += PCM_INBAND_HEADER_SIZE;
> ++ }
> +
> + chunk->memblock =
> + pa_memblock_new_fixed(
> + u->core->mempool,
> +- (uint8_t*) u->in_mmap + u->in_fragment_size*slot_idx,
> +- u->in_fragment_size,
> ++ rx_slot_ptr,
> ++ u->ssp_iface.pcm_data_size,
> + 1);
> + chunk->length = pa_memblock_get_length(chunk->memblock);
> + chunk->index = 0;
> +
> ++
> ++
> + u->in_mmap_current++;
> + if (u->in_mmap_current >= u->in_nfrags)
> + u->in_mmap_current=0;
> +@@ -260,7 +340,7 @@ static int cs_mmap_read(struct userdata *u, pa_memchunk *chunk) {
> (598 more lines skipped)
>
> ++++++ 0005-HSD-3576250-Pulseaudio-uplink-delayed.patch (new)
> --- 0005-HSD-3576250-Pulseaudio-uplink-delayed.patch
> +++ 0005-HSD-3576250-Pulseaudio-uplink-delayed.patch
> +From 52a038c6170528653d211900afa276c641682c43 Mon Sep 17 00:00:00 2001
> +From: Sylvain Pichon <sylvainx.pichon at intel.com>
> +Date: Fri, 27 Aug 2010 14:52:26 +0200
> +Subject: [PATCH 05/10] HSD#3576250 Pulseaudio: uplink delayed
> +
> +Voice module continue to accumulate audio even when call is dropped
> +If another call is set, old audio will be played
> +
> +Signed-off-by: Sylvain Pichon <sylvainx.pichon at intel.com>
> +---
> + src/modules/module-voice.c | 60 ++++++++++++++++++++++++++++++-------------
> + 1 files changed, 42 insertions(+), 18 deletions(-)
> +
> +diff --git a/src/modules/module-voice.c b/src/modules/module-voice.c
> +index 21df3f8..30f463e 100644
> +--- a/src/modules/module-voice.c
> ++++ b/src/modules/module-voice.c
> +@@ -113,6 +113,11 @@ PA_MODULE_USAGE(
> + #define BURSTEMODE_96KHZ "96"
> + #define BURSTEMODE_48KHZ "48"
> +
> ++#define SOURCE_FRAME_SIZE_MS 20ULL
> ++#define SINK_FRAME_SIZE_MS 20ULL
> ++#define MEMBLOCKQ_OVERFLOW_MS 1000ULL /* 1000ms */
> ++#define DESYNC_ABS_MS 4ULL /* 4ms used to compensate lack of/too many samples */
> ++
> + #define MAP_SIZE 4096UL
> + #define SPEECH_BUFFER_SIZE 4096UL
> +
> +@@ -335,8 +340,6 @@ static int cs_mmap_read(struct userdata *u, pa_memchunk *chunk) {
> + u->in_mmap_current=0;
> +
> + return cs_cmd;
> +-
> +-
> + }
> +
> + /* Called from I/O thread context */
> +@@ -586,12 +589,15 @@ static int util_memblockq_to_chunk(pa_mempool *mempool, pa_memblockq *memblockq,
> + }
> + return 0;
> + }
> ++
> + static int cs_mmap_write(struct userdata *u) {
> + int cs_cmd;
> + unsigned slot_idx;
> + pa_memchunk tchunk;
> + pa_memchunk vchunk;
> + uint8_t *txslot_ptr;
> ++ size_t desync_abs_b = pa_usec_to_bytes(DESYNC_ABS_MS*1000, &u->source->sample_spec);
> ++ size_t length;
> +
> + pa_assert(u);
> + pa_assert(u->source);
> +@@ -615,16 +621,20 @@ static int cs_mmap_write(struct userdata *u) {
> +
> + tchunk.length = pa_memblock_get_length(tchunk.memblock);
> + tchunk.index = 0;
> ++ length = pa_memblockq_get_length(u->source_memblockq);
> ++
> ++ /* Forward write index if not enought sample available, rewind it otherwise */
> ++ if ( (length < tchunk.length + desync_abs_b/2) || (length > tchunk.length + 3*desync_abs_b/2) ) {
> ++ pa_memblockq_seek(u->source_memblockq,
> ++ tchunk.length + desync_abs_b,
> ++ PA_SEEK_RELATIVE_ON_READ, TRUE);
> ++ }
> +
> +- /*Get Tx samples from source_memblockq*/
> +- if ((util_memblockq_to_chunk(u->core->mempool, u->source_memblockq, &vchunk, tchunk.length))==0){
> +- /*Generate a silence frame*/
> +- pa_silence_memchunk_get(&u->core->silence_cache,
> +- u->core->mempool,
> +- &vchunk,
> +- &u->source->sample_spec,
> +- tchunk.length);
> +- }
> ++ if ((util_memblockq_to_chunk(u->core->mempool, u->source_memblockq, &vchunk, tchunk.length))==0) {
> ++ pa_log_error("Failed to get %d of audio, delta (required-available)=%d\n",
> ++ tchunk.length,
> ++ tchunk.length-length);
> ++ }
> +
> + vchunk.length=tchunk.length;
> +
> +@@ -707,7 +717,6 @@ static void source_output_push_cb(pa_source_output *o, const pa_memchunk *chunk)
> + struct userdata *u;
> + int ret;
> +
> +-
> + pa_source_output_assert_ref(o);
> + pa_source_output_assert_io_context(o);
> + pa_assert_se(u = o->userdata);
> +@@ -718,6 +727,13 @@ static void source_output_push_cb(pa_source_output *o, const pa_memchunk *chunk)
> + }
> +
> + if (u->use_mmap){
> ++ /* Flush memblock queue if two many samples stored in it */
> ++ if (pa_memblockq_get_length(u->source_memblockq) >
> ++ pa_usec_to_bytes(MEMBLOCKQ_OVERFLOW_MS*1000, &u->source->sample_spec)) {
> ++ pa_memblockq_seek(u->source_memblockq,
> ++ pa_usec_to_bytes((SOURCE_FRAME_SIZE_MS + DESYNC_ABS_MS)*1000, &u->source->sample_spec),
> ++ PA_SEEK_RELATIVE_ON_READ, TRUE);
> ++ }
> + /*Push tx sample into source memblockq*/
> + pa_memblockq_push(u->source_memblockq, chunk);
> + }
> +@@ -1975,7 +1991,7 @@ int pa__init(pa_module*m) {
> + pa_sink_input_new_data sink_input_data;
> + pa_source_new_data source_new_data;
> + pa_source_output_new_data source_output_data;
> +- pa_memchunk silence;
> ++ pa_memchunk sink_silence, source_silence;
> +
> + pa_assert(m);
> +
> +@@ -2197,8 +2213,16 @@ int pa__init(pa_module*m) {
> +
> +
> + /*Generate a memblockq */
> +- u->source_memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&ss), 1, 1, 0, NULL);
> +-
> ++ pa_silence_memchunk_get(
> ++ &u->source_output->core->silence_cache,
> ++ u->source_output->core->mempool,
> ++ &source_silence,
> ++ &u->source_output->sample_spec,
> ++ u->source_output->thread_info.resampler ?
> ++ pa_resampler_max_block_size(u->source_output->thread_info.resampler) :
> ++ 0);
> ++ u->source_memblockq = pa_memblockq_new(0, MEMBLOCKQ_MAXLENGTH, 0, pa_frame_size(&ss), 1, 1, 0, &source_silence);
> ++ pa_memblock_unref(source_silence.memblock);
> + } /*End if (mode != O_RDONLY) */
> +
> + /*Create sink and sink input*/
> +@@ -2311,7 +2335,7 @@ int pa__init(pa_module*m) {
> + u->sink_input->userdata = u;
> +
> + /*Generate a silence frame*/
> +- pa_sink_input_get_silence(u->sink_input, &silence);
> ++ pa_sink_input_get_silence(u->sink_input, &sink_silence);
> + u->sink_memblockq = pa_memblockq_new(
> + 0,
> + MEMBLOCKQ_MAXLENGTH,
> +@@ -2320,10 +2344,10 @@ int pa__init(pa_module*m) {
> + 1,
> + 1,
> + 0,
> +- &silence);
> ++ &sink_silence);
> +
> + pa_log_info("creating silence");
> +- pa_memblock_unref(silence.memblock);
> ++ pa_memblock_unref(sink_silence.memblock);
> +
> + } /*End if (mode != O_RDONLY) */
> +
> +--
> +1.7.2.3
> +
>
> ++++++ 0006-Pulseaudio-CS-Voice-Call-Add-WB-AMR-support.-Add-SRC.patch (new)
> --- 0006-Pulseaudio-CS-Voice-Call-Add-WB-AMR-support.-Add-SRC.patch
> +++ 0006-Pulseaudio-CS-Voice-Call-Add-WB-AMR-support.-Add-SRC.patch
> +From 52334e63f4e0455cafd977fdb0116c6f12fa7dc7 Mon Sep 17 00:00:00 2001
> +From: Mael Pouessel <mael.pouessel at intel.com>
> +Date: Wed, 6 Oct 2010 03:12:26 +0200
> +Subject: [PATCH 06/10] Pulseaudio: CS Voice Call: Add WB-AMR support. Add SRC 8kHz<=>16khz
> +
> +HSD=3669226 CS Voice Call: Add WB-AMR support . Add SRC 8kHz<=>16khz insidePulseaudio CS voice module
> +
> +Signed-off-by: Mael Pouessel <mael.pouessel at intel.com>
> +---
> + src/daemon/default.pa.in | 115 +++---------------------
> + src/modules/module-voice.c | 215 +++++++++++++++++++++++++++++++------------
> + 2 files changed, 167 insertions(+), 163 deletions(-)
> +
> +diff --git a/src/daemon/default.pa.in b/src/daemon/default.pa.in
> +index 00c000e..3adcb21 100755
> +--- a/src/daemon/default.pa.in
> ++++ b/src/daemon/default.pa.in
> +@@ -19,14 +19,6 @@
> + # This startup script is used only if PulseAudio is started per-user
> + # (i.e. not in system mode)
> +
> +-.nofail
> +-
> +-### Load something into the sample cache
> +-#load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
> +-#load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
> +-#load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav
> +-#load-sample-lazy pulse-access /usr/share/sounds/generic.wav
> +-
> + .fail
> +
> + ### Automatically restore the volume of streams and devices
> +@@ -34,104 +26,21 @@ load-module module-device-restore
> + load-module module-stream-restore
> + load-module module-card-restore
> +
> +-### Automatically augment property information from .desktop files
> +-### stored in /usr/share/application
> +-load-module module-augment-properties
> +-
> +-### Load audio drivers statically (it's probably better to not load
> +-### these drivers manually, but instead use module-hal-detect --
> +-### see below -- for doing this automatically)
> +-#load-module module-alsa-sink
> +-#load-module module-alsa-source device=hw:1,0
> +-#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
> +-#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
> +-#load-module module-null-sink
> +-#load-module module-pipe-sink
> +-
> +-### Automatically load driver modules depending on the hardware available
> +-.ifexists module-udev-detect at PA_SOEXT@
> +-load-module module-udev-detect
> +-.else
> +-### Alternatively use the static hardware detection module (for systems that
> +-### lack udev support)
> +-load-module module-detect
> +-.endif
> +-
> +-### Automatically load driver modules for Bluetooth hardware
> +-.ifexists module-bluetooth-discover at PA_SOEXT@
> +-load-module module-bluetooth-discover
> +-.endif
> +-
> +-### Load several protocols
> +-.ifexists module-esound-protocol-unix at PA_SOEXT@
> +-load-module module-esound-protocol-unix
> +-.endif
> + load-module module-native-protocol-unix
> +
> +-### Network access (may be configured with paprefs, so leave this commented
> +-### here if you plan to use paprefs)
> +-#load-module module-esound-protocol-tcp
> +-#load-module module-native-protocol-tcp
> +-#load-module module-zeroconf-publish
> +-
> +-### Load the RTP reciever module (also configured via paprefs, see above)
> +-#load-module module-rtp-recv
> +-
> +-### Load the RTP sender module (also configured via paprefs, see above)
> +-#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 description="RTP Multicast Sink"
> +-#load-module module-rtp-send source=rtp.monitor
> +-
> +-### Load additional modules from GConf settings. This can be configured with the paprefs tool.
> +-### Please keep in mind that the modules configured by paprefs might conflict with manually
> +-### loaded modules.
> +-.ifexists module-gconf at PA_SOEXT@
> +-.nofail
> +-load-module module-gconf
> +-.fail
> +-.endif
> +-
> +-### Automatically restore the default sink/source when changed by the user during runtime
> +-load-module module-default-device-restore
> ++### Automatically suspend sinks/sources that become idle for too long
> ++#load-module module-suspend-on-idle
> +
> + ### Automatically move streams to the default sink if the sink they are
> + ### connected to dies, similar for sources
> + load-module module-rescue-streams
> +-
> +-### Make sure we always have a sink around, even if it is a null sink.
> +-load-module module-always-sink
> +-
> +-### Honour intended role device property
> +-load-module module-intended-roles
> +-
> +-### Automatically suspend sinks/sources that become idle for too long
> +-load-module module-suspend-on-idle
> +-
> +-### If autoexit on idle is enabled we want to make sure we only quit
> +-### when no local session needs us anymore.
> +-load-module module-console-kit
> +-
> +-### Enable positioned event sounds
> +-load-module module-position-event-sounds
> +-
> +-### Cork music streams when a phone stream is active
> +-load-module module-cork-music-on-phone
> +-
> +-# X11 modules should not be started from default.pa so that one daemon
> +-# can be shared by multiple sessions.
> +-
> +-### Load X11 bell module
> +-#load-module module-x11-bell sample=bell-windowing-system
> +-
> +-### Register ourselves in the X11 session manager
> +-#load-module module-x11-xsmp
> +-
> +-### Publish connection data in the X11 root window
> +-#.ifexists module-x11-publish at PA_SOEXT@
> +-#.nofail
> +-#load-module module-x11-publish
> +-#.fail
> +-#.endif
> +-
> +-### Make some devices default
> +-#set-default-sink output
> +-#set-default-source input
> ++#load-module module-hal-detect tsched=0
> ++#load-module module-bluetooth-discover
> ++
> ++load-module module-suspend-on-idle timeout=0
> ++load-module module-alsa-sink device=hw:0,0 sink_name=hs_sink channels=2 tsched=0
> ++load-module module-alsa-source device=hw:0,0 source_name=hs_source tsched=0
> ++load-module module-alsa-sink device=hw:0,1 sink_name=ihf_sink channels=2 tsched=0
> ++load-module module-alsa-sink device=hw:0,2 sink_name=vib1_sink channels=1 tsched=0
> ++load-module module-alsa-sink device=hw:0,3 sink_name=vib2_sink channels=1 tsched=0
> ++#load-module module-voice sink_name=Voicesink source_name=Voicesource device=/dev/cmt_speech channels=1 transmit=TRUE receive=TRUE fragments=4 fragment_size=320 mmap=TRUE
> +\ No newline at end of file
> +diff --git a/src/modules/module-voice.c b/src/modules/module-voice.c
> +index 30f463e..811e968 100644
> +--- a/src/modules/module-voice.c
> ++++ b/src/modules/module-voice.c
> +@@ -133,6 +133,7 @@ PA_MODULE_USAGE(
> +
> + #define DL_CTRL_CODEC(p) ((p[2] & (1 << 6)) >> 6) /**/
> +
> ++
> + enum bfi_type{
> + BFI_NO,
> + BFI_YES
> +@@ -243,6 +244,11 @@ struct userdata {
> + struct timeval sinkfirst,sinksecond,sinklapsed,sourcefirst,sourcesecond,sourcelapsed;
> + struct timezone sinktzp,sourcetzp;
> +
> ++ /*Resampler to convert 8kHz to 16kHz in Downlink in case of NB-AMR*/
> ++ pa_resampler *resampler_8kto16k;
> ++ /*Resampler to convert 16kHz (WB-AMR) to 8kHz (NB-AMR) in uplink in case of NB-AMR*/
> ++ pa_resampler *resampler_16kto8k;
> ++
> + };
> +
> + static const char* const valid_modargs[] = {
> +@@ -288,8 +294,6 @@ static int cs_mmap_read(struct userdata *u, pa_memchunk *chunk) {
> + pa_assert(u);
> + pa_assert(u->sink);
> +
> +-// pa_log("Mmmap reading...fd is: %d",u->fd);
> +-
> + if (read(u->fd, &cs_cmd, sizeof(cs_cmd))<0){
> + pa_log("CS Read: %s\n", pa_cstrerror(errno));
> + return -1;
> +@@ -297,11 +301,10 @@ static int cs_mmap_read(struct userdata *u, pa_memchunk *chunk) {
> + };
> +
> + /*Get the the fragment index*/
> +- if ((cs_cmd & CS_RX_DATA_RECEIVED) && (u->cs_revents&POLLIN))
> ++ if (cs_cmd & CS_RX_DATA_RECEIVED)
> + {
> + u->ssp_iface.rx_slot=(cs_cmd&CS_PARAM_MASK);
> +-// pa_log("CS Read - CS_RX_DATA_RECEIVED: %d - fragment index: %d - in_mmap_current: %d", cs_cmd, slot_idx,u->in_mmap_current);
> +- }else{
> ++ } else{
> + pa_log("Failure: Rx command = %d", cs_cmd);
> + }
> +
> +@@ -310,30 +313,49 @@ static int cs_mmap_read(struct userdata *u, pa_memchunk *chunk) {
> (429 more lines skipped)
>
> ++++++ 0007-Pulseaudio-Voice-module-Fix-sink-memblockq-corruptio.patch (new)
> --- 0007-Pulseaudio-Voice-module-Fix-sink-memblockq-corruptio.patch
> +++ 0007-Pulseaudio-Voice-module-Fix-sink-memblockq-corruptio.patch
> +From 988ae27bac6d3715d27d087ab8e2d572677c2eff Mon Sep 17 00:00:00 2001
> +From: Mael Pouessel <mael.pouessel at intel.com>
> +Date: Sat, 16 Oct 2010 01:10:22 +0200
> +Subject: [PATCH 07/10] Pulseaudio: Voice module Fix sink memblockq corruption during WB-AMR voice call
> +
> +HSD=3669255 Fix sink memblockq corruption. Add latency controller support in Downlink
> +
> +Signed-off-by: Mael Pouessel <mael.pouessel at intel.com>
> +---
> + src/modules/module-voice.c | 61 ++++++++++++++++++++++++++------------------
> + 1 files changed, 36 insertions(+), 25 deletions(-)
> +
> +diff --git a/src/modules/module-voice.c b/src/modules/module-voice.c
> +index 811e968..48008b4 100644
> +--- a/src/modules/module-voice.c
> ++++ b/src/modules/module-voice.c
> +@@ -115,7 +115,7 @@ PA_MODULE_USAGE(
> +
> + #define SOURCE_FRAME_SIZE_MS 20ULL
> + #define SINK_FRAME_SIZE_MS 20ULL
> +-#define MEMBLOCKQ_OVERFLOW_MS 1000ULL /* 1000ms */
> ++#define MEMBLOCKQ_OVERFLOW_MS 100ULL /* 100ms */
> + #define DESYNC_ABS_MS 4ULL /* 4ms used to compensate lack of/too many samples */
> +
> + #define MAP_SIZE 4096UL
> +@@ -290,6 +290,7 @@ static void pa_cs_voice_reset_fragments(struct userdata *u);
> + static int cs_mmap_read(struct userdata *u, pa_memchunk *chunk) {
> + unsigned int cs_cmd;
> + uint8_t* rx_slot_ptr;
> ++ pa_memchunk wchunk;
> +
> + pa_assert(u);
> + pa_assert(u->sink);
> +@@ -330,9 +331,6 @@ static int cs_mmap_read(struct userdata *u, pa_memchunk *chunk) {
> + rx_slot_ptr += PCM_INBAND_HEADER_SIZE;
> + }
> +
> +- /* Perform upsampling 8k to 16k in case of NB-AMR*/
> +- if(u->ssp_iface.codec == CODEC_NB) {
> +- pa_memchunk wchunk;
> + wchunk.memblock =
> + pa_memblock_new_fixed(
> + u->core->mempool,
> +@@ -341,22 +339,21 @@ static int cs_mmap_read(struct userdata *u, pa_memchunk *chunk) {
> + 1);
> + wchunk.length = pa_memblock_get_length(wchunk.memblock);
> + wchunk.index = 0;
> +- pa_memblock_ref(wchunk.memblock);
> ++
> ++ /* Perform upsampling 8k to 16k in case of NB-AMR*/
> ++ if(u->ssp_iface.codec == CODEC_NB) {
> + pa_resampler_run(u->resampler_8kto16k, &wchunk, chunk);
> +- pa_memblock_unref(wchunk.memblock);
> + }
> + else {
> +- chunk->memblock =
> +- pa_memblock_new_fixed(
> +- u->core->mempool,
> +- rx_slot_ptr,
> +- u->ssp_iface.pcm_data_size,
> +- 1);
> +- chunk->length = pa_memblock_get_length(chunk->memblock);
> +- chunk->index = 0;
> +
> ++ chunk->length = wchunk.length;
> ++ chunk->index = 0;
> ++ chunk->memblock = pa_memblock_new(u->sink->core->mempool, chunk->length);
> ++ pa_memchunk_memcpy(chunk, &wchunk);
> + }
> +
> ++ pa_memblock_unref(wchunk.memblock);
> ++
> + u->in_mmap_current++;
> + if (u->in_mmap_current >= u->in_nfrags)
> + u->in_mmap_current=0;
> +@@ -414,8 +411,20 @@ static void sink_rtpoll_after_cb(pa_rtpoll_item *i) {
> +
> + if (vchunk.length > 0)
> + {
> ++ size_t desync_abs_b,length;
> ++ desync_abs_b = pa_usec_to_bytes(DESYNC_ABS_MS*1000, &u->sink->sample_spec);
> ++
> + pa_memblockq_push(u->sink_memblockq, &vchunk);
> + pa_memblock_unref(vchunk.memblock);
> ++
> ++ length = pa_memblockq_get_length(u->sink_memblockq);
> ++ /* Forward write index if not enought sample available, rewind it otherwise */
> ++ if ( (length < u->frag_size + desync_abs_b/2) || (length > u->frag_size + 3*desync_abs_b/2) ) {
> ++ pa_log_info("***** Adjusting sink memq : %lu bytes",length);
> ++ pa_memblockq_seek(u->sink_memblockq,
> ++ u->frag_size + desync_abs_b,
> ++ PA_SEEK_RELATIVE_ON_READ, TRUE);
> ++ }
> + }
> +
> + /* Only for BM - Write Tx PCM samples to Modem driver. Next burst is for transferring Tx samples*/
> +@@ -689,6 +698,7 @@ static int cs_mmap_write(struct userdata *u) {
> + return -1;
> + }
> +
> ++
> + u->out_mmap_saved_nfrags = 0;
> +
> + u->ssp_iface.tx_slot++;
> +@@ -1726,6 +1736,7 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk
> + float *src, *dst;
> + size_t fs;
> + unsigned n;
> ++ size_t memblockq_length;
> + //int ret;
> + pa_memchunk tchunk;
> + //pa_memchunk vchunk;
> +@@ -1740,15 +1751,15 @@ static int sink_input_pop_cb(pa_sink_input *i, size_t nbytes, pa_memchunk *chunk
> + pa_sink_process_rewind(u->sink, 0);
> + #endif
> +
> +-#if 1
> +- if(pa_memblockq_peek(u->sink_memblockq, chunk) < 0)
> +- return -1;
> ++ memblockq_length= pa_memblockq_get_length(u->sink_memblockq);
> ++ pa_log_info("pop sink memq current length: %lu",memblockq_length);
> +
> +-// chunk->length = PA_MIN(nbytes, chunk->length);
> +-// pa_assert(chunk->length > 0);
> +
> +- pa_memblockq_drop(u->sink_memblockq, chunk->length);
> +-#endif
> ++ if (!memblockq_length || !util_memblockq_to_chunk(u->core->mempool, u->sink_memblockq, chunk, PA_MIN(nbytes,memblockq_length))){
> ++ pa_log_info("Generating silence pop_cb");
> ++ return -1;
> ++ }
> ++
> +
> + #if 0
> + while (pa_memblockq_peek(u->sink_memblockq, &tchunk) < 0) {
> +@@ -2548,6 +2559,10 @@ void pa__done(pa_module*m) {
> + if (!(u = m->userdata))
> + return;
> +
> ++ if (u->sink_rtpoll_item)
> ++ pa_rtpoll_item_free(u->sink_rtpoll_item);
> ++ if (u->source_rtpoll_item)
> ++ pa_rtpoll_item_free(u->source_rtpoll_item);
> +
> + if (u->sink_input)
> + pa_sink_input_unlink(u->sink_input);
> +@@ -2572,10 +2587,6 @@ void pa__done(pa_module*m) {
> + pa_resampler_free(u->resampler_16kto8k);
> + if (u->memchunk.memblock)
> + pa_memblock_unref(u->memchunk.memblock);
> +- if (u->sink_rtpoll_item)
> +- pa_rtpoll_item_free(u->sink_rtpoll_item);
> +- if (u->source_rtpoll_item)
> +- pa_rtpoll_item_free(u->source_rtpoll_item);
> + if (u->out_mmap_memblocks) {
> + unsigned i;
> + for (i = 0; i < u->out_nfrags; i++)
> +--
> +1.7.2.3
> +
>
> ++++++ 0008-Remove-UMG-contributions-to-config-files.patch (new)
> --- 0008-Remove-UMG-contributions-to-config-files.patch
> +++ 0008-Remove-UMG-contributions-to-config-files.patch
> +From b9e0376df0d42e5984e0b6066bfa0485d82dfa0b Mon Sep 17 00:00:00 2001
> +From: Sylvain Pichon <sylvainx.pichon at intel.com>
> +Date: Mon, 18 Oct 2010 15:52:21 +0200
> +Subject: [PATCH 08/10] Remove UMG contributions to config files
> +
> +Config for module-voice may not be delivered as
> +default configuration
> +
> +Signed-off-by: Sylvain Pichon <sylvainx.pichon at intel.com>
> +---
> + src/daemon/default.pa.in | 115 +++++++++++++++++++++++++++++++++++++++++-----
> + 1 files changed, 103 insertions(+), 12 deletions(-)
> +
> +diff --git a/src/daemon/default.pa.in b/src/daemon/default.pa.in
> +index 3adcb21..00c000e 100755
> +--- a/src/daemon/default.pa.in
> ++++ b/src/daemon/default.pa.in
> +@@ -19,6 +19,14 @@
> + # This startup script is used only if PulseAudio is started per-user
> + # (i.e. not in system mode)
> +
> ++.nofail
> ++
> ++### Load something into the sample cache
> ++#load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
> ++#load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
> ++#load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav
> ++#load-sample-lazy pulse-access /usr/share/sounds/generic.wav
> ++
> + .fail
> +
> + ### Automatically restore the volume of streams and devices
> +@@ -26,21 +34,104 @@ load-module module-device-restore
> + load-module module-stream-restore
> + load-module module-card-restore
> +
> ++### Automatically augment property information from .desktop files
> ++### stored in /usr/share/application
> ++load-module module-augment-properties
> ++
> ++### Load audio drivers statically (it's probably better to not load
> ++### these drivers manually, but instead use module-hal-detect --
> ++### see below -- for doing this automatically)
> ++#load-module module-alsa-sink
> ++#load-module module-alsa-source device=hw:1,0
> ++#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
> ++#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
> ++#load-module module-null-sink
> ++#load-module module-pipe-sink
> ++
> ++### Automatically load driver modules depending on the hardware available
> ++.ifexists module-udev-detect at PA_SOEXT@
> ++load-module module-udev-detect
> ++.else
> ++### Alternatively use the static hardware detection module (for systems that
> ++### lack udev support)
> ++load-module module-detect
> ++.endif
> ++
> ++### Automatically load driver modules for Bluetooth hardware
> ++.ifexists module-bluetooth-discover at PA_SOEXT@
> ++load-module module-bluetooth-discover
> ++.endif
> ++
> ++### Load several protocols
> ++.ifexists module-esound-protocol-unix at PA_SOEXT@
> ++load-module module-esound-protocol-unix
> ++.endif
> + load-module module-native-protocol-unix
> +
> +-### Automatically suspend sinks/sources that become idle for too long
> +-#load-module module-suspend-on-idle
> ++### Network access (may be configured with paprefs, so leave this commented
> ++### here if you plan to use paprefs)
> ++#load-module module-esound-protocol-tcp
> ++#load-module module-native-protocol-tcp
> ++#load-module module-zeroconf-publish
> ++
> ++### Load the RTP reciever module (also configured via paprefs, see above)
> ++#load-module module-rtp-recv
> ++
> ++### Load the RTP sender module (also configured via paprefs, see above)
> ++#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 description="RTP Multicast Sink"
> ++#load-module module-rtp-send source=rtp.monitor
> ++
> ++### Load additional modules from GConf settings. This can be configured with the paprefs tool.
> ++### Please keep in mind that the modules configured by paprefs might conflict with manually
> ++### loaded modules.
> ++.ifexists module-gconf at PA_SOEXT@
> ++.nofail
> ++load-module module-gconf
> ++.fail
> ++.endif
> ++
> ++### Automatically restore the default sink/source when changed by the user during runtime
> ++load-module module-default-device-restore
> +
> + ### Automatically move streams to the default sink if the sink they are
> + ### connected to dies, similar for sources
> + load-module module-rescue-streams
> +-#load-module module-hal-detect tsched=0
> +-#load-module module-bluetooth-discover
> +-
> +-load-module module-suspend-on-idle timeout=0
> +-load-module module-alsa-sink device=hw:0,0 sink_name=hs_sink channels=2 tsched=0
> +-load-module module-alsa-source device=hw:0,0 source_name=hs_source tsched=0
> +-load-module module-alsa-sink device=hw:0,1 sink_name=ihf_sink channels=2 tsched=0
> +-load-module module-alsa-sink device=hw:0,2 sink_name=vib1_sink channels=1 tsched=0
> +-load-module module-alsa-sink device=hw:0,3 sink_name=vib2_sink channels=1 tsched=0
> +-#load-module module-voice sink_name=Voicesink source_name=Voicesource device=/dev/cmt_speech channels=1 transmit=TRUE receive=TRUE fragments=4 fragment_size=320 mmap=TRUE
> +\ No newline at end of file
> ++
> ++### Make sure we always have a sink around, even if it is a null sink.
> ++load-module module-always-sink
> ++
> ++### Honour intended role device property
> ++load-module module-intended-roles
> ++
> ++### Automatically suspend sinks/sources that become idle for too long
> ++load-module module-suspend-on-idle
> ++
> ++### If autoexit on idle is enabled we want to make sure we only quit
> ++### when no local session needs us anymore.
> ++load-module module-console-kit
> ++
> ++### Enable positioned event sounds
> ++load-module module-position-event-sounds
> ++
> ++### Cork music streams when a phone stream is active
> ++load-module module-cork-music-on-phone
> ++
> ++# X11 modules should not be started from default.pa so that one daemon
> ++# can be shared by multiple sessions.
> ++
> ++### Load X11 bell module
> ++#load-module module-x11-bell sample=bell-windowing-system
> ++
> ++### Register ourselves in the X11 session manager
> ++#load-module module-x11-xsmp
> ++
> ++### Publish connection data in the X11 root window
> ++#.ifexists module-x11-publish at PA_SOEXT@
> ++#.nofail
> ++#load-module module-x11-publish
> ++#.fail
> ++#.endif
> ++
> ++### Make some devices default
> ++#set-default-sink output
> ++#set-default-source input
> +--
> +1.7.2.3
> +
>
> ++++++ 0009-Align-cs-protocol.h-with-cmt_speech-driver.patch (new)
> --- 0009-Align-cs-protocol.h-with-cmt_speech-driver.patch
> +++ 0009-Align-cs-protocol.h-with-cmt_speech-driver.patch
> +From 39d8c617e8021d4690f520997ea4acb127f4de18 Mon Sep 17 00:00:00 2001
> +From: Mael Pouessel <mael.pouessel at intel.com>
> +Date: Fri, 29 Oct 2010 20:50:53 +0200
> +Subject: [PATCH 09/10] Align cs-protocol.h with cmt_speech driver
> +
> +Signed-off-by: Mael Pouessel <mael.pouessel at intel.com>
> +---
> + src/modules/cs-protocol.h | 132 ++++++++++++++++++++------------------------
> + 1 files changed, 60 insertions(+), 72 deletions(-)
> +
> +diff --git a/src/modules/cs-protocol.h b/src/modules/cs-protocol.h
> +index 922e4a2..926889b 100755
> +--- a/src/modules/cs-protocol.h
> ++++ b/src/modules/cs-protocol.h
> +@@ -1,9 +1,10 @@
> + /*
> +- * cs-protocol.h
> ++ * include/linux/cs-protocol.h - cmt_speech interface definitions
> + *
> +- * Part of the CMT speech driver. Protocol definitions.
> ++ * Implemented by:
> ++ * - drivers/misc/cmt-speech/
> + *
> +- * Copyright (C) 2008,2009 Nokia Corporation. All rights reserved.
> ++ * Copyright (C) 2008,2009,2010 Nokia Corporation. All rights reserved.
> + *
> + * Contact: Kai Vehmanen <kai.vehmanen at nokia.com>
> + * Original author: Peter Ujfalusi <peter.ujfalusi at nokia.com>
> +@@ -23,107 +24,94 @@
> + * 02110-1301 USA
> + */
> +
> +-
> + #ifndef _CS_PROTOCOL_H
> + #define _CS_PROTOCOL_H
> +
> + #include <linux/types.h>
> + #include <linux/ioctl.h>
> +
> +-/* chardev parameters
> +- * ***********************************/
> +-
> +-#define CS_DEV_FILE_NAME "/dev/cmt_speech"
> ++/* chardev parameters */
> ++#define CS_DEV_FILE_NAME "/dev/cmt_speech"
> +
> +-/* APE kernel <-> user space messages
> +- * ***********************************/
> ++/* user-space API versioning */
> ++#define CS_IF_VERSION 2
> +
> ++/* APE kernel <-> user space messages */
> + #define CS_CMD_SHIFT 28
> + #define CS_DOMAIN_SHIFT 24
> +
> +-#define CS_CMD_MASK (0xff000000)
> +-#define CS_PARAM_MASK (0x00ffffff)
> ++#define CS_CMD_MASK 0xff000000
> ++#define CS_PARAM_MASK 0xffffff
> ++
> ++#define CS_CMD(id, dom) \
> ++ (((id) << CS_CMD_SHIFT) | ((dom) << CS_DOMAIN_SHIFT))
> +
> +-#define CS_CDSP_RESET_DONE (0x1<<CS_CMD_SHIFT|0x0<<CS_DOMAIN_SHIFT)
> +-#define CS_RX_DATA_RECEIVED (0x2<<CS_CMD_SHIFT|0x0<<CS_DOMAIN_SHIFT)
> +-#define CS_TX_DATA_READY (0x3<<CS_CMD_SHIFT|0x0<<CS_DOMAIN_SHIFT)
> +-#define CS_TX_DATA_SENT (0x4<<CS_CMD_SHIFT|0x0<<CS_DOMAIN_SHIFT)
> ++#define CS_ERROR CS_CMD(1, 0)
> ++#define CS_RX_DATA_RECEIVED CS_CMD(2, 0)
> ++#define CS_TX_DATA_READY CS_CMD(3, 0)
> ++#define CS_TX_DATA_SENT CS_CMD(4, 0)
> +
> +-/* ioctl interface
> +- * ***************/
> ++/* params to CS_ERROR indication */
> ++#define CS_ERR_PEER_RESET 0
> +
> +-/* parameters to CS_CONFIG_BUGS ioctl */
> +-#define CS_FEAT_TSTAMP_RX_CTRL (1 << 0)
> +-#define CS_FEAT_BURST_MODE (1 << 1)
> ++/* ioctl interface */
> ++
> ++/* parameters to CS_CONFIG_BUFS ioctl */
> ++#define CS_FEAT_TSTAMP_RX_CTRL (1 << 0)
> ++#define CS_FEAT_ROLLING_RX_COUNTER (1 << 1)
> ++#define CS_FEAT_BURST_MODE (1 << 2)
> +
> + /* parameters to CS_GET_STATE ioctl */
> +-#define CS_STATE_CLOSED 0
> +-#define CS_STATE_OPENED 1 /* resource allocated */
> +-#define CS_STATE_CONFIGURED 2 /* data path active*/
> ++#define CS_STATE_CLOSED 0
> ++#define CS_STATE_OPENED 1 /* resource allocated */
> ++#define CS_STATE_CONFIGURED 2 /* data path active */
> +
> +-#define CS_MAX_BUFFERS 16 /* maximum number of TX/RX buffers */
> ++/* maximum number of TX/RX buffers */
> ++#define CS_MAX_BUFFERS_SHIFT 4
> ++#define CS_MAX_BUFFERS (1 << CS_MAX_BUFFERS_SHIFT)
> +
> +-/*
> +- * Parameters for setting up the data buffers
> +- */
> ++/* Parameters for setting up the data buffers */
> + struct cs_buffer_config {
> +- __u32 rx_bufs; /* number of RX buffer slots */
> +- __u32 tx_bufs; /* number of TX buffer slots */
> +- __u32 buf_size; /* bytes */
> +- __u32 flags; /* see CS_FEAT_* */
> ++ __u32 rx_bufs; /* number of RX buffer slots */
> ++ __u32 tx_bufs; /* number of TX buffer slots */
> ++ __u32 buf_size; /* bytes */
> ++ __u32 flags; /* see CS_FEAT_* */
> + __u32 reserved[4];
> + };
> +
> + /*
> +- * Struct describing the layout and contents of
> +- * the driver mmap area. This information is meant
> +- * as read-only information for the application.
> ++ * Struct describing the layout and contents of the driver mmap area.
> ++ * This information is meant as read-only information for the application.
> + */
> + struct cs_mmap_config_block {
> +- __u16 version; /* 8bit major, 8bit minor */
> +- __u16 reserved1;
> +- __u32 buf_size; /* 0=disabled, otherwise the transfer size */
> +- __u32 rx_bufs; /* # of RX buffers */
> +- __u32 tx_bufs; /* # of TX buffers */
> ++ __u32 reserved1;
> ++ __u32 buf_size; /* 0=disabled, otherwise the transfer size */
> ++ __u32 rx_bufs; /* # of RX buffers */
> ++ __u32 tx_bufs; /* # of TX buffers */
> + __u32 reserved2;
> +- /* array of offsets within the mmap area for
> +- * each RX and TX buffer */
> ++ /* array of offsets within the mmap area for each RX and TX buffer */
> + __u32 rx_offsets[CS_MAX_BUFFERS];
> + __u32 tx_offsets[CS_MAX_BUFFERS];
> +- __u32 reserved3[4];
> +- /* if enabled with CS_FEAT_TSTAMP_RX_CTRL, monotonic
> +- * timestamp taken when the last control command was
> +- * received */
> ++ __u32 rx_ptr;
> ++ __u32 rx_ptr_boundary;
> ++ __u32 reserved3[2];
> ++ /*
> ++ * if enabled with CS_FEAT_TSTAMP_RX_CTRL, monotonic
> ++ * timestamp taken when the last control command was received
> ++ */
> + struct timespec tstamp_rx_ctrl;
> + };
> +
> +-#define CS_IO_MAGIC 'C'
> ++#define CS_IO_MAGIC 'C'
> +
> +-#define CS_IOW(num, dtype) _IOW(CS_IO_MAGIC, num, dtype)
> +-#define CS_IOR(num, dtype) _IOR(CS_IO_MAGIC, num, dtype)
> +-#define CS_IOWR(num, dtype) _IOWR(CS_IO_MAGIC, num, dtype)
> +-#define CS_IO(num) _IO(CS_IO_MAGIC, num)
> ++#define CS_IOW(num, dtype) _IOW(CS_IO_MAGIC, num, dtype)
> ++#define CS_IOR(num, dtype) _IOR(CS_IO_MAGIC, num, dtype)
> ++#define CS_IOWR(num, dtype) _IOWR(CS_IO_MAGIC, num, dtype)
> ++#define CS_IO(num) _IO(CS_IO_MAGIC, num)
> +
> +-#define CS_GET_STATE CS_IOR(21, unsigned int)
> +-#define CS_CONFIG CS_IOW(22, struct cs_config)
> +-#define CS_SET_WAKELINE CS_IOW(23, unsigned int)
> +-#define CS_CONFIG_BUFS CS_IOW(31, struct cs_buffer_config)
> +-
> +-/* ioctl arguments (deprecated commands)
> +- * *************************************/
> +-
> +-/** Deprecated V0.1.x interface (CS_CONFIG ioctl) */
> +-struct cs_config {
> +- unsigned long tstamp_offset; /* valid, if:
> +- if (~timestamp_offset){} is true*/
> +-
> +- unsigned long dl_data_start_offset; /* offset from mmap base */
> +- unsigned int dl_slots; /* number of dl slots */
> +-
> +- unsigned long ul_data_start_offset; /* offset from mmap base */
> +- unsigned int ul_slots; /* number of ul slots */
> +-
> +- unsigned int slot_size; /* bytes */
> +-};
> ++#define CS_GET_STATE CS_IOR(21, unsigned int)
> ++#define CS_SET_WAKELINE CS_IOW(23, unsigned int)
> ++#define CS_GET_IF_VERSION CS_IOR(30, unsigned int)
> ++#define CS_CONFIG_BUFS CS_IOW(31, struct cs_buffer_config)
> +
> + #endif /* _CS_PROTOCOL_H */
> +--
> +1.7.2.3
> +
>
> ++++++ 0010-Add-Pulseaudio-configuration-files-for-Medfield-EB-h.patch (new)
> --- 0010-Add-Pulseaudio-configuration-files-for-Medfield-EB-h.patch
> +++ 0010-Add-Pulseaudio-configuration-files-for-Medfield-EB-h.patch
> +From 8bd8d5bfa4d4514ba3ffb3d1cef2cb003994a694 Mon Sep 17 00:00:00 2001
> +From: Mael Pouessel <mael.pouessel at intel.com>
> +Date: Fri, 29 Oct 2010 22:33:20 +0200
> +Subject: [PATCH 10/10] Add Pulseaudio configuration files for Medfield EB handset hardware
> +
> +Signed-off-by: Mael Pouessel <mael.pouessel at intel.com>
> +---
> + src/daemon/daemon.conf.in | 13 +++--
> + src/daemon/default.pa.in | 115 +++++----------------------------------------
> + 2 files changed, 19 insertions(+), 109 deletions(-)
> +
> +diff --git a/src/daemon/daemon.conf.in b/src/daemon/daemon.conf.in
> +index 3af68b0..9f868f9 100644
> +--- a/src/daemon/daemon.conf.in
> ++++ b/src/daemon/daemon.conf.in
> +@@ -36,7 +36,8 @@
> + ; realtime-scheduling = yes
> + ; realtime-priority = 5
> +
> +-; exit-idle-time = 20
> ++exit-idle-time = -1
> ++; module-idle-time = 20
> + ; scache-idle-time = 20
> +
> + ; dl-search-path = (depends on architecture)
> +@@ -72,10 +73,10 @@
> + ; rlimit-rtprio = 9
> + ; rlimit-rttime = 1000000
> +
> +-; default-sample-format = s16le
> +-; default-sample-rate = 44100
> +-; default-sample-channels = 2
> ++default-sample-format = s24-32le
> ++default-sample-rate = 48000
> ++default-sample-channels = 2
> + ; default-channel-map = front-left,front-right
> +
> +-; default-fragments = 4
> +-; default-fragment-size-msec = 25
> ++default-fragments = 4
> ++default-fragment-size-msec = 20
> +diff --git a/src/daemon/default.pa.in b/src/daemon/default.pa.in
> +index 00c000e..2419495 100755
> +--- a/src/daemon/default.pa.in
> ++++ b/src/daemon/default.pa.in
> +@@ -19,14 +19,6 @@
> + # This startup script is used only if PulseAudio is started per-user
> + # (i.e. not in system mode)
> +
> +-.nofail
> +-
> +-### Load something into the sample cache
> +-#load-sample-lazy x11-bell /usr/share/sounds/gtk-events/activate.wav
> +-#load-sample-lazy pulse-hotplug /usr/share/sounds/startup3.wav
> +-#load-sample-lazy pulse-coldplug /usr/share/sounds/startup3.wav
> +-#load-sample-lazy pulse-access /usr/share/sounds/generic.wav
> +-
> + .fail
> +
> + ### Automatically restore the volume of streams and devices
> +@@ -34,104 +26,21 @@ load-module module-device-restore
> + load-module module-stream-restore
> + load-module module-card-restore
> +
> +-### Automatically augment property information from .desktop files
> +-### stored in /usr/share/application
> +-load-module module-augment-properties
> +-
> +-### Load audio drivers statically (it's probably better to not load
> +-### these drivers manually, but instead use module-hal-detect --
> +-### see below -- for doing this automatically)
> +-#load-module module-alsa-sink
> +-#load-module module-alsa-source device=hw:1,0
> +-#load-module module-oss device="/dev/dsp" sink_name=output source_name=input
> +-#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
> +-#load-module module-null-sink
> +-#load-module module-pipe-sink
> +-
> +-### Automatically load driver modules depending on the hardware available
> +-.ifexists module-udev-detect at PA_SOEXT@
> +-load-module module-udev-detect
> +-.else
> +-### Alternatively use the static hardware detection module (for systems that
> +-### lack udev support)
> +-load-module module-detect
> +-.endif
> +-
> +-### Automatically load driver modules for Bluetooth hardware
> +-.ifexists module-bluetooth-discover at PA_SOEXT@
> +-load-module module-bluetooth-discover
> +-.endif
> +-
> +-### Load several protocols
> +-.ifexists module-esound-protocol-unix at PA_SOEXT@
> +-load-module module-esound-protocol-unix
> +-.endif
> + load-module module-native-protocol-unix
> +
> +-### Network access (may be configured with paprefs, so leave this commented
> +-### here if you plan to use paprefs)
> +-#load-module module-esound-protocol-tcp
> +-#load-module module-native-protocol-tcp
> +-#load-module module-zeroconf-publish
> +-
> +-### Load the RTP reciever module (also configured via paprefs, see above)
> +-#load-module module-rtp-recv
> +-
> +-### Load the RTP sender module (also configured via paprefs, see above)
> +-#load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 description="RTP Multicast Sink"
> +-#load-module module-rtp-send source=rtp.monitor
> +-
> +-### Load additional modules from GConf settings. This can be configured with the paprefs tool.
> +-### Please keep in mind that the modules configured by paprefs might conflict with manually
> +-### loaded modules.
> +-.ifexists module-gconf at PA_SOEXT@
> +-.nofail
> +-load-module module-gconf
> +-.fail
> +-.endif
> +-
> +-### Automatically restore the default sink/source when changed by the user during runtime
> +-load-module module-default-device-restore
> ++### Automatically suspend sinks/sources that become idle for too long
> ++#load-module module-suspend-on-idle
> +
> + ### Automatically move streams to the default sink if the sink they are
> + ### connected to dies, similar for sources
> + load-module module-rescue-streams
> +-
> +-### Make sure we always have a sink around, even if it is a null sink.
> +-load-module module-always-sink
> +-
> +-### Honour intended role device property
> +-load-module module-intended-roles
> +-
> +-### Automatically suspend sinks/sources that become idle for too long
> +-load-module module-suspend-on-idle
> +-
> +-### If autoexit on idle is enabled we want to make sure we only quit
> +-### when no local session needs us anymore.
> +-load-module module-console-kit
> +-
> +-### Enable positioned event sounds
> +-load-module module-position-event-sounds
> +-
> +-### Cork music streams when a phone stream is active
> +-load-module module-cork-music-on-phone
> +-
> +-# X11 modules should not be started from default.pa so that one daemon
> +-# can be shared by multiple sessions.
> +-
> +-### Load X11 bell module
> +-#load-module module-x11-bell sample=bell-windowing-system
> +-
> +-### Register ourselves in the X11 session manager
> +-#load-module module-x11-xsmp
> +-
> +-### Publish connection data in the X11 root window
> +-#.ifexists module-x11-publish at PA_SOEXT@
> +-#.nofail
> +-#load-module module-x11-publish
> +-#.fail
> +-#.endif
> +-
> +-### Make some devices default
> +-#set-default-sink output
> +-#set-default-source input
> ++#load-module module-hal-detect tsched=0
> ++#load-module module-bluetooth-discover
> ++
> ++load-module module-suspend-on-idle timeout=0
> ++load-module module-alsa-sink device=hw:0,0 sink_name=hs_sink channels=2 tsched=0
> ++load-module module-alsa-source device=hw:0,0 source_name=hs_source tsched=0
> ++load-module module-alsa-sink device=hw:0,1 sink_name=ihf_sink channels=2 tsched=0
> ++load-module module-alsa-sink device=hw:0,2 sink_name=vib1_sink channels=1 tsched=0
> ++load-module module-alsa-sink device=hw:0,3 sink_name=vib2_sink channels=1 tsched=0
> ++#load-module module-voice sink_name=Voicesink source_name=Voicesource device=/dev/cmt_speech channels=1 channel_map=mono transmit=TRUE receive=TRUE rate=16000 fragments=2 fragment_size=640 mmap=TRUE
> +--
> +1.7.2.3
> +
>
> ++++++ daemon_mfld.conf (new)
> --- daemon_mfld.conf
> +++ daemon_mfld.conf
> +# This file is part of PulseAudio.
> +#
> +# 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 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.
> +
> +## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for
> +## more information. Default values a commented out. Use either ; or # for
> +## commenting.
> +
> +; daemonize = no
> +; fail = yes
> +; allow-module-loading = yes
> +; allow-exit = yes
> +; use-pid-file = yes
> +; system-instance = no
> +; enable-shm = yes
> +; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
> +; lock-memory = no
> +; cpu-limit = no
> +
> +; high-priority = yes
> +; nice-level = -11
> +
> +; realtime-scheduling = yes
> +; realtime-priority = 5
> +
> +exit-idle-time = -1
> +; module-idle-time = 20
> +; scache-idle-time = 20
> +
> +; dl-search-path = (depends on architecture)
> +
> +; load-default-script-file = yes
> +; default-script-file = @PA_DEFAULT_CONFIG_FILE@
> +
> +; log-target = auto
> +; log-level = notice
> +; log-meta = no
> +; log-time = no
> +; log-backtrace = 0
> +
> +; resample-method = speex-float-3
> +; enable-remixing = yes
> +; enable-lfe-remixing = no
> +
> +; flat-volumes = yes
> +
> +; rlimit-fsize = -1
> +; rlimit-data = -1
> +; rlimit-stack = -1
> +; rlimit-core = -1
> +; rlimit-as = -1
> +; rlimit-rss = -1
> +; rlimit-nproc = -1
> +; rlimit-nofile = 256
> +; rlimit-memlock = -1
> +; rlimit-locks = -1
> +; rlimit-sigpending = -1
> +; rlimit-msgqueue = -1
> +; rlimit-nice = 31
> +; rlimit-rtprio = 9
> +; rlimit-rttime = 1000000
> +
> +default-sample-format = s24-32le
> +default-sample-rate = 48000
> +default-sample-channels = 2
> +; default-channel-map = front-left,front-right
> +
> +default-fragments = 4
> +default-fragment-size-msec = 20
>
> ++++++ default_mfld.pa (new)
> --- default_mfld.pa
> +++ default_mfld.pa
> +#!@PA_BINARY@ -nF
> +#
> +# This file is part of PulseAudio.
> +#
> +# 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 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 startup script is used only if PulseAudio is started per-user
> +# (i.e. not in system mode)
> +
> +.fail
> +
> +### Automatically restore the volume of streams and devices
> +load-module module-device-restore
> +load-module module-stream-restore
> +load-module module-card-restore
> +
> +load-module module-native-protocol-unix
> +
> +### Automatically suspend sinks/sources that become idle for too long
> +#load-module module-suspend-on-idle
> +
> +### Automatically move streams to the default sink if the sink they are
> +### connected to dies, similar for sources
> +load-module module-rescue-streams
> +#load-module module-hal-detect tsched=0
> +#load-module module-bluetooth-discover
> +
> +load-module module-suspend-on-idle timeout=0
> +load-module module-alsa-sink device=hw:0,0 sink_name=hs_sink channels=2 tsched=0
> +load-module module-alsa-source device=hw:0,0 source_name=hs_source tsched=0
> +load-module module-alsa-sink device=hw:0,1 sink_name=ihf_sink channels=2 tsched=0
> +load-module module-alsa-sink device=hw:0,2 sink_name=vib1_sink channels=1 tsched=0
> +load-module module-alsa-sink device=hw:0,3 sink_name=vib2_sink channels=1 tsched=0
> +#load-module module-voice sink_name=Voicesink source_name=Voicesource device=/dev/cmt_speech channels=1 channel_map=mono transmit=TRUE receive=TRUE rate=16000 fragments=2 fragment_size=640 mmap=TRUE
>
> ++++++ pa-0.9.21-desktopfile.patch (new)
> --- pa-0.9.21-desktopfile.patch
> +++ pa-0.9.21-desktopfile.patch
> +diff -Nur pulseaudio-0.9.21/src/daemon/pulseaudio.desktop.in pulseaudio-0.9.21-new/src/daemon/pulseaudio.desktop.in
> +--- pulseaudio-0.9.21/src/daemon/pulseaudio.desktop.in 2009-02-24 05:38:36.000000000 -0500
> ++++ pulseaudio-0.9.21-new/src/daemon/pulseaudio.desktop.in 2010-11-01 21:52:05.916170820 -0400
> +@@ -3,7 +3,7 @@
> + Encoding=UTF-8
> + _Name=PulseAudio Sound System
> + _Comment=Start the PulseAudio Sound System
> +-Exec=start-pulseaudio-x11
> ++Exec=start-pulseaudio
> + Terminal=false
> + Type=Application
> + Categories=
>
> ++++++ pulseaudio.yaml
> --- pulseaudio.yaml
> +++ pulseaudio.yaml
> @@ -11,6 +11,9 @@
> - default.pa
> - daemon.conf
> - 90-pulse.conf
> + - start-pulseaudio
> + - default_mfld.pa
> + - daemon_mfld.conf
> Patches:
> - pa-0.9.14-helper-assert.patch
> - pa-0.9.18-export-headfile-for-modules.patch
> @@ -24,6 +27,17 @@
> - call-state-tracker.patch
> - flat-sink-branch.patch
> - 0027-build-add-pulsecore.pc-Nokia-specific.patch
> + - pa-0.9.21-desktopfile.patch
> + - 0001-audio-voice-call-enabled-HSD-3669129.patch
> + - 0002-HSD3576159-Don-t-cork-the-cs-voice-sink-input-and-cs.patch
> + - 0003-HSD3667148-Add-POLLOUT-event-support-from-modem-even.patch
> + - 0004-HSD3669166-Pulseaudio-Add-Burst-mode-support.patch
> + - 0005-HSD-3576250-Pulseaudio-uplink-delayed.patch
> + - 0006-Pulseaudio-CS-Voice-Call-Add-WB-AMR-support.-Add-SRC.patch
> + - 0007-Pulseaudio-Voice-module-Fix-sink-memblockq-corruptio.patch
> + - 0008-Remove-UMG-contributions-to-config-files.patch
> + - 0009-Align-cs-protocol.h-with-cmt_speech-driver.patch
> + - 0010-Add-Pulseaudio-configuration-files-for-Medfield-EB-h.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
> @@ -74,9 +88,19 @@
> - --with-database=simple
> - --disable-avahi
> SubPackages:
> + - Name: startup
> + Summary: PulseAudio desktop file and startup script
> + Group: System/Desktop
> +
> + - Name: settings-mfld
> + Summary: PulseAudio config files for medfield platform
> + Group: Applications/System
> +
> - Name: module-x11
> Summary: PulseAudio components needed for starting x11 User session
> Group: System/Libraries
> + Requires:
> + - pulseaudio-startup
>
> - Name: devel
> Summary: PulseAudio Development headers and libraries
>
> ++++++ start-pulseaudio (new)
> --- start-pulseaudio
> +++ start-pulseaudio
> +#!/bin/sh
> +
> +# This file is part of PulseAudio.
> +#
> +# 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 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.
> +
> +if [ -x /usr/bin/start-pulseaudio-x11 ] ; then
> + /usr/bin/start-pulseaudio-x11
> +else
> + set -e
> + [ -z "$PULSE_SERVER" ]
> + /usr/bin/pulseaudio --start "$@"
> +fi
>
> _______________________________________________
> MeeGo-commits mailing list
> MeeGo-commits at meego.com
> http://lists.meego.com/listinfo/meego-commits
>
More information about the MeeGo-packaging
mailing list