diff options
author | Patrick McLean <chutzpah@gentoo.org> | 2008-08-03 17:12:34 +0000 |
---|---|---|
committer | Patrick McLean <chutzpah@gentoo.org> | 2008-08-03 17:12:34 +0000 |
commit | 63af333921cdeeef97ce0323fb0cdd79fa13de3b (patch) | |
tree | d9f35dfe9b5f8db984a44b8cee521a60c4d2800c /media-libs/alsa-lib | |
parent | amd64 stable wrt security bug #233383 (diff) | |
download | gentoo-2-63af333921cdeeef97ce0323fb0cdd79fa13de3b.tar.gz gentoo-2-63af333921cdeeef97ce0323fb0cdd79fa13de3b.tar.bz2 gentoo-2-63af333921cdeeef97ce0323fb0cdd79fa13de3b.zip |
Add three patches from upstream ALSA git for pulseaudio (bug #233789). Betelgeuse confirmed this bump with Chainsaw.
(Portage version: 2.2_rc6/cvs/Linux 2.6.26-gentoo x86_64)
Diffstat (limited to 'media-libs/alsa-lib')
5 files changed, 227 insertions, 1 deletions
diff --git a/media-libs/alsa-lib/ChangeLog b/media-libs/alsa-lib/ChangeLog index 8fb9f0402902..39c52ef9e416 100644 --- a/media-libs/alsa-lib/ChangeLog +++ b/media-libs/alsa-lib/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for media-libs/alsa-lib # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/alsa-lib/ChangeLog,v 1.261 2008/08/02 21:02:23 betelgeuse Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/alsa-lib/ChangeLog,v 1.262 2008/08/03 17:12:33 chutzpah Exp $ + +*alsa-lib-1.0.17-r1 (03 Aug 2008) + + 03 Aug 2008; Patrick McLean <chutzpah@gentoo.org> + +files/alsa-lib-1.0.17-pcm-rewind-forward.patch, + +files/alsa-lib-1.0.17-pcm-rewind-forward-return.patch, + +files/alsa-lib-1.0.17-sframe-type.patch, +alsa-lib-1.0.17-r1.ebuild: + Add three patches from upstream ALSA git for pulseaudio (bug #233789). + Betelgeuse confirmed this bump with Chainsaw. *alsa-lib-1.0.17 (02 Aug 2008) diff --git a/media-libs/alsa-lib/alsa-lib-1.0.17-r1.ebuild b/media-libs/alsa-lib/alsa-lib-1.0.17-r1.ebuild new file mode 100644 index 000000000000..fcdfd8c477c2 --- /dev/null +++ b/media-libs/alsa-lib/alsa-lib-1.0.17-r1.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/alsa-lib/alsa-lib-1.0.17-r1.ebuild,v 1.1 2008/08/03 17:12:33 chutzpah Exp $ + +inherit eutils libtool + +MY_P="${P/_rc/rc}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Advanced Linux Sound Architecture Library" +HOMEPAGE="http://www.alsa-project.org/" +SRC_URI="mirror://alsaproject/lib/${MY_P}.tar.bz2" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86" +IUSE="doc debug alisp midi python" + +RDEPEND="python? ( dev-lang/python )" +DEPEND="${RDEPEND} + >=media-sound/alsa-headers-${PV} + doc? ( >=app-doc/doxygen-1.2.6 )" + +IUSE_PCM_PLUGIN="copy linear route mulaw alaw adpcm rate plug multi shm file +null empty share meter mmap_emul hooks lfloat ladspa dmix dshare dsnoop asym iec958 +softvol extplug ioplug" + +for plugin in ${IUSE_PCM_PLUGIN}; do + IUSE="${IUSE} alsa_pcm_plugins_${plugin}" +done + +pkg_setup() { + if [ -z "${ALSA_PCM_PLUGINS}" ] ; then + ewarn "You haven't selected _any_ PCM plugins. Either you set it to something like the default" + ewarn "(which is being set in the profile UNLESS you unset them) or alsa based applications" + ewarn "are going to *misbehave* !" + epause 5 + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # patches for pulseaudio from upstream git (bug #233789) + epatch "${FILESDIR}/${P}-pcm-rewind-forward.patch" + epatch "${FILESDIR}/${P}-pcm-rewind-forward-return.patch" + epatch "${FILESDIR}/${P}-sframe-type.patch" + + elibtoolize + epunt_cxx +} + +src_compile() { + local myconf + use elibc_uclibc && myconf="--without-versioned" + + # needed to avoid gcc looping internaly + use hppa && export CFLAGS="-O1 -pipe" + + econf \ + --enable-static \ + --enable-shared \ + --disable-resmgr \ + $(use_with debug) \ + $(use_enable alisp) \ + $(use_enable python) \ + $(use_enable midi rawmidi) \ + $(use_enable midi seq) \ + $(use_enable midi aload) \ + --with-pcm-plugins="${ALSA_PCM_PLUGINS}" \ + --disable-dependency-tracking \ + ${myconf} \ + || die "configure failed" + + emake || die "make failed" + + if use doc; then + emake doc || die "failed to generate docs" + fgrep -Zrl "${S}" "${S}/doc/doxygen/html" | \ + xargs -0 sed -i -e "s:${S}::" + fi +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + + dodoc ChangeLog TODO || die + use doc && dohtml -r doc/doxygen/html/* +} + +pkg_postinst() { + ewarn "Starting from alsa 1.0.11_rc3 the configuration for dmix is changed." + ewarn "Leaving around old asound.conf or ~/.asoundrc might make all apps" + ewarn "using ALSA output crash." + ewarn "Note that dmix output is enabled by default on the 'default' device" + ewarn "since ALSA 1.0.9." + elog "" + elog "Please try in-kernel ALSA drivers instead of the alsa-drivers ebuild." + elog "If alsa-drivers works for you where a recent kernel does not, we want " + elog "to know about this. Our e-mail address is alsa-bugs@gentoo.org" + elog "However, if you notice no sound output or instability, please try to " + elog "upgrade your kernel to a newer version first." +} diff --git a/media-libs/alsa-lib/files/alsa-lib-1.0.17-pcm-rewind-forward-return.patch b/media-libs/alsa-lib/files/alsa-lib-1.0.17-pcm-rewind-forward-return.patch new file mode 100644 index 000000000000..d3d6f9398f03 --- /dev/null +++ b/media-libs/alsa-lib/files/alsa-lib-1.0.17-pcm-rewind-forward-return.patch @@ -0,0 +1,38 @@ +From: Lennart Poettering <mznyfn@0pointer.de> +Date: Fri, 18 Jul 2008 19:24:38 +0000 (+0200) +Subject: fix return value of snd_pcm_rewind()/snd_pcm_forward() to return how much actually ... +X-Git-Url: http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff_plain;h=8d3fb3102f672a7b09be92811e89d49f89c1742b + +fix return value of snd_pcm_rewind()/snd_pcm_forward() to return how much actually has been rewound, instead of what actually could have rewound + +Make snd_pcm_plugin_rewind()/_forward() actually return how much has +been rewound/forwarded instead of how much could have been +rewounded/forwarded. This makes the code actually do what the +documentation of snd_pcm_rewind() suggests. + +Signed-off-by: Lennart Poettering <lennart@poettering.net> +Signed-off-by: Takashi Iwai <tiwai@suse.de> +--- + +diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c +index b377cb2..c4f5b4a 100644 +--- a/src/pcm/pcm_plugin.c ++++ b/src/pcm/pcm_plugin.c +@@ -222,7 +222,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t + frames = plugin->client_frames(pcm, sframes); + snd_pcm_mmap_appl_backward(pcm, (snd_pcm_uframes_t) frames); + snd_atomic_write_end(&plugin->watom); +- return n; ++ return (snd_pcm_sframes_t) frames; + } + + static snd_pcm_sframes_t snd_pcm_plugin_forwardable(snd_pcm_t *pcm) +@@ -255,7 +255,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_forward(snd_pcm_t *pcm, snd_pcm_uframes_ + frames = plugin->client_frames(pcm, sframes); + snd_pcm_mmap_appl_forward(pcm, (snd_pcm_uframes_t) frames); + snd_atomic_write_end(&plugin->watom); +- return n; ++ return (snd_pcm_sframes_t) frames; + } + + static snd_pcm_sframes_t snd_pcm_plugin_write_areas(snd_pcm_t *pcm, diff --git a/media-libs/alsa-lib/files/alsa-lib-1.0.17-pcm-rewind-forward.patch b/media-libs/alsa-lib/files/alsa-lib-1.0.17-pcm-rewind-forward.patch new file mode 100644 index 000000000000..80945aaa1a58 --- /dev/null +++ b/media-libs/alsa-lib/files/alsa-lib-1.0.17-pcm-rewind-forward.patch @@ -0,0 +1,36 @@ +From: Lennart Poettering <mznyfn@0pointer.de> +Date: Fri, 18 Jul 2008 19:21:23 +0000 (+0200) +Subject: clamp snd_pcm_rewind()/snd_pcm_forward() into the right direction +X-Git-Url: http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff_plain;h=0fbfe2d8d6aac06e6615b7109ffc1fea8c62dee6 + +clamp snd_pcm_rewind()/snd_pcm_forward() into the right direction + +The clamping of the input parameter in snd_pcm_rewind()/_forward() is +in the wrong direction. + +Signed-off-by: Lennart Poettering <lennart@poettering.net> +Signed-off-by: Takashi Iwai <tiwai@suse.de> +--- + +diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c +index c73a02b..c199d8d 100644 +--- a/src/pcm/pcm_plugin.c ++++ b/src/pcm/pcm_plugin.c +@@ -203,7 +203,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t + snd_pcm_sframes_t n = snd_pcm_mmap_hw_avail(pcm); + snd_pcm_sframes_t sframes; + +- if ((snd_pcm_uframes_t)n > frames) ++ if ((snd_pcm_uframes_t)n < frames) + frames = n; + if (frames == 0) + return 0; +@@ -236,7 +236,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_forward(snd_pcm_t *pcm, snd_pcm_uframes_ + snd_pcm_sframes_t n = snd_pcm_mmap_avail(pcm); + snd_pcm_uframes_t sframes; + +- if ((snd_pcm_uframes_t)n > frames) ++ if ((snd_pcm_uframes_t)n < frames) + frames = n; + if (frames == 0) + return 0; diff --git a/media-libs/alsa-lib/files/alsa-lib-1.0.17-sframe-type.patch b/media-libs/alsa-lib/files/alsa-lib-1.0.17-sframe-type.patch new file mode 100644 index 000000000000..e36c41b50962 --- /dev/null +++ b/media-libs/alsa-lib/files/alsa-lib-1.0.17-sframe-type.patch @@ -0,0 +1,39 @@ +From: Lennart Poettering <mznyfn@0pointer.de> +Date: Fri, 18 Jul 2008 19:22:50 +0000 (+0200) +Subject: fix type of internally used sframes variable, to avoid unnecessary casts +X-Git-Url: http://git.alsa-project.org/?p=alsa-lib.git;a=commitdiff_plain;h=15769ead725b7c215dedd4ea5196955086d2044a + +fix type of internally used sframes variable, to avoid unnecessary casts + +This minor patch fixes the type of the sframes variable in +snd_pcm_plugin_forward(). With this fix we need to cast less and the +code is less confusing. + +Signed-off-by: Lennart Poettering <lennart@poettering.net> +Signed-off-by: Takashi Iwai <tiwai@suse.de> +--- + +diff --git a/src/pcm/pcm_plugin.c b/src/pcm/pcm_plugin.c +index c199d8d..b377cb2 100644 +--- a/src/pcm/pcm_plugin.c ++++ b/src/pcm/pcm_plugin.c +@@ -234,7 +234,7 @@ static snd_pcm_sframes_t snd_pcm_plugin_forward(snd_pcm_t *pcm, snd_pcm_uframes_ + { + snd_pcm_plugin_t *plugin = pcm->private_data; + snd_pcm_sframes_t n = snd_pcm_mmap_avail(pcm); +- snd_pcm_uframes_t sframes; ++ snd_pcm_sframes_t sframes; + + if ((snd_pcm_uframes_t)n < frames) + frames = n; +@@ -246,8 +246,8 @@ static snd_pcm_sframes_t snd_pcm_plugin_forward(snd_pcm_t *pcm, snd_pcm_uframes_ + else + sframes = frames; + snd_atomic_write_begin(&plugin->watom); +- sframes = INTERNAL(snd_pcm_forward)(plugin->gen.slave, (snd_pcm_uframes_t) sframes); +- if ((snd_pcm_sframes_t) sframes < 0) { ++ sframes = INTERNAL(snd_pcm_forward)(plugin->gen.slave, sframes); ++ if (sframes < 0) { + snd_atomic_write_end(&plugin->watom); + return sframes; + } |