2012-05-14 Brian Cameron <
[email protected]>
RTI #362943
CR 7168796 PulseAudio improvements
* specs/SUNWpulseaudio.spec, base-specs/pulseaudio.spec,
patches/pulseaudio-07-sada.diff, patches/pulseaudio-10-endian.diff:
Add patch to fix the PulseAudio SunAudio plugin and to ensure that
ENDIAN defines are properly set for building on Sparc.
--- a/ChangeLog Wed May 16 15:45:27 2012 +0000
+++ b/ChangeLog Thu May 17 07:05:47 2012 +0000
@@ -1,3 +1,12 @@
+2012-05-14 Brian Cameron <[email protected]>
+
+ RTI #362943
+ CR 7168796 PulseAudio improvements
+ * specs/SUNWpulseaudio.spec, base-specs/pulseaudio.spec,
+ patches/pulseaudio-07-sada.diff, patches/pulseaudio-10-endian.diff:
+ Add patch to fix the PulseAudio SunAudio plugin and to ensure that
+ ENDIAN defines are properly set for building on Sparc.
+
2012-05-16 Ghee Teo <[email protected]>
RTI#362961.
--- a/base-specs/pulseaudio.spec Wed May 16 15:45:27 2012 +0000
+++ b/base-specs/pulseaudio.spec Thu May 17 07:05:47 2012 +0000
@@ -39,6 +39,8 @@
Patch8: pulseaudio-08-oss4.diff
# date:2011-10-06 owner:yippi type:feature
Patch9: pulseaudio-09-amd64.diff
+# date:2012-05-14 owner:yippi type:bug
+Patch10: pulseaudio-10-endian.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%prep
@@ -52,6 +54,7 @@
%patch7 -p1
%patch8 -p1
%patch9 -p1
+%patch10 -p1
perl -pi -e 's,/bin/sh,/bin/ksh,' src/daemon/esdcompat.in
@@ -103,6 +106,8 @@
rm -rf $RPM_BUILD_ROOT
%changelog
+* Tue May 15 2012 - Brian Cameron <[email protected]>
+- Add patch pulseaudio-10-endian.diff. Fix CR #7168796.
* Fri May 04 2012 - Brian Cameron <[email protected]>
- Now set optimization -xO2 on sparc to fix CR #7166622.
* Thu Oct 20 2011 - Brian Cameron <[email protected]>
--- a/patches/pulseaudio-06-configure.diff Wed May 16 15:45:27 2012 +0000
+++ b/patches/pulseaudio-06-configure.diff Thu May 17 07:05:47 2012 +0000
@@ -1,5 +1,5 @@
---- pulseaudio-1.1/src/daemon/default.pa.in-orig 2011-10-31 13:39:49.772299629 -0500
-+++ pulseaudio-1.1/src/daemon/default.pa.in 2011-10-31 13:40:02.270114775 -0500
+--- pulseaudio-1.1/src/daemon/default.pa.in-orig 2012-05-17 01:30:56.827201316 -0500
++++ pulseaudio-1.1/src/daemon/default.pa.in 2012-05-17 01:31:12.110991968 -0500
@@ -52,7 +52,7 @@ ifelse(@HAVE_ALSA@, 1, [dnl
#load-module module-alsa-source device=hw:1,0
])dnl
@@ -9,3 +9,20 @@
#load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
])dnl
ifelse(@HAVE_WAVEOUT@, 1, [dnl
+@@ -120,11 +120,11 @@ ifelse(@OS_IS_WIN32@, 0, [dnl
+ ### 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@PA_SOEXT@
+-.nofail
+-load-module module-gconf
+-.fail
+-.endif
++#.ifexists module-gconf@PA_SOEXT@
++#.nofail
++#load-module module-gconf
++#.fail
++#.endif
+
+ ### Automatically restore the default sink/source when changed by the user
+ ### during runtime
--- a/patches/pulseaudio-07-sada.diff Wed May 16 15:45:27 2012 +0000
+++ b/patches/pulseaudio-07-sada.diff Thu May 17 07:05:47 2012 +0000
@@ -1,6 +1,38 @@
---- pulseaudio-1.1/src/modules/module-solaris.c-orig 2011-11-29 16:41:26.244605338 -0600
-+++ pulseaudio-1.1/src/modules/module-solaris.c 2011-11-29 16:41:29.894285167 -0600
-@@ -485,14 +485,26 @@ static int source_process_msg(pa_msgobje
+--- pulseaudio-1.1/src/modules/module-solaris.c-orig 2012-05-14 20:28:17.916336872 -0500
++++ pulseaudio-1.1/src/modules/module-solaris.c 2012-05-14 20:28:38.353786471 -0500
+@@ -137,6 +137,7 @@ static const char* const valid_modargs[]
+ static uint64_t get_playback_buffered_bytes(struct userdata *u) {
+ audio_info_t info;
+ uint64_t played_bytes;
++ int64_t buffered_bytes;
+ int err;
+
+ pa_assert(u->sink);
+@@ -163,7 +164,13 @@ static uint64_t get_playback_buffered_by
+
+ pa_smoother_put(u->smoother, pa_rtclock_now(), pa_bytes_to_usec(played_bytes, &u->sink->sample_spec));
+
+- return u->written_bytes - played_bytes;
++ buffered_bytes = u->written_bytes - played_bytes;
++
++ if (buffered_bytes < 0) {
++ buffered_bytes = 0;
++ }
++
++ return (uint64_t) buffered_bytes;
+ }
+
+ static pa_usec_t sink_get_latency(struct userdata *u, pa_sample_spec *ss) {
+@@ -348,7 +355,7 @@ static int suspend(struct userdata *u) {
+
+ pa_log_info("Suspending...");
+
+- ioctl(u->fd, AUDIO_DRAIN, NULL);
++ ioctl(u->fd, I_FLUSH, FLUSHRW);
+ pa_close(u->fd);
+ u->fd = -1;
+
+@@ -485,14 +492,26 @@ static int source_process_msg(pa_msgobje
static void sink_set_volume(pa_sink *s) {
struct userdata *u;
audio_info_t info;
@@ -29,7 +61,7 @@
if (ioctl(u->fd, AUDIO_SETINFO, &info) < 0) {
if (errno == EINVAL)
-@@ -513,6 +525,7 @@ static void sink_get_volume(pa_sink *s)
+@@ -513,6 +532,7 @@ static void sink_get_volume(pa_sink *s)
if (ioctl(u->fd, AUDIO_GETINFO, &info) < 0)
pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
else
@@ -37,7 +69,7 @@
pa_cvolume_set(&s->real_volume, s->sample_spec.channels, info.play.gain * PA_VOLUME_NORM / AUDIO_MAX_GAIN);
}
}
-@@ -520,14 +533,19 @@ static void sink_get_volume(pa_sink *s)
+@@ -520,14 +540,19 @@ static void sink_get_volume(pa_sink *s)
static void source_set_volume(pa_source *s) {
struct userdata *u;
audio_info_t info;
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/pulseaudio-10-endian.diff Thu May 17 07:05:47 2012 +0000
@@ -0,0 +1,12 @@
+--- pulseaudio-1.1/src/pulse/sample.h-orig 2012-05-14 20:24:44.242497036 -0500
++++ pulseaudio-1.1/src/pulse/sample.h 2012-05-14 20:24:27.792501491 -0500
+@@ -117,6 +117,9 @@ PA_C_DECL_BEGIN
+ #define WORDS_BIGENDIAN
+ #endif
+ #endif
++#if defined(_BIG_ENDIAN)
++#define WORDS_BIGENDIAN
++#endif
+ #endif
+
+ /** Maximum number of allowed channels */
--- a/specs/SUNWpulseaudio.spec Wed May 16 15:45:27 2012 +0000
+++ b/specs/SUNWpulseaudio.spec Thu May 17 07:05:47 2012 +0000
@@ -21,8 +21,6 @@
%include base.inc
%use pulseaudio = pulseaudio.spec
-%define SFElibsndfile %(/usr/bin/pkginfo -q SFElibsndfile && echo 1 || echo 0)
-
Name: SUNWpulseaudio
IPS_package_name: library/audio/pulseaudio
Meta(info.classification): %{classification_prefix}:System/Multimedia Libraries
@@ -38,17 +36,22 @@
%include default-depend.inc
%include desktop-incorporation.inc
+# Needed to build tests.
+BuildRequires: library/desktop/gtk2
+
+# Optional dependencies
+BuildRequires: system/library/libdbus-glib
+BuildRequires: library/fftw-3
+
BuildRequires: codec/speex
BuildRequires: gnome/config/gconf
-BuildRequires: library/desktop/gtk2
-BuildRequires: library/fftw-3
BuildRequires: library/gc
BuildRequires: library/json-c
BuildRequires: library/libtool/libltdl
BuildRequires: library/libsndfile
BuildRequires: library/security/openssl
-BuildRequires: system/library/libdbus-glib
BuildRequires: system/network/avahi
+Requires: library/security/openssl
%package devel
Summary: %{summary} - development files
@@ -65,7 +68,7 @@
%if %build_l10n
%package l10n
-IPS_package_name: system/display-manager/gdm/l10n
+IPS_package_name: library/audio/pulseaudio/l10n
Summary: %{summary} - l10n files
SUNW_BaseDir(relocate_from:%{_prefix}): %{_gnome_il10n_basedir}
%include default-depend.inc
@@ -225,6 +228,8 @@
%endif
%changelog
+* Tue May 15 2012 - Brian Cameron <[email protected]>
+- Fix Requires and l10n IPS package name.
* Fri May 04 2012 - Brian Cameron <[email protected]>
- Now set optimization -xO2 on sparc to fix CR #7166622.
* Sun Oct 02 2011 - Brian Cameron <[email protected]>