Hello community,
here is the log from the commit of package pulseaudio.2276 for openSUSE:13.1:Update checked in at 2013-12-02 12:02:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.1:Update/pulseaudio.2276 (Old)
and /work/SRC/openSUSE:13.1:Update/.pulseaudio.2276.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pulseaudio.2276"
Changes:
--------
New Changes file:
--- /dev/null 2013-11-25 01:44:08.036031256 +0100
+++ /work/SRC/openSUSE:13.1:Update/.pulseaudio.2276.new/pulseaudio.changes 2013-12-02 12:02:37.000000000 +0100
@@ -0,0 +1,998 @@
+-------------------------------------------------------------------
+Mon Nov 25 11:20:40 CET 2013 - tiwai(a)suse.de
+
+- pulseaudio-introspect-Fix-ABI-break.patch:
+ Fix the incompatible size of pa_card_profile_info that leads to
+ a crash of pavucontrol (bnc#851872)
+
+-------------------------------------------------------------------
+Fri Oct 18 17:49:24 UTC 2013 - dimstar(a)opensuse.org
+
+- Update to git master (PA 5.0) (4.0-270-g9490a):
+ + alsa: fix crash when loading bare alsa sink (bnc#846532).
+ + sndfile-util: fir format for 24bit depth wav files.
+ + bluetooth: track discovery modules by index.
+ + build system fixes.
+
+-------------------------------------------------------------------
+Sat Oct 5 23:37:59 UTC 2013 - dimstar(a)opensuse.org
+
+- Update to git mastere (PA 5.0 on the way) (265-g35fe):
+ + The more extensive bluez5 branch was merged
+ + PA allows to build bluez4 and bluez5 modules in parallel.
+ Note: this does not mean that bluez4 and bluez5 can co-exist,
+ only that PA can decide at runtime which bluez-daemon is
+ available.
+- Pass --disable-bluez4 to configure: we know that we run bluez5.
+
+-------------------------------------------------------------------
+Wed Sep 25 17:48:30 UTC 2013 - dimstar(a)opensuse.org
+
+- bnc#840845: Update to git master (PA 5.0 on the way) (6f94c).
+ + Various code cleanups for inclusion of bluez5 stack.
+- No longer pass --enable-bluez5 --disable-bluez4 to configure:
+ master only speaks bluez5.
+
+-------------------------------------------------------------------
+Wed Sep 11 10:34:33 CEST 2013 - mhrusecky(a)suse.cz
+
+- support for system wide mode (separate subpackage with service)
+
+-------------------------------------------------------------------
+Sat Sep 7 11:30:40 UTC 2013 - dimstar(a)opensuse.org
+
+- Update to git snapshot (rev: gbf9b3)/ bluez5 branch.
+ Note: this is not HEAD of the bluez5 branch, as in local tests,
+ this did fail to load the bluetooth modules.
+
+-------------------------------------------------------------------
+Wed Aug 21 09:38:49 UTC 2013 - dimstar(a)opensuse.org
+
+- Fix fdupes call on doxygen/html: use hardlinks instead of
+ softlinks (bnc#835683).
+
+-------------------------------------------------------------------
+Mon Jun 24 15:10:41 UTC 2013 - oholecek(a)suse.com
+
+- add SUSEfirewall service definition (bnc#607614)
+
+-------------------------------------------------------------------
+Thu Jun 13 13:45:08 UTC 2013 - oholecek(a)suse.com
+
+- require the same liborc version which was used to build against
+
+-------------------------------------------------------------------
+Mon Jun 3 20:55:20 UTC 2013 - oholecek(a)suse.com
+
+- update to pulseaudio 4.0
+* Better handling of low latency requests
+* Optimisations while mixing (generic, ARM NEON)
+* Default resampler is now speex-float-1 (lower CPU usage)
+* Major Bluetooth refactoring for better reliability and easier
+maintenance
+* Fixes for graceful hand-off to/from JACK
+* New module to apply ducking based on stream roles
+* Echo canceller infrastructure fixes
+* Bash and zsh completion for command line tools
+* Solaris and OS X fixes
+* Lots of other enhancements, bug fixes, and documenation and i18n
+updates-
+
+-------------------------------------------------------------------
+Thu Apr 25 14:52:14 UTC 2013 - dmueller(a)suse.com
+
+- explicitely disable building NEON for armv5/6
+
+-------------------------------------------------------------------
+Fri Mar 8 10:17:34 CET 2013 - tiwai(a)suse.de
+
+- Fix a bug setting speaker volume to zero wrongly (bnc#805865)
+
+-------------------------------------------------------------------
+Tue Mar 5 06:03:19 UTC 2013 - crrodriguez(a)opensuse.org
+
+- remove fno-strict-aliasing from CFLAGS
+- do not export SUSE_ASNEEDED=0, problem already fixed.
+
+-------------------------------------------------------------------
+Sun Jan 20 17:55:54 UTC 2013 - oholecek(a)suse.com
+
+- bluetooth module now requires Bluez > 4.99
+
+-------------------------------------------------------------------
+Mon Dec 31 18:09:24 UTC 2012 - crrodriguez(a)opensuse.org
+
+- Update to pulseaudio 3.0
+* ALSA Use Case Manager (UCM) support
+* Runtime editable LADSPA filter parameters
+* Out-of-the-box support for Bluetooth sources
+* Configurable device latency offset
+* Various ALSA changes
+* Lots of infrastructure improvements
+
+-------------------------------------------------------------------
+Tue Nov 27 15:23:42 CET 2012 - tiwai(a)suse.de
+
+- Add the audio setup for qemu/kvm to setup-pulseaudio script
+ (bnc#737070)
+
+-------------------------------------------------------------------
+Sat Nov 17 02:01:24 UTC 2012 - crrodriguez(a)opensuse.org
+
+- disable all HAL compat/support since it is long gone.
+
+-------------------------------------------------------------------
+Thu Nov 15 13:23:47 UTC 2012 - tittiatcoke(a)gmail.com
+
+- Enable systemd integration (following the distribution):
+ + Add systemd-devel BuildRequires.
+ + Pass --enable-systemd to configure.
+
+-------------------------------------------------------------------
+Sun Nov 4 00:58:52 UTC 2012 - crrodriguez(a)opensuse.org
+
+- Place udev rules in the proper place
+
+-------------------------------------------------------------------
+Tue Oct 16 12:12:54 UTC 2012 - coolo(a)suse.com
+
+- buildrequire systemd through pkgconfig provides to remove cycle
+
+-------------------------------------------------------------------
+Thu Sep 6 14:08:55 CEST 2012 - tiwai(a)suse.de
+
+- Fix the broken setup by setup-pulseaudio when alsa-plugins-pulse
+ doesn't exist (bnc#779039)
+
+-------------------------------------------------------------------
+Sat Jul 21 13:58:43 UTC 2012 - zaitor(a)opensuse.org
+
+- Update to version 2.1:
+ + Actually build libwebrtc-util.
+ + Various bugfixes.
+
+-------------------------------------------------------------------
+Mon Jun 18 15:50:43 CEST 2012 - tiwai(a)suse.de
+
+- Add kmix setup to setup-pulseaudio script
+
+-------------------------------------------------------------------
+Wed Jun 6 14:16:34 CEST 2012 - tiwai(a)suse.de
+
+- Add the proper exit codes to setup-pulseaudio script
+ (for avoiding the errors during installation, too)
+
+-------------------------------------------------------------------
+Mon Jun 4 08:37:07 UTC 2012 - idonmez(a)suse.com
+
+- Remove rpmlintrc, we can't use setBadness for Factory
+
+-------------------------------------------------------------------
+Wed May 30 09:49:36 CEST 2012 - tiwai(a)suse.de
+
+- Kill leftover PA processes when disabled via setup-pulseaudio
+- Set up gstreamer audiosink/src in setup-pulseaudio script, too
+
+-------------------------------------------------------------------
+Tue May 29 13:01:46 CEST 2012 - tiwai(a)suse.de
+
+- Add the setup for SoX to setup-pulseaudio script
+
+-------------------------------------------------------------------
+Sat May 19 20:45:28 UTC 2012 - pascal.bleser(a)opensuse.org
+
+- update to 2.0:
+ + Alternate sample rates.
+ + Jack detection.
+ + Echo cancellation: WebRTC canceller, automatic gain control,
+ drift compensation.
+ + Virtual Surround module.
+ + Xen Paravirtualised audio sink.
+ + Fixed HURD support.
+ + A2DP decoder quality improvements.
+- Add new BuildRequires: libwebrtc_audio_processing-devel,
+ BuildRequires: gcc-c++ and if SuSE-Release >= 12.1
+ BuildRequires: systemd-devel
+- Drop pulseaudio-remove_broken_assert.patch, fixed upstream.
+- Futureproof spec for soname changes.
++++ 801 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:13.1:Update/.pulseaudio.2276.new/pulseaudio.changes
New:
----
baselibs.conf
default.pa-for-gdm
disabled-start.diff
pulseaudio-4.0-270-g9490a.tar.xz
pulseaudio-introspect-Fix-ABI-break.patch
pulseaudio-server.fw
pulseaudio-wrong-memset.patch
pulseaudio.changes
pulseaudio.service
pulseaudio.spec
setup-pulseaudio
suppress-socket-error-msg.diff
sysconfig.sound-pulseaudio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ pulseaudio.spec ++++++
++++ 616 lines (skipped)
++++++ baselibs.conf ++++++
libpulse0
obsoletes "pulseaudio-libs-<targettype> <= <version>"
provides "pulseaudio-libs-<targettype> = <version>"
libpulse-mainloop-glib0
++++++ default.pa-for-gdm ++++++
load-module module-device-restore
load-module module-card-restore
load-module module-udev-detect
load-module module-native-protocol-unix
load-module module-default-device-restore
load-module module-rescue-streams
load-module module-always-sink
load-module module-intended-roles
load-module module-suspend-on-idle
load-module module-console-kit
load-module module-position-event-sounds
++++++ disabled-start.diff ++++++
Index: src/daemon/start-pulseaudio-x11.in
===================================================================
--- src/daemon/start-pulseaudio-x11.in.orig
+++ src/daemon/start-pulseaudio-x11.in
@@ -19,6 +19,12 @@
set -e
+. /etc/sysconfig/sound
+
+if [ x"$PULSEAUDIO_ENABLE" = x"no" ] || [ x"$PULSEAUDIO_SYSTEM" = x"yes" ] ; then
+ exit 1
+fi
+
@PA_BINARY@ --start "$@"
if [ x"$DISPLAY" != x ] ; then
Index: src/daemon/start-pulseaudio-kde.in
===================================================================
--- src/daemon/start-pulseaudio-kde.in.orig
+++ src/daemon/start-pulseaudio-kde.in
@@ -19,6 +19,12 @@
set -e
+. /etc/sysconfig/sound
+
+if [ x"$PULSEAUDIO_ENABLE" = x"no" ] || [ x"$PULSEAUDIO_SYSTEM" = x"yes" ]; then
+ exit 1
+fi
+
[ -z "$PULSE_SERVER" ]
@PA_BINARY@ --start "$@"
++++++ pulseaudio-introspect-Fix-ABI-break.patch ++++++
>From 85e7fbc196f4424f68e530c2e3a01d9b941f293e Mon Sep 17 00:00:00 2001
From: Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>
Date: Mon, 04 Nov 2013 17:41:22 +0000
Subject: introspect: Fix ABI break introduced by b98a2e1
The size of pa_card_profile_info cannot change even if it just a field
appended to end because each entry is appended to a contiguous memory
and accessed by offset this may lead clients to access invalid data.
To fix a new struct called pa_card_profile_info2 is introduced and shall
be used for now on while pa_card_profile_info shall be considered
deprecated but it is still mantained for backward compatibility.
A new field called profiles2 is introduced to pa_card_info, this new field
is an array of pointers to pa_card_profile_info2 so it should be possible
to append new fields to the end of the pa_card_profile_info2 without
breaking binary compatibility as the entries are not accessed by offset.
---
diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c
index 45e0115..2d54fdb 100644
--- a/src/pulse/introspect.c
+++ b/src/pulse/introspect.c
@@ -769,6 +769,15 @@ static void card_info_free(pa_card_info* i) {
pa_xfree(i->profiles);
+ if (i->n_profiles) {
+ uint32_t j;
+
+ for (j = 0; j < i->n_profiles; j++)
+ pa_xfree(i->profiles2[j]);
+
+ pa_xfree(i->profiles2);
+ }
+
if (i->ports) {
uint32_t j;
@@ -776,6 +785,8 @@ static void card_info_free(pa_card_info* i) {
if (i->ports[j]) {
if (i->ports[j]->profiles)
pa_xfree(i->ports[j]->profiles);
+ if (i->ports[j]->profiles2)
+ pa_xfree(i->ports[j]->profiles2);
if (i->ports[j]->proplist)
pa_proplist_free(i->ports[j]->proplist);
}
@@ -829,6 +840,7 @@ static int fill_card_port_info(pa_context *context, pa_tagstruct* t, pa_card_inf
if (port->n_profiles > 0) {
port->profiles = pa_xnew0(pa_card_profile_info*, i->n_profiles+1);
+ port->profiles2 = pa_xnew0(pa_card_profile_info2*, i->n_profiles+1);
for (k = 0; k < port->n_profiles; k++) {
const char* profilename;
@@ -839,6 +851,7 @@ static int fill_card_port_info(pa_context *context, pa_tagstruct* t, pa_card_inf
for (l = 0; l < i->n_profiles; l++) {
if (pa_streq(i->profiles[l].name, profilename)) {
port->profiles[k] = &i->profiles[l];
+ port->profiles2[k] = i->profiles2[l];
break;
}
}
@@ -857,6 +870,41 @@ static int fill_card_port_info(pa_context *context, pa_tagstruct* t, pa_card_inf
return 0;
}
+static int fill_card_profile_info(pa_context *context, pa_tagstruct* t, pa_card_info* i) {
+ uint32_t j;
+
+ i->profiles = pa_xnew0(pa_card_profile_info, i->n_profiles+1);
+ i->profiles2 = pa_xnew0(pa_card_profile_info2*, i->n_profiles+1);
+
+ for (j = 0; j < i->n_profiles; j++) {
+ if (pa_tagstruct_gets(t, &i->profiles[j].name) < 0 ||
+ pa_tagstruct_gets(t, &i->profiles[j].description) < 0 ||
+ pa_tagstruct_getu32(t, &i->profiles[j].n_sinks) < 0 ||
+ pa_tagstruct_getu32(t, &i->profiles[j].n_sources) < 0 ||
+ pa_tagstruct_getu32(t, &i->profiles[j].priority) < 0)
+ return -PA_ERR_PROTOCOL;
+
+ i->profiles2[j] = pa_xnew0(pa_card_profile_info2, 1);
+ i->profiles2[j]->name = i->profiles[j].name;
+ i->profiles2[j]->description = i->profiles[j].description;
+ i->profiles2[j]->n_sinks = i->profiles[j].n_sinks;
+ i->profiles2[j]->n_sources = i->profiles[j].n_sources;
+ i->profiles2[j]->priority = i->profiles[j].priority;
+ i->profiles2[j]->available = 1;
+
+ if (context->version >= 29) {
+ uint32_t av;
+
+ if (pa_tagstruct_getu32(t, &av) < 0)
+ return -PA_ERR_PROTOCOL;
+
+ i->profiles2[j]->available = av;
+ }
+ }
+
+ return 0;
+}
+
static void context_get_card_info_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
pa_operation *o = userdata;
int eol = 1;
@@ -890,29 +938,8 @@ static void context_get_card_info_callback(pa_pdispatch *pd, uint32_t command, u
goto fail;
if (i.n_profiles > 0) {
- i.profiles = pa_xnew0(pa_card_profile_info, i.n_profiles+1);
-
- for (j = 0; j < i.n_profiles; j++) {
-
- if (pa_tagstruct_gets(t, &i.profiles[j].name) < 0 ||
- pa_tagstruct_gets(t, &i.profiles[j].description) < 0 ||
- pa_tagstruct_getu32(t, &i.profiles[j].n_sinks) < 0 ||
- pa_tagstruct_getu32(t, &i.profiles[j].n_sources) < 0 ||
- pa_tagstruct_getu32(t, &i.profiles[j].priority) < 0)
- goto fail;
-
- i.profiles[j].available = 1;
- if (o->context->version >= 29) {
- uint32_t av;
- if (pa_tagstruct_getu32(t, &av) < 0)
- goto fail;
- i.profiles[j].available = av;
- }
- }
-
- /* Terminate with an extra NULL entry, just to make sure */
- i.profiles[j].name = NULL;
- i.profiles[j].description = NULL;
+ if (fill_card_profile_info(o->context, t, &i) < 0)
+ goto fail;
}
i.proplist = pa_proplist_new();
@@ -929,6 +956,7 @@ static void context_get_card_info_callback(pa_pdispatch *pd, uint32_t command, u
for (j = 0; j < i.n_profiles; j++)
if (pa_streq(i.profiles[j].name, ap)) {
i.active_profile = &i.profiles[j];
+ i.active_profile2 = i.profiles2[j];
break;
}
}
diff --git a/src/pulse/introspect.h b/src/pulse/introspect.h
index f199a18..023b418 100644
--- a/src/pulse/introspect.h
+++ b/src/pulse/introspect.h
@@ -443,22 +443,31 @@ pa_operation* pa_context_kill_client(pa_context *c, uint32_t idx, pa_context_suc
/** @{ \name Cards */
-/** Stores information about a specific profile of a card. Please
- * note that this structure can be extended as part of evolutionary
- * API updates at any time in any new release. \since 0.9.15 */
+/** \deprecated Superseded by pa_card_profile_info2 \since 0.9.15 */
typedef struct pa_card_profile_info {
const char *name; /**< Name of this profile */
const char *description; /**< Description of this profile */
uint32_t n_sinks; /**< Number of sinks this profile would create */
uint32_t n_sources; /**< Number of sources this profile would create */
uint32_t priority; /**< The higher this value is, the more useful this profile is as a default. */
+} pa_card_profile_info;
+
+/** Stores information about a specific profile of a card. Please
+ * note that this structure can be extended as part of evolutionary
+ * API updates at any time in any new release. \since 5.0 */
+typedef struct pa_card_profile_info2 {
+ const char *name; /**< Name of this profile */
+ const char *description; /**< Description of this profile */
+ uint32_t n_sinks; /**< Number of sinks this profile would create */
+ uint32_t n_sources; /**< Number of sources this profile would create */
+ uint32_t priority; /**< The higher this value is, the more useful this profile is as a default. */
int available;
/**< Is this profile available? If this is zero, meaning "unavailable",
* then it makes no sense to try to activate this profile. If this is
* non-zero, it's still not a guarantee that activating the profile will
* result in anything useful, it just means that the server isn't aware of
* any reason why the profile would definitely be useless. \since 5.0 */
-} pa_card_profile_info;
+} pa_card_profile_info2;
/** Stores information about a specific port of a card. Please
* note that this structure can be extended as part of evolutionary
@@ -470,9 +479,10 @@ typedef struct pa_card_port_info {
int available; /**< A #pa_port_available enum, indicating availability status of this port. */
int direction; /**< A #pa_direction enum, indicating the direction of this port. */
uint32_t n_profiles; /**< Number of entries in profile array */
- pa_card_profile_info** profiles; /**< Array of pointers to available profiles, or NULL. Array is terminated by an entry set to NULL. */
+ pa_card_profile_info** profiles; /**< \deprecated Superseded by profiles2 */
pa_proplist *proplist; /**< Property list */
int64_t latency_offset; /**< Latency offset of the port that gets added to the sink/source latency when the port is active. \since 3.0 */
+ pa_card_profile_info2** profiles2; /**< Array of pointers to available profiles, or NULL. Array is terminated by an entry set to NULL. */
} pa_card_port_info;
/** Stores information about cards. Please note that this structure
@@ -484,11 +494,13 @@ typedef struct pa_card_info {
uint32_t owner_module; /**< Index of the owning module, or PA_INVALID_INDEX. */
const char *driver; /**< Driver name */
uint32_t n_profiles; /**< Number of entries in profile array */
- pa_card_profile_info* profiles; /**< Array of available profile, or NULL. Array is terminated by an entry with name set to NULL. Number of entries is stored in n_profiles. */
- pa_card_profile_info* active_profile; /**< Pointer to active profile in the array, or NULL. */
+ pa_card_profile_info* profiles; /**< \deprecated Superseded by profiles2 */
+ pa_card_profile_info* active_profile; /**< \deprecated Superseded by active_profile2 */
pa_proplist *proplist; /**< Property list */
uint32_t n_ports; /**< Number of entries in port array */
pa_card_port_info **ports; /**< Array of pointers to ports, or NULL. Array is terminated by an entry set to NULL. */
+ pa_card_profile_info2** profiles2; /**< Array of pointers to available profiles, or NULL. Array is terminated by an entry set to NULL. */
+ pa_card_profile_info2* active_profile2; /**< Pointer to active profile in the array, or NULL. */
} pa_card_info;
/** Callback prototype for pa_context_get_card_info_...() \since 0.9.15 */
diff --git a/src/utils/pactl.c b/src/utils/pactl.c
index df47caa..40e6689 100644
--- a/src/utils/pactl.c
+++ b/src/utils/pactl.c
@@ -570,13 +570,13 @@ static void get_card_info_callback(pa_context *c, const pa_card_info *i, int is_
pa_xfree(pl);
- if (i->profiles) {
- pa_card_profile_info *p;
+ if (i->n_profiles > 0) {
+ pa_card_profile_info2 **p;
printf(_("\tProfiles:\n"));
- for (p = i->profiles; p->name; p++)
- printf("\t\t%s: %s (sinks: %u, sources: %u, priority: %u, available: %s)\n", p->name,
- p->description, p->n_sinks, p->n_sources, p->priority, pa_yes_no(p->available));
+ for (p = i->profiles2; *p; p++)
+ printf("\t\t%s: %s (sinks: %u, sources: %u, priority: %u, available: %s)\n", (*p)->name,
+ (*p)->description, (*p)->n_sinks, (*p)->n_sources, (*p)->priority, pa_yes_no((*p)->available));
}
if (i->active_profile)
--
cgit v0.9.0.2-2-gbebe
++++++ pulseaudio-server.fw ++++++
## Name: PulseAudio server (TCP)
## Description: Ports for PulseAudio network access (for module-native-protocol-tcp)
TCP="4713"
++++++ pulseaudio-wrong-memset.patch ++++++
--- src/modules/echo-cancel/adrian-aec.c.orig 2012-05-20 09:24:20.836607707 +0200
+++ src/modules/echo-cancel/adrian-aec.c 2012-05-20 09:26:07.641603903 +0200
@@ -167,7 +167,7 @@
} else if (1 == a->hangover) {
--(a->hangover);
// My Leaky NLMS is to erase vector w when hangover expires
- memset(a->w_arr, 0, sizeof(a->w_arr));
+ memset(a->w_arr, 0, sizeof(REAL));
}
}
}
++++++ pulseaudio.service ++++++
[Unit]
Description=System wide PulseAudio instance
After=syslog.target network.target alsasound.service
[Service]
Type=simple
Restart=always
ExecStart=/usr/bin/pulseaudio --system --log-target=syslog
[Install]
WantedBy=multi-user.target
++++++ setup-pulseaudio ++++++
#!/bin/sh
LIST_OF_OSS_APPS="aumix sox"
show_help() {
echo "setup-pulseaudio [ --enable | --disable | --auto | --status ]"
echo ""
echo "Modifies configuration files of some applications for PulseAudio"
echo " --enable Enables PulseAudio"
echo " --disable Disables PulseAudio"
echo " --auto Automatically enables/disables PulseAudio based on configuration"
echo " --status Shows activation state (disabled or enabled) for PulseAudio"
echo ""
echo "You need to be root for this command to succeed"
echo "You may need to re-login for changes to take effect"
exit 1
}
check_root() {
id=`id -u`
if [ "x$id" = "x0" ]; then
true
else
echo "You need to be root in order to enable/disable pulseaudio"
false
fi
}
PROFNAME=/etc/profile.d/pulseaudio.sh
CPROFNAME=/etc/profile.d/pulseaudio.csh
MPLAYER_CONF=/etc/mplayer/mplayer.conf
set_variable () {
if test -f $PROFNAME &&
grep -q "export $1"= $PROFNAME; then
sed -i -e "s|export $1=.*|export $1=$2|g" $PROFNAME
else
echo "export $1=$2" >> $PROFNAME
fi
if test -f $CPROFNAME &&
grep -q "setenv $1 " $CPROFNAME; then
sed -i -e "s|setenv $1 .*|setenv $1 $2|g" $CPROFNAME
else
echo "setenv $1 $2" >> $CPROFNAME
fi
}
delete_variable () {
if test -f $PROFNAME &&
grep -q "export $1"= $PROFNAME; then
sed -i -e "/export $1=.*/d" $PROFNAME
fi
if test -f $CPROFNAME &&
grep -q "setenv $1 " $CPROFNAME; then
sed -i -e "/setenv $1 .*/d" $CPROFNAME
fi
}
setup_gconf_vendor() {
if [ -x /usr/bin/gconftool-2 ]; then
/usr/bin/gconftool-2 --direct --config-source \
xml:readwrite:/etc/gconf/gconf.xml.vendor \
"$@"
fi
}
enable_phonon() {
echo "Enabling PulseAudio for Phonon..."
delete_variable PHONON_PULSEAUDIO_DISABLE
}
enable_kmix() {
echo "Enabling PulseAudio for Kmix..."
delete_variable KMIX_PULSEAUDIO_DISABLE
}
enable_alsa() {
echo "Enabling PulseAudio for ALSA..."
if [ -f /etc/alsa-pulse.conf ]; then
set_variable ALSA_CONFIG_PATH /etc/alsa-pulse.conf
else
echo "Missing /etc/alsa-pluse.conf; please install alsa-plugins-pulse package"
fi
}
enable_libao() {
echo "Enabling PulseAudio for libao..."
if test -f /etc/libao.conf; then
if grep -q "default_driver=pulse" /etc/libao.conf; then
echo "Default driver is pulse already in /etc/libao.conf"
else
echo "default_driver=pulse" >> /etc/libao.conf
fi
else
echo "default_driver=pulse" >> /etc/libao.conf
fi
}
enable_mplayer() {
echo "Enabling PulseAudio for mplayer..."
if test -f $MPLAYER_CONF; then
if grep -q '^ao *= *pulse' $MPLAYER_CONF; then
:
elif grep -q '^ao *=' $MPLAYER_CONF; then
sed -i -e 's/^ao *= *\(.*\)$/ao=pulse,\1/g' $MPLAYER_CONF
else
echo "ao=pulse" >> $MPLAYER_CONF
fi
fi
# FIXME: mplayerplug-in uses $HOME/.mplayer/mplayerplug-in.conf
}
enable_speechd() {
echo "Enabling PulseAudio for speech dispatcher..."
if test -f /etc/speech-dispatcher/speechd.conf; then
if grep -q 'AudioOutputMethod' /etc/speech-dispatcher/speechd.conf; then
sed -i -e "s|^.*AudioOutputMethod .*|AudioOutputMethod \"pulse\"|g" /etc/speech-dispatcher/speechd.conf
else
echo "AudioOutputMethod \"pulse\"" >> /etc/speech-dispatcher/speechd.conf
fi
fi
}
enable_openal() {
# nothing to do here. openal-soft is patched to prefer pulse but
# it won't autostart the daemon.
return 0
}
enable_oss() {
echo "Enabling PulseAudio for OSS..."
for app in $LIST_OF_OSS_APPS; do
if grep -q "alias $app='padsp $app'" $PROFNAME; then
echo "Application $app already setup for PulseAudio"
else
echo "alias $app='padsp $app'" >> $PROFNAME
fi
done
}
enable_sdl() {
echo "Enabling PulseAudio for SDL..."
# For SDL, we just add an environment variable, so that apps use the PA audio driver
set_variable SDL_AUDIODRIVER pulse
}
enable_timidity() {
echo "Enabling PulseAudio for Timidity..."
# Use esound output for timidity
if grep -q "alias timidity='timidity -Oe'" $PROFNAME; then
echo "Timidity already setup for using PulseAudio"
else
echo "alias timidity='timidity -Oe'" >> $PROFNAME
fi
}
enable_xine() {
#echo "Enabling PulseAudio for Xine..."
# FIXME: xine uses $HOME/.xine/config
return 0
}
enable_festival() {
test -f /etc/festival.scm || return 0
echo "Enabling PulseAudio for Festival..."
cat << EOF >> /etc/festival.scm
;;;; Use pulseaudio to output sound
(Parameter.set 'Audio_Command "paplay -n festival \$FILE")
(Parameter.set 'Audio_Method 'Audio_Command)
(Parameter.set 'Audio_Required_Format 'snd)
EOF
}
enable_sox() {
echo "Enabling PulseAudio for SoX..."
set_variable AUDIODRIVER pulseaudio
}
enable_gstreamer() {
# set autoaudiosink/src, which should pick up PA
echo "Setting auto sink/src for gstreamer"
setup_gconf_vendor -s -t str \
/system/gstreamer/0.10/default/audiosink autoaudiosink
setup_gconf_vendor -s -t str \
/system/gstreamer/0.10/default/musicaudiosink autoaudiosink
setup_gconf_vendor -s -t str \
/system/gstreamer/0.10/default/chataudiosink autoaudiosink
setup_gconf_vendor -s -t str \
/system/gstreamer/0.10/default/audiosrc autoaudiosrc
}
enable_qemu () {
echo "Enabling PulseAudio for QEMU/KVM"
set_variable QEMU_AUDIO_DRV pa
}
enable_autospawn() {
echo "Enabling PulseAudio autospawn..."
if grep -q ^autospawn /etc/pulse/client.conf; then
sed -i -e "s|^autospawn.*|autospawn = yes|g" /etc/pulse/client.conf
else
echo "autospawn = yes" >> /etc/pulse/client.conf
fi
}
disable_alsa() {
echo "Disabling PulseAudio for ALSA..."
delete_variable ALSA_CONFIG_PATH
}
disable_phonon() {
echo "Disabling PulseAudio for Phonon..."
set_variable PHONON_PULSEAUDIO_DISABLE 1
}
disable_kmix() {
echo "Disabling PulseAudio for Kmix..."
set_variable KMIX_PULSEAUDIO_DISABLE 1
}
disable_libao() {
if test -f /etc/libao.conf; then
echo "Disabling PulseAudio for libao..."
sed -i -e "/default_driver=pulse/d" /etc/libao.conf
fi
}
disable_mplayer() {
if test -f $MPLAYER_CONF; then
echo "Disabling PulseAudio for mplayer..."
sed -i -e 's/^ao *= *pulse,*/ao=/g' \
-e 's/^ao *= *$/ao=alsa/g' $MPLAYER_CONF
fi
}
disable_speechd() {
echo "Disabling PulseAudio for speech dispatcher..."
if test -f /etc/speech-dispatcher/speechd.conf; then
if grep -q 'AudioOutputMethod' /etc/speech-dispatcher/speechd.conf; then
sed -i -e "s|^.*AudioOutputMethod .*|#AudioOutputMethod \"pulse\"|g" /etc/speech-dispatcher/speechd.conf
fi
fi
}
disable_openal() {
# nothing to do here. openal-soft is patched to prefer pulse but
# it won't autostart the daemon.
return 0
}
disable_oss() {
for app in $LIST_OF_OSS_APPS; do
sed -i -e "/alias $app='padsp $app'/d" $PROFNAME
done
}
disable_sdl() {
echo "Disabling PulseAudio for SDL..."
delete_variable SDL_AUDIODRIVER
}
disable_timidity() {
echo "Disabling PulseAudio for Timidity..."
sed -i -e "/alias timidity='timidity -Oe'/d" $PROFNAME
}
disable_xine() {
#echo "Disabling PulseAudio for Xine..."
# FIXME: xine uses $HOME/.xine/config
return 0
}
disable_festival() {
test -f /etc/festival.scm || return 0
echo "Disabling PulseAudio for Festival..."
/usr/bin/sed --in-place /";;;; Use pulseaudio to output sound"/d /etc/festival.scm
/usr/bin/sed --in-place /"(Parameter.set 'Audio_Command \"paplay -n festival \$FILE\")"/d /etc/festival.scm
/usr/bin/sed --in-place /"(Parameter.set 'Audio_Method 'Audio_Command)"/d /etc/festival.scm
/usr/bin/sed --in-place /"(Parameter.set 'Audio_Required_Format 'snd)"/d /etc/festival.scm
}
disable_sox() {
echo "Disabling PulseAudio for SoX..."
set_variable AUDIODRIVER alsa
}
disable_gstreamer() {
echo "Setting alsasink/src for gstreamer"
setup_gconf_vendor -s -t str \
/system/gstreamer/0.10/default/audiosink alsasink
setup_gconf_vendor -s -t str \
/system/gstreamer/0.10/default/musicaudiosink alsasink
setup_gconf_vendor -s -t str \
/system/gstreamer/0.10/default/chataudiosink alsasink
setup_gconf_vendor -s -t str \
/system/gstreamer/0.10/default/audiosrc alsasrc
}
disable_qemu () {
echo "Clearing QEMU/KVM audio setup"
delete_variable QEMU_AUDIO_DRV
}
disable_autospawn() {
echo "Disabling PulseAudio autospawn..."
if grep -q ^autospawn /etc/pulse/client.conf; then
sed -i -e "s|^autospawn.*|autospawn = no|g" /etc/pulse/client.conf
else
echo "autospawn = no" >> /etc/pulse/client.conf
fi
# kill leftover PA processes
killall pulseaudio > /dev/null 2>&1
}
enable_all() {
enable_alsa
enable_libao
enable_mplayer
enable_openal
enable_oss
enable_sdl
enable_timidity
enable_xine
enable_festival
enable_phonon
enable_kmix
enable_speechd
enable_sox
enable_gstreamer
enable_qemu
enable_autospawn
}
disable_all() {
disable_alsa
disable_libao
disable_mplayer
disable_openal
disable_oss
disable_sdl
disable_timidity
disable_xine
disable_festival
disable_phonon
disable_kmix
disable_speechd
disable_sox
disable_gstreamer
disable_qemu
disable_autospawn
}
case $1 in
--enable)
check_root || exit 1
ENABLE=1
enable_all
;;
--disable)
check_root || exit 1
ENABLE=0
disable_all
;;
--auto)
check_root || exit 1
if [ -f /etc/sysconfig/sound ]; then
. /etc/sysconfig/sound
fi
if [ "x$PULSEAUDIO_ENABLE" = "xyes" ]; then
enable_all
elif [ "x$PULSEAUDIO_ENABLE" = "xcustom" ]; then
echo "Custom configuration detected, doing nothing."
else
disable_all
fi
exit 0
;;
--status)
if [ -f /etc/sysconfig/sound ]; then
. /etc/sysconfig/sound
fi
if [ "x$PULSEAUDIO_ENABLE" = "xyes" ]; then
echo "enabled"
elif [ "x$PULSEAUDIO_ENABLE" = "xcustom" ]; then
echo "custom configured"
else
echo "disabled"
fi
exit 0
;;
*)
show_help
;;
esac
# Now, update /etc/sysconfig/sound with the PA status
if grep -q PULSEAUDIO_ENABLE /etc/sysconfig/sound; then
if [ "x$ENABLE" = "x1" ]; then
sed -i -e "s|PULSEAUDIO_ENABLE=\"no\"|PULSEAUDIO_ENABLE=\"yes\"|g" /etc/sysconfig/sound
else
sed -i -e "s|PULSEAUDIO_ENABLE=\"yes\"|PULSEAUDIO_ENABLE=\"no\"|g" /etc/sysconfig/sound
fi
else
if [ "x$ENABLE" = "x1" ]; then
echo "PULSEAUDIO_ENABLE=\"yes\"" >> /etc/sysconfig/sound
else
echo "PULSEAUDIO_ENABLE=\"no\"" >> /etc/sysconfig/sound
fi
fi
exit 0
++++++ suppress-socket-error-msg.diff ++++++
---
src/pulsecore/socket-client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: pulseaudio-0.99.2/src/pulsecore/socket-client.c
===================================================================
--- pulseaudio-0.99.2.orig/src/pulsecore/socket-client.c
+++ pulseaudio-0.99.2/src/pulsecore/socket-client.c
@@ -253,7 +253,7 @@ static int sockaddr_prepare(pa_socket_cl
c->local = pa_socket_address_is_local(sa);
if ((c->fd = pa_socket_cloexec(sa->sa_family, SOCK_STREAM, 0)) < 0) {
- pa_log("socket(): %s", pa_cstrerror(errno));
+ /*pa_log("socket(): %s", pa_cstrerror(errno));*/
return -1;
}
++++++ sysconfig.sound-pulseaudio ++++++
## Path: Hardware/Soundcard/PulseAudio
## Description: PulseAudio configuration
## Type: list(yes,no,custom)
#
# Enable or disable PulseAudio system. Can be set to "custom" to not have
# scripts automatically change sound-related configuration for PulseAudio.
#
PULSEAUDIO_ENABLE="yes"
## Path: Hardware/Soundcard/PulseAudio/SystemWide
## Description: System Wide PulseAudio
## Type: list(yes,no)
#
# Allows you to configure that you have system wide PulseAudio daemon. Such is
# setup is not recommended. To make it work, you would need
# pulseaudio-systemwide package and enable pulseaudio systemd service. If you
# are not sure whether you want this, you don't. So unless you know what you
# are doing, keep this set to "no".
#
PULSEAUDIO_SYSTEM="no"
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe(a)opensuse.org
For additional commands, e-mail: opensuse-commit+help(a)opensuse.org