Hello community, here is the log from the commit of package alsa-plugins for openSUSE:Factory checked in at 2013-04-14 10:11:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/alsa-plugins (Old) and /work/SRC/openSUSE:Factory/.alsa-plugins.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "alsa-plugins", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/alsa-plugins/alsa-plugins.changes 2013-03-12 17:11:03.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.alsa-plugins.new/alsa-plugins.changes 2013-04-14 10:11:23.000000000 +0200 @@ -1,0 +2,6 @@ +Fri Apr 12 15:30:20 CEST 2013 - [email protected] + +- Updated to version 1.0.27: + including all previous fixes; all 00*-* patches dropped + +------------------------------------------------------------------- Old: ---- 0001-pcm_pulse-set-prebuf-parameter-according-to-software.patch 0002-a52-Add-the-support-of-recent-libavcodec-libavutil.patch 0003-a52-Fix-build-errors.patch 0004-pulse-pulse_pcm_poll_revents-should-return-0-on-succ.patch alsa-plugins-1.0.26.tar.bz2 New: ---- alsa-plugins-1.0.27.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ alsa-plugins.spec ++++++ --- /var/tmp/diff_new_pack.e6vbmA/_old 2013-04-14 10:11:25.000000000 +0200 +++ /var/tmp/diff_new_pack.e6vbmA/_new 2013-04-14 10:11:25.000000000 +0200 @@ -37,12 +37,12 @@ %if %build_speex BuildRequires: speex-devel %endif -%define package_version 1.0.26 +%define package_version 1.0.27 Url: http://www.alsa-project.org/ Summary: Extra Plug-Ins for the ALSA Library License: LGPL-2.1+ Group: System/Libraries -Version: 1.0.26 +Version: 1.0.27 Release: 0 %ifarch s390x Recommends: %{name}-32bit = %{version} @@ -51,10 +51,6 @@ Source1: asound-pulse.conf Source2: alsa-pulse.conf Source3: baselibs.conf -Patch1: 0001-pcm_pulse-set-prebuf-parameter-according-to-software.patch -Patch2: 0002-a52-Add-the-support-of-recent-libavcodec-libavutil.patch -Patch3: 0003-a52-Fix-build-errors.patch -Patch4: 0004-pulse-pulse_pcm_poll_revents-should-return-0-on-succ.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -132,10 +128,6 @@ %prep %setup -q -n %{name}-%{package_version} -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 %build export AUTOMAKE_JOBS="%{?_smp_mflags}" ++++++ alsa-plugins-1.0.26.tar.bz2 -> alsa-plugins-1.0.27.tar.bz2 ++++++ ++++ 5057 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-plugins-1.0.26/a52/pcm_a52.c new/alsa-plugins-1.0.27/a52/pcm_a52.c --- old/alsa-plugins-1.0.26/a52/pcm_a52.c 2012-09-06 09:52:58.000000000 +0200 +++ new/alsa-plugins-1.0.27/a52/pcm_a52.c 2013-04-11 13:43:08.000000000 +0200 @@ -27,12 +27,44 @@ #include <alsa/pcm_plugin.h> #include AVCODEC_HEADER +#if LIBAVCODEC_VERSION_MAJOR >= 53 && LIBAVCODEC_VERSION_MINOR >= 34 +#include <libavutil/audioconvert.h> +#include <libavutil/mem.h> +#define USE_AVCODEC_FRAME +#endif + +/* some compatibility wrappers */ +#ifndef AV_VERSION_INT +#define AV_VERSION_INT(a, b, c) (((a) << 16) | ((b) << 8) | (c)) +#endif +#ifndef LIBAVCODEC_VERSION_INT +#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ + LIBAVCODEC_VERSION_MINOR, \ + LIBAVCODEC_VERSION_MICRO) +#endif + +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 0, 0) +#ifndef AV_CH_LAYOUT_STEREO +#define AV_CH_LAYOUT_STEREO CH_LAYOUT_STEREO +#define AV_CH_LAYOUT_QUAD CH_LAYOUT_QUAD +#define AV_CH_LAYOUT_5POINT1 CH_LAYOUT_5POINT1 +#endif +#endif + +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(52, 95, 0) +#ifndef AV_SAMPLE_FMT_S16 +#define AV_SAMPLE_FMT_S16 SAMPLE_FMT_S16 +#endif +#endif + + struct a52_ctx { snd_pcm_ioplug_t io; snd_pcm_t *slave; AVCodec *codec; AVCodecContext *avctx; snd_pcm_format_t format; + int av_format; unsigned int channels; unsigned int rate; unsigned int bitrate; @@ -45,16 +77,44 @@ unsigned int slave_period_size; unsigned int slave_buffer_size; snd_pcm_hw_params_t *hw_params; +#ifdef USE_AVCODEC_FRAME + AVFrame *frame; + int is_planar; +#endif }; +#ifdef USE_AVCODEC_FRAME +#define use_planar(rec) (rec)->is_planar +#else +#define use_planar(rec) 0 +#endif + +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(53, 34, 0) +static int do_encode(struct a52_ctx *rec) +{ + AVPacket pkt = { + .data = rec->outbuf + 8, + .size = rec->outbuf_size - 8 + }; + int got_frame; + + avcodec_encode_audio2(rec->avctx, &pkt, rec->frame, &got_frame); + return pkt.size; +} +#else +static int do_encode(struct a52_ctx *rec) +{ + return avcodec_encode_audio(rec->avctx, rec->outbuf + 8, + rec->outbuf_size - 8, + rec->inbuf); +} +#endif + /* convert the PCM data to A52 stream in IEC958 */ static void convert_data(struct a52_ctx *rec) { - int out_bytes; + int out_bytes = do_encode(rec); - out_bytes = avcodec_encode_audio(rec->avctx, rec->outbuf + 8, - rec->outbuf_size - 8, - rec->inbuf); rec->outbuf[0] = 0xf8; /* sync words */ rec->outbuf[1] = 0x72; rec->outbuf[2] = 0x4e; @@ -100,6 +160,20 @@ /* * drain callback */ +#ifdef USE_AVCODEC_FRAME +static void clear_remaining_planar_data(snd_pcm_ioplug_t *io) +{ + struct a52_ctx *rec = io->private_data; + unsigned int i; + + for (i = 0; i < io->channels; i++) + memset(rec->frame->data[i] + rec->filled * 2, 0, + (rec->avctx->frame_size - rec->filled) * 2); +} +#else +#define clear_remaining_planar_data(io) /*NOP*/ +#endif + static int a52_drain(snd_pcm_ioplug_t *io) { struct a52_ctx *rec = io->private_data; @@ -109,8 +183,12 @@ if ((err = write_out_pending(io, rec)) < 0) return err; /* remaining data must be converted and sent out */ - memset(rec->inbuf + rec->filled * io->channels, 0, - (rec->avctx->frame_size - rec->filled) * io->channels * 2); + if (use_planar(rec)) + clear_remaining_planar_data(io); + else { + memset(rec->inbuf + rec->filled * io->channels, 0, + (rec->avctx->frame_size - rec->filled) * io->channels * 2); + } convert_data(rec); } err = write_out_pending(io, rec); @@ -153,6 +231,17 @@ short *src, *dst; unsigned int src_step; int err; + static unsigned int ch_index[3][6] = { + { 0, 1 }, + { 0, 1, 2, 3 }, +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 26, 0) + /* current libavcodec expects SMPTE order */ + { 0, 1, 4, 5, 2, 3 }, +#else + /* libavcodec older than r18540 expects A52 order */ + { 0, 4, 1, 2, 3, 5 }, +#endif + }; if ((err = write_out_pending(io, rec)) < 0) return err; @@ -161,31 +250,28 @@ size = len; dst = rec->inbuf + rec->filled * io->channels; - if (interleaved) { + if (!use_planar(rec) && interleaved) { memcpy(dst, areas->addr + offset * io->channels * 2, size * io->channels * 2); } else { unsigned int i, ch, dst_step; short *dst1; - static unsigned int ch_index[3][6] = { - { 0, 1 }, - { 0, 1, 2, 3 }, -#if LIBAVCODEC_VERSION_MAJOR > 52 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 26) - /* current libavcodec expects SMPTE order */ - { 0, 1, 4, 5, 2, 3 }, -#else - /* libavcodec older than r18540 expects A52 order */ - { 0, 4, 1, 2, 3, 5 }, -#endif - }; + /* flatten copy to n-channel interleaved */ dst_step = io->channels; for (ch = 0; ch < io->channels; ch++, dst++) { const snd_pcm_channel_area_t *ap; ap = &areas[ch_index[io->channels / 2 - 1][ch]]; - dst1 = dst; src = (short *)(ap->addr + (ap->first + offset * ap->step) / 8); + +#ifdef USE_AVCODEC_FRAME + if (use_planar(rec)) { + memcpy(rec->frame->data[ch], src, size * 2); + continue; + } +#endif + dst1 = dst; src_step = ap->step / 16; /* in word */ for (i = 0; i < size; i++) { *dst1 = *src; @@ -412,6 +498,19 @@ av_free(rec->avctx); rec->avctx = NULL; } + +#ifdef USE_AVCODEC_FRAME + if (rec->frame) { + av_freep(&rec->frame->data[0]); + rec->inbuf = NULL; + } +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(54, 28, 0) + avcodec_free_frame(&rec->frame); +#else + av_freep(&rec->frame); +#endif +#endif + free(rec->inbuf); rec->inbuf = NULL; free(rec->outbuf); @@ -423,51 +522,89 @@ * * Allocate internal buffers and set up libavcodec */ -static int a52_prepare(snd_pcm_ioplug_t *io) + +#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(52, 3, 0) +static void set_channel_layout(snd_pcm_ioplug_t *io) { struct a52_ctx *rec = io->private_data; - - a52_free(rec); - - rec->avctx = avcodec_alloc_context(); - if (! rec->avctx) - return -ENOMEM; - - rec->avctx->bit_rate = rec->bitrate * 1000; - rec->avctx->sample_rate = io->rate; - rec->avctx->channels = io->channels; -#if LIBAVCODEC_VERSION_MAJOR > 52 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 95) - rec->avctx->sample_fmt = AV_SAMPLE_FMT_S16; -#else - rec->avctx->sample_fmt = SAMPLE_FMT_S16; -#endif -#if LIBAVCODEC_VERSION_MAJOR > 52 || (LIBAVCODEC_VERSION_MAJOR == 52 && LIBAVCODEC_VERSION_MINOR >= 3) switch (io->channels) { case 2: - rec->avctx->channel_layout = CH_LAYOUT_STEREO; + rec->avctx->channel_layout = AV_CH_LAYOUT_STEREO; break; case 4: - rec->avctx->channel_layout = CH_LAYOUT_QUAD; + rec->avctx->channel_layout = AV_CH_LAYOUT_QUAD; break; case 6: - rec->avctx->channel_layout = CH_LAYOUT_5POINT1; + rec->avctx->channel_layout = AV_CH_LAYOUT_5POINT1; break; default: break; } +} +#else +#define set_channel_layout(io) /* NOP */ #endif - if (avcodec_open(rec->avctx, rec->codec) < 0) - return -EINVAL; - +static int alloc_input_buffer(snd_pcm_ioplug_t *io) +{ + struct a52_ctx *rec = io->private_data; +#ifdef USE_AVCODEC_FRAME + rec->frame = avcodec_alloc_frame(); + if (!rec->frame) + return -ENOMEM; + if (av_samples_alloc(rec->frame->data, rec->frame->linesize, + io->channels, rec->avctx->frame_size, + rec->avctx->sample_fmt, 0) < 0) + return -ENOMEM; + rec->frame->nb_samples = rec->avctx->frame_size; + rec->inbuf = (short *)rec->frame->data[0]; +#else rec->inbuf = malloc(rec->avctx->frame_size * 2 * io->channels); - if (! rec->inbuf) +#endif + if (!rec->inbuf) return -ENOMEM; + return 0; +} + +static int a52_prepare(snd_pcm_ioplug_t *io) +{ + struct a52_ctx *rec = io->private_data; + int err; + + a52_free(rec); + +#ifdef USE_AVCODEC_FRAME + rec->avctx = avcodec_alloc_context3(rec->codec); +#else + rec->avctx = avcodec_alloc_context(); +#endif + if (!rec->avctx) + return -ENOMEM; + + rec->avctx->bit_rate = rec->bitrate * 1000; + rec->avctx->sample_rate = io->rate; + rec->avctx->channels = io->channels; + rec->avctx->sample_fmt = rec->av_format; + + set_channel_layout(io); + + +#ifdef USE_AVCODEC_FRAME + err = avcodec_open2(rec->avctx, rec->codec, NULL); +#else + err = avcodec_open(rec->avctx, rec->codec); +#endif + if (err < 0) + return -EINVAL; + rec->outbuf_size = rec->avctx->frame_size * 4; rec->outbuf = malloc(rec->outbuf_size); if (! rec->outbuf) return -ENOMEM; + if (alloc_input_buffer(io)) + return -ENOMEM; + rec->transfer = 0; rec->remain = 0; rec->filled = 0; @@ -544,20 +681,35 @@ static int a52_set_hw_constraint(struct a52_ctx *rec) { - unsigned int accesses[] = { + static unsigned int accesses[] = { SND_PCM_ACCESS_MMAP_INTERLEAVED, SND_PCM_ACCESS_MMAP_NONINTERLEAVED, SND_PCM_ACCESS_RW_INTERLEAVED, SND_PCM_ACCESS_RW_NONINTERLEAVED }; + static unsigned int accesses_planar[] = { + SND_PCM_ACCESS_MMAP_NONINTERLEAVED, + SND_PCM_ACCESS_RW_NONINTERLEAVED + }; unsigned int formats[] = { SND_PCM_FORMAT_S16 }; int err; snd_pcm_uframes_t buffer_max; unsigned int period_bytes, max_periods; - if ((err = snd_pcm_ioplug_set_param_list(&rec->io, SND_PCM_IOPLUG_HW_ACCESS, - ARRAY_SIZE(accesses), accesses)) < 0 || - (err = snd_pcm_ioplug_set_param_list(&rec->io, SND_PCM_IOPLUG_HW_FORMAT, + if (use_planar(rec)) + err = snd_pcm_ioplug_set_param_list(&rec->io, + SND_PCM_IOPLUG_HW_ACCESS, + ARRAY_SIZE(accesses_planar), + accesses_planar); + else + err = snd_pcm_ioplug_set_param_list(&rec->io, + SND_PCM_IOPLUG_HW_ACCESS, + ARRAY_SIZE(accesses), + accesses); + if (err < 0) + return err; + + if ((err = snd_pcm_ioplug_set_param_list(&rec->io, SND_PCM_IOPLUG_HW_FORMAT, ARRAY_SIZE(formats), formats)) < 0 || (err = snd_pcm_ioplug_set_param_minmax(&rec->io, SND_PCM_IOPLUG_HW_CHANNELS, rec->channels, rec->channels)) < 0 || @@ -702,7 +854,9 @@ rec->channels = channels; rec->format = format; +#ifndef USE_AVCODEC_FRAME avcodec_init(); +#endif avcodec_register_all(); rec->codec = avcodec_find_encoder_by_name("ac3_fixed"); @@ -744,6 +898,12 @@ rec->io.mmap_rw = 0; rec->io.callback = &a52_ops; rec->io.private_data = rec; +#ifdef USE_AVCODEC_FRAME + rec->av_format = rec->codec->sample_fmts[0]; + rec->is_planar = av_sample_fmt_is_planar(rec->av_format); +#else + rec->av_format = AV_SAMPLE_FMT_S16; +#endif err = snd_pcm_ioplug_create(&rec->io, name, stream, mode); if (err < 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-plugins-1.0.26/configure.in new/alsa-plugins-1.0.27/configure.in --- old/alsa-plugins-1.0.26/configure.in 2012-09-06 09:52:58.000000000 +0200 +++ new/alsa-plugins-1.0.27/configure.in 2013-04-11 13:43:08.000000000 +0200 @@ -1,6 +1,6 @@ AC_PREREQ(2.59) AC_INIT(oss/pcm_oss.c) -AM_INIT_AUTOMAKE(alsa-plugins, 1.0.26) +AM_INIT_AUTOMAKE(alsa-plugins, 1.0.27) AC_PREFIX_DEFAULT(/usr) AC_CONFIG_HEADERS(config.h) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-plugins-1.0.26/missing new/alsa-plugins-1.0.27/missing --- old/alsa-plugins-1.0.26/missing 2012-09-06 10:45:31.000000000 +0200 +++ new/alsa-plugins-1.0.27/missing 2013-04-11 14:54:25.000000000 +0200 @@ -1,10 +1,9 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2012-01-06.13; # UTC +scriptversion=2012-01-06.18; # UTC -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard <[email protected]>, 1996. # This program is free software; you can redistribute it and/or modify @@ -26,7 +25,7 @@ # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "Try '$0 --help' for more information" exit 1 fi @@ -34,7 +33,7 @@ sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' -# In the cases where this matters, `missing' is being run in the +# In the cases where this matters, 'missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac @@ -65,7 +64,7 @@ echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: @@ -74,20 +73,20 @@ --run try to run the given command, and emulate it if it fails Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' + aclocal touch file 'aclocal.m4' + autoconf touch file 'configure' + autoheader touch file 'config.h.in' autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c + automake touch all 'Makefile.in' files + bison create 'y.tab.[ch]', if possible, from existing .[ch] + flex create 'lex.yy.c', if possible, from existing .c help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c + lex create 'lex.yy.c', if possible, from existing .c makeinfo touch the output file - yacc create \`y.tab.[ch]', if possible, from existing .[ch] + yacc create 'y.tab.[ch]', if possible, from existing .[ch] -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. Send bug reports to <[email protected]>." exit $? @@ -99,8 +98,8 @@ ;; -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "$0: Unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; @@ -127,7 +126,7 @@ exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether + # running '$TOOL --version' or '$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi @@ -139,27 +138,27 @@ case $program in aclocal*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from +WARNING: '$1' is $msg. You should only need it if + you modified 'acinclude.m4' or '${configure_ac}'. You might want + to install the Automake and Perl packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU +WARNING: '$1' is $msg. You should only need it if + you modified '${configure_ac}'. You might want to install the + Autoconf and GNU m4 packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them +WARNING: '$1' is $msg. You should only need it if + you modified 'acconfig.h' or '${configure_ac}'. You might want + to install the Autoconf and GNU m4 packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" @@ -176,9 +175,9 @@ automake*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. +WARNING: '$1' is $msg. You should only need it if + you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'. + You might want to install the Automake and Perl packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | @@ -187,10 +186,10 @@ autom4te*) echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. +WARNING: '$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU + You can get '$1' as part of Autoconf from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` @@ -210,10 +209,10 @@ bison*|yacc*) echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package +WARNING: '$1' $msg. You should only need it if + you modified a '.y' file. You may need the Bison package in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." + Bison from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG=\${$#} @@ -240,10 +239,10 @@ lex*|flex*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package +WARNING: '$1' is $msg. You should only need it if + you modified a '.l' file. You may need the Flex package in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." + Flex from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG=\${$#} @@ -263,10 +262,10 @@ help2man*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if +WARNING: '$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." + Help2man package in order for those modifications to take + effect. You can get Help2man from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` @@ -281,12 +280,12 @@ makeinfo*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file +WARNING: '$1' is $msg. You should only need it if + you modified a '.texi' or '.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." + call might also be the consequence of using a buggy 'make' (AIX, + DU, IRIX). You might want to install the Texinfo package or + the GNU make package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` @@ -310,12 +309,12 @@ *) echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. +WARNING: '$1' is needed, and is $msg. You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, + proper tools for further handling them. Check the 'README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." + some other package would contain this missing '$1' program." exit 1 ;; esac diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-plugins-1.0.26/pulse/pcm_pulse.c new/alsa-plugins-1.0.27/pulse/pcm_pulse.c --- old/alsa-plugins-1.0.26/pulse/pcm_pulse.c 2012-09-06 09:52:58.000000000 +0200 +++ new/alsa-plugins-1.0.27/pulse/pcm_pulse.c 2013-04-11 13:43:08.000000000 +0200 @@ -651,6 +651,8 @@ else *revents = 0; + err = 0; + finish: pa_threaded_mainloop_unlock(pcm->p->mainloop); @@ -854,8 +856,9 @@ 4 * 1024 * 1024; pcm->buffer_attr.tlength = io->buffer_size * pcm->frame_size; - pcm->buffer_attr.prebuf = - (io->buffer_size - io->period_size) * pcm->frame_size; + if (pcm->buffer_attr.prebuf == (uint32_t)-1) + 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; @@ -865,6 +868,31 @@ return err; } +static int pulse_sw_params(snd_pcm_ioplug_t *io, snd_pcm_sw_params_t *params) +{ + snd_pcm_pulse_t *pcm = io->private_data; + snd_pcm_uframes_t start_threshold; + + assert(pcm); + + if (!pcm->p || !pcm->p->mainloop) + return -EBADFD; + + pa_threaded_mainloop_lock(pcm->p->mainloop); + + snd_pcm_sw_params_get_start_threshold(params, &start_threshold); + + /* At least one period to keep PulseAudio happy */ + if (start_threshold < io->period_size) + start_threshold = io->period_size; + + pcm->buffer_attr.prebuf = start_threshold * pcm->frame_size; + + pa_threaded_mainloop_unlock(pcm->p->mainloop); + + return 0; +} + static int pulse_close(snd_pcm_ioplug_t * io) { snd_pcm_pulse_t *pcm = io->private_data; @@ -931,6 +959,7 @@ .poll_revents = pulse_pcm_poll_revents, .prepare = pulse_prepare, .hw_params = pulse_hw_params, + .sw_params = pulse_sw_params, .close = pulse_close, .pause = pulse_pause }; @@ -1088,6 +1117,7 @@ } pcm->handle_underrun = handle_underrun; + pcm->buffer_attr.prebuf = -1; err = pulse_connect(pcm->p, server, fallback_name != NULL); if (err < 0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/alsa-plugins-1.0.26/version new/alsa-plugins-1.0.27/version --- old/alsa-plugins-1.0.26/version 2012-09-06 10:45:35.000000000 +0200 +++ new/alsa-plugins-1.0.27/version 2013-04-11 14:54:28.000000000 +0200 @@ -1 +1 @@ -1.0.26 +1.0.27 -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
