diff --git a/1.0.14-buffer-attr.patch b/1.0.14-buffer-attr.patch new file mode 100644 index 0000000..155dfd2 --- /dev/null +++ b/1.0.14-buffer-attr.patch @@ -0,0 +1,23 @@ +--- alsa-plugins-1.0.14/pulse/pcm_pulse.c 2007-05-31 10:06:51.000000000 +0200 ++++ alsa-plugins-1.0.14.lennart/pulse/pcm_pulse.c 2007-09-24 01:43:01.000000000 +0200 +@@ -57,7 +57,7 @@ + + if (size > pcm->last_size) { + pcm->ptr += size - pcm->last_size; +- pcm->ptr %= pcm->buffer_attr.maxlength; ++ pcm->ptr %= pcm->buffer_attr.tlength; + } + + pcm->last_size = size; +@@ -533,9 +533,9 @@ + pcm->ss.rate = io->rate; + pcm->ss.channels = io->channels; + +- pcm->buffer_attr.maxlength = io->buffer_size * pcm->frame_size; ++ pcm->buffer_attr.maxlength = (io->buffer_size*3)/2 * pcm->frame_size; + pcm->buffer_attr.tlength = io->buffer_size * pcm->frame_size; +- pcm->buffer_attr.prebuf = io->period_size * pcm->frame_size; ++ pcm->buffer_attr.prebuf = (io->buffer_size-io->period_size) * pcm->frame_size; + pcm->buffer_attr.minreq = io->period_size * pcm->frame_size; + pcm->buffer_attr.fragsize = io->period_size * pcm->frame_size; + diff --git a/alsa-plugins.spec b/alsa-plugins.spec index 053c09d..67313ef 100644 --- a/alsa-plugins.spec +++ b/alsa-plugins.spec @@ -1,6 +1,6 @@ Name: alsa-plugins Version: 1.0.14 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Advanced Linux Sound Architecture (ALSA) Plugins # All packages are LGPLv2+ with the exception of samplerate which is GPLv2+ License: GPLv2+ and LGPLv2+ @@ -13,6 +13,7 @@ Source3: pulseaudio.conf Source4: samplerate.conf Source5: upmix.conf Source6: vdownmix.conf +Patch0: 1.0.14-buffer-attr.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: alsa-lib-devel @@ -93,6 +94,7 @@ surround". %prep %setup -q -n %{name}-%{version} +%patch0 -p1 -b .buffer_attr %build %configure --disable-static \ @@ -160,6 +162,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/alsa-lib/libasound_module_pcm_vdownmix.so %changelog +* Mon Sep 24 2007 Lennart Poettering - 1.0.14-3 +- Change PulseAudio buffering defaults to more sane values + * Tue Aug 14 2007 Eric Moret - 1.0.14-2 - Adding pulse as ALSA "default" pcm and ctl when the alsa-plugins-pulseaudio package is installed, fixing #251943.