Hello community, here is the log from the commit of package alsa checked in at Fri Jul 18 21:59:14 CEST 2008. -------- --- alsa/alsa.changes 2008-06-18 14:42:44.000000000 +0200 +++ alsa/alsa.changes 2008-07-16 12:41:01.000000000 +0200 @@ -1,0 +2,13 @@ +Wed Jul 16 12:36:55 CEST 2008 - tiwai@suse.de + +- fix baselibs.conf (remove alsa.rpm) +- add a mute-switch function to softvol +- fixed zero-division errors in softvol + +------------------------------------------------------------------- +Tue Jul 15 18:27:12 CEST 2008 - tiwai@suse.de + +- updated to version 1.0.17-final: + * including previous patches + +------------------------------------------------------------------- Old: ---- alsa-lib-1.0.17rc2.tar.bz2 New: ---- alsa-lib-1.0.17.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ alsa.spec ++++++ --- /var/tmp/diff_new_pack.d16091/_old 2008-07-18 21:57:59.000000000 +0200 +++ /var/tmp/diff_new_pack.d16091/_new 2008-07-18 21:57:59.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package alsa (Version 1.0.16.92) +# spec file for package alsa (Version 1.0.17) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -13,7 +13,7 @@ Name: alsa BuildRequires: doxygen -%define package_version 1.0.17rc2 +%define package_version 1.0.17 License: GPL v2 or later Group: System/Libraries Requires: alsa-utils @@ -21,7 +21,7 @@ PreReq: %insserv_prereq %fillup_prereq AutoReqProv: on Summary: Advanced Linux Sound Architecture -Version: 1.0.16.92 +Version: 1.0.17 Release: 1 Source: ftp://ftp.alsa-project.org/pub/lib/alsa-lib-%{package_version}.tar.bz2 Source8: 40-alsa.rules @@ -252,6 +252,13 @@ %{_datadir}/alsa %changelog +* Wed Jul 16 2008 tiwai@suse.de +- fix baselibs.conf (remove alsa.rpm) +- add a mute-switch function to softvol +- fixed zero-division errors in softvol +* Tue Jul 15 2008 tiwai@suse.de +- updated to version 1.0.17-final: + * including previous patches * Wed Jun 18 2008 tiwai@suse.de - updated to version 1.0.17-rc2: * including previous fixes ++++++ alsa-lib-1.0.17rc2.tar.bz2 -> alsa-lib-1.0.17.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/alsa-lib-1.0.17rc2/configure new/alsa-lib-1.0.17/configure --- old/alsa-lib-1.0.17rc2/configure 2008-06-16 09:53:17.000000000 +0200 +++ new/alsa-lib-1.0.17/configure 2008-07-14 11:14:24.000000000 +0200 @@ -2486,7 +2486,7 @@ # Define the identity of the package. PACKAGE=alsa-lib - VERSION=1.0.17rc2 + VERSION=1.0.17 cat >>confdefs.h <<_ACEOF diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/alsa-lib-1.0.17rc2/configure.in new/alsa-lib-1.0.17/configure.in --- old/alsa-lib-1.0.17rc2/configure.in 2008-06-16 09:40:42.000000000 +0200 +++ new/alsa-lib-1.0.17/configure.in 2008-07-14 10:57:56.000000000 +0200 @@ -9,7 +9,7 @@ dnl remove API = c+1:0:0 dnl ************************************************* AC_CANONICAL_SYSTEM -AM_INIT_AUTOMAKE(alsa-lib, 1.0.17rc2) +AM_INIT_AUTOMAKE(alsa-lib, 1.0.17) eval LIBTOOL_VERSION_INFO="2:0:0" dnl ************************************************* AM_CONDITIONAL(INSTALL_M4, test -n "${ACLOCAL}") diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/alsa-lib-1.0.17rc2/include/version.h new/alsa-lib-1.0.17/include/version.h --- old/alsa-lib-1.0.17rc2/include/version.h 2008-06-16 09:53:28.000000000 +0200 +++ new/alsa-lib-1.0.17/include/version.h 2008-07-14 11:14:38.000000000 +0200 @@ -5,11 +5,11 @@ #define SND_LIB_MAJOR 1 /**< major number of library version */ #define SND_LIB_MINOR 0 /**< minor number of library version */ #define SND_LIB_SUBMINOR 17 /**< subminor number of library version */ -#define SND_LIB_EXTRAVER 100002 /**< extra version number, used mainly for betas */ +#define SND_LIB_EXTRAVER 1000000 /**< extra version number, used mainly for betas */ /** library version */ #define SND_LIB_VERSION ((SND_LIB_MAJOR<<16)|\ (SND_LIB_MINOR<<8)|\ SND_LIB_SUBMINOR) /** library version (string) */ -#define SND_LIB_VERSION_STR "1.0.17rc2" +#define SND_LIB_VERSION_STR "1.0.17" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/alsa-lib-1.0.17rc2/libtool new/alsa-lib-1.0.17/libtool --- old/alsa-lib-1.0.17rc2/libtool 2008-06-16 09:53:24.000000000 +0200 +++ new/alsa-lib-1.0.17/libtool 2008-07-14 11:14:33.000000000 +0200 @@ -1,7 +1,7 @@ #! /bin/sh # libtoolT - Provide generalized library-building support services. -# Generated automatically by (GNU alsa-lib 1.0.17rc2) +# Generated automatically by (GNU alsa-lib 1.0.17) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/alsa-lib-1.0.17rc2/src/pcm/pcm.c new/alsa-lib-1.0.17/src/pcm/pcm.c --- old/alsa-lib-1.0.17rc2/src/pcm/pcm.c 2008-06-16 09:40:42.000000000 +0200 +++ new/alsa-lib-1.0.17/src/pcm/pcm.c 2008-07-14 10:57:56.000000000 +0200 @@ -2385,16 +2385,13 @@ #endif /** - * \brief Return number of frames ready to be read/written + * \brief Return number of frames ready to be read (capture) / written (playback) * \param pcm PCM handle * \return a positive number of frames ready otherwise a negative * error code * * On capture does all the actions needed to transport to application * level all the ready frames across underlying layers. - * - * Using of this function is useless for the standard read/write - * operations. Use it only for mmap access. See to #snd_pcm_delay. */ snd_pcm_sframes_t snd_pcm_avail_update(snd_pcm_t *pcm) { diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/alsa-lib-1.0.17rc2/test/pcm.c new/alsa-lib-1.0.17/test/pcm.c --- old/alsa-lib-1.0.17rc2/test/pcm.c 2008-06-16 09:40:42.000000000 +0200 +++ new/alsa-lib-1.0.17/test/pcm.c 2008-07-14 10:57:56.000000000 +0200 @@ -38,7 +38,10 @@ unsigned char *samples[channels], *tmp; int steps[channels]; unsigned int chn, byte; - int ires; + union { + int i; + unsigned char c[4]; + } ires; unsigned int maxval = (1 << (snd_pcm_format_width(format) - 1)) - 1; int bps = snd_pcm_format_width(format) / 8; /* bytes per sample */ @@ -59,8 +62,8 @@ /* fill the channel areas */ while (count-- > 0) { res = sin(phase) * maxval; - ires = res; - tmp = (unsigned char *)(&ires); + ires.i = res; + tmp = ires.c; for (chn = 0; chn < channels; chn++) { for (byte = 0; byte < (unsigned int)bps; byte++) *(samples[chn] + byte) = tmp[byte]; @@ -868,7 +871,7 @@ if (verbose > 0) snd_pcm_dump(handle, output); - samples = malloc((period_size * channels * snd_pcm_format_width(format)) / 8); + samples = malloc((period_size * channels * snd_pcm_format_physical_width(format)) / 8); if (samples == NULL) { printf("No enough memory\n"); exit(EXIT_FAILURE); @@ -881,8 +884,8 @@ } for (chn = 0; chn < channels; chn++) { areas[chn].addr = samples; - areas[chn].first = chn * snd_pcm_format_width(format); - areas[chn].step = channels * snd_pcm_format_width(format); + areas[chn].first = chn * snd_pcm_format_physical_width(format); + areas[chn].step = channels * snd_pcm_format_physical_width(format); } err = transfer_methods[method].transfer_loop(handle, samples, areas); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/alsa-lib-1.0.17rc2/version new/alsa-lib-1.0.17/version --- old/alsa-lib-1.0.17rc2/version 2008-06-16 09:53:25.000000000 +0200 +++ new/alsa-lib-1.0.17/version 2008-07-14 11:14:34.000000000 +0200 @@ -1 +1 @@ -1.0.17rc2 +1.0.17 ++++++ alsa-lib-git-fixes.diff ++++++ --- /var/tmp/diff_new_pack.d16091/_old 2008-07-18 21:58:01.000000000 +0200 +++ /var/tmp/diff_new_pack.d16091/_new 2008-07-18 21:58:01.000000000 +0200 @@ -1,22 +1,135 @@ -diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c -index 3f4c033..ee2300e 100644 ---- a/src/pcm/pcm.c -+++ b/src/pcm/pcm.c -@@ -2385,16 +2385,13 @@ int snd_pcm_wait_nocheck(snd_pcm_t *pcm, int timeout) - #endif +diff --git a/src/pcm/pcm_softvol.c b/src/pcm/pcm_softvol.c +index 7af7f40..eee6424 100644 +--- a/src/pcm/pcm_softvol.c ++++ b/src/pcm/pcm_softvol.c +@@ -275,9 +275,15 @@ static void softvol_convert_stereo_vol(snd_pcm_softvol_t *svol, + return; + } - /** -- * \brief Return number of frames ready to be read/written -+ * \brief Return number of frames ready to be read (capture) / written (playback) - * \param pcm PCM handle - * \return a positive number of frames ready otherwise a negative - * error code - * - * On capture does all the actions needed to transport to application - * level all the ready frames across underlying layers. -- * -- * Using of this function is useless for the standard read/write -- * operations. Use it only for mmap access. See to #snd_pcm_delay. - */ - snd_pcm_sframes_t snd_pcm_avail_update(snd_pcm_t *pcm) - { +- vol[0] = svol->dB_value[svol->cur_vol[0]]; +- vol[1] = svol->dB_value[svol->cur_vol[1]]; +- vol_c = svol->dB_value[(svol->cur_vol[0] + svol->cur_vol[1]) / 2]; ++ if (svol->max_val == 1) { ++ vol[0] = svol->cur_vol[0] ? 0xffff : 0; ++ vol[1] = svol->cur_vol[1] ? 0xffff : 0; ++ vol_c = vol[0] | vol[1]; ++ } else { ++ vol[0] = svol->dB_value[svol->cur_vol[0]]; ++ vol[1] = svol->dB_value[svol->cur_vol[1]]; ++ vol_c = svol->dB_value[(svol->cur_vol[0] + svol->cur_vol[1]) / 2]; ++ } + switch (svol->sformat) { + case SND_PCM_FORMAT_S16_LE: + case SND_PCM_FORMAT_S16_BE: +@@ -325,7 +331,10 @@ static void softvol_convert_mono_vol(snd_pcm_softvol_t *svol, + return; + } + +- vol_scale = svol->dB_value[svol->cur_vol[0]]; ++ if (svol->max_val == 1) ++ vol_scale = svol->cur_vol[0] ? 0xffff : 0; ++ else ++ vol_scale = svol->dB_value[svol->cur_vol[0]]; + switch (svol->sformat) { + case SND_PCM_FORMAT_S16_LE: + case SND_PCM_FORMAT_S16_BE: +@@ -569,9 +578,13 @@ static void snd_pcm_softvol_dump(snd_pcm_t *pcm, snd_output_t *out) + snd_pcm_softvol_t *svol = pcm->private_data; + snd_output_printf(out, "Soft volume PCM\n"); + snd_output_printf(out, "Control: %s\n", svol->elem.id.name); +- snd_output_printf(out, "min_dB: %g\n", svol->min_dB); +- snd_output_printf(out, "max_dB: %g\n", svol->max_dB); +- snd_output_printf(out, "resolution: %d\n", svol->max_val + 1); ++ if (svol->max_val == 1) ++ snd_output_printf(out, "boolean\n"); ++ else { ++ snd_output_printf(out, "min_dB: %g\n", svol->min_dB); ++ snd_output_printf(out, "max_dB: %g\n", svol->max_dB); ++ snd_output_printf(out, "resolution: %d\n", svol->max_val + 1); ++ } + if (pcm->setup) { + snd_output_printf(out, "Its setup is:\n"); + snd_pcm_dump_setup(pcm, out); +@@ -596,13 +609,21 @@ static int add_user_ctl(snd_pcm_softvol_t *svol, snd_ctl_elem_info_t *cinfo, int + int i; + unsigned int def_val; + +- err = snd_ctl_elem_add_integer(svol->ctl, &cinfo->id, count, 0, svol->max_val, 0); ++ if (svol->max_val == 1) ++ err = snd_ctl_elem_add_boolean(svol->ctl, &cinfo->id, count); ++ else ++ err = snd_ctl_elem_add_integer(svol->ctl, &cinfo->id, count, ++ 0, svol->max_val, 0); + if (err < 0) + return err; +- add_tlv_info(svol, cinfo); +- /* set zero dB value as default, or max_val if +- there is no 0 dB setting */ +- def_val = svol->zero_dB_val ? svol->zero_dB_val : svol->max_val; ++ if (svol->max_val == 1) ++ def_val = 1; ++ else { ++ add_tlv_info(svol, cinfo); ++ /* set zero dB value as default, or max_val if ++ there is no 0 dB setting */ ++ def_val = svol->zero_dB_val ? svol->zero_dB_val : svol->max_val; ++ } + for (i = 0; i < count; i++) + svol->elem.value.integer.value[i] = def_val; + return snd_ctl_elem_write(svol->ctl, &svol->elem); +@@ -647,7 +668,7 @@ static int softvol_load_control(snd_pcm_t *pcm, snd_pcm_softvol_t *svol, + svol->max_val = resolution - 1; + svol->min_dB = min_dB; + svol->max_dB = max_dB; +- if (svol->max_dB == ZERO_DB) ++ if (svol->max_val == 1 || svol->max_dB == ZERO_DB) + svol->zero_dB_val = svol->max_val; + else if (svol->max_dB < 0) + svol->zero_dB_val = 0; /* there is no 0 dB setting */ +@@ -671,7 +692,8 @@ static int softvol_load_control(snd_pcm_t *pcm, snd_pcm_softvol_t *svol, + /* hardware control exists */ + return 1; /* notify */ + +- } else if (cinfo->type != SND_CTL_ELEM_TYPE_INTEGER || ++ } else if ((cinfo->type != SND_CTL_ELEM_TYPE_INTEGER && ++ cinfo->type != SND_CTL_ELEM_TYPE_BOOLEAN) || + cinfo->count != (unsigned int)cchannels || + cinfo->value.integer.min != 0 || + cinfo->value.integer.max != resolution - 1) { +@@ -684,7 +706,7 @@ static int softvol_load_control(snd_pcm_t *pcm, snd_pcm_softvol_t *svol, + SNDERR("Cannot add a control"); + return err; + } +- } else { ++ } else if (svol->max_val > 1) { + /* check TLV availability */ + unsigned int tlv[4]; + err = snd_ctl_elem_tlv_read(svol->ctl, &cinfo->id, tlv, sizeof(tlv)); +@@ -693,6 +715,10 @@ static int softvol_load_control(snd_pcm_t *pcm, snd_pcm_softvol_t *svol, + } + } + ++ if (svol->max_val == 1) ++ return 0; ++ ++ /* set up dB table */ + if (min_dB == PRESET_MIN_DB && max_dB == ZERO_DB && resolution == PRESET_RESOLUTION) + svol->dB_value = preset_dB_value; + else { +@@ -863,6 +889,7 @@ pcm.name { + [min_dB REAL] # minimal dB value (default: -51.0) + [max_dB REAL] # maximal dB value (default: 0.0) + [resolution INT] # resolution (default: 256) ++ # resolution = 2 means a mute switch + } + \endcode + +@@ -965,7 +992,7 @@ int _snd_pcm_softvol_open(snd_pcm_t **pcmp, const char *name, + MAX_DB_UPPER_LIMIT); + return -EINVAL; + } +- if (resolution < 0 || resolution > 1024) { ++ if (resolution <= 1 || resolution > 1024) { + SNDERR("Invalid resolution value %d", resolution); + return -EINVAL; + } ++++++ baselibs.conf ++++++ --- alsa/baselibs.conf 2008-06-18 14:34:07.000000000 +0200 +++ alsa/baselibs.conf 2008-07-16 12:36:53.000000000 +0200 @@ -1,4 +1,3 @@ -alsa libasound2 obsoletes "alsa-<targettype>" provides "alsa-<targettype>" ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org