commit alsa-utils for openSUSE:Factory
![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community,
here is the log from the commit of package alsa-utils for openSUSE:Factory
checked in at Wed May 6 18:37:31 CEST 2009.
--------
--- alsa-utils/alsa-utils.changes 2009-04-23 15:28:34.000000000 +0200
+++ /mounts/work_src_done/STABLE/alsa-utils/alsa-utils.changes 2009-05-06 18:10:48.000000000 +0200
@@ -1,0 +2,7 @@
+Wed May 6 18:07:23 CEST 2009 - tiwai@suse.de
+
+- updated to version 1.0.20:
+ * including previous patches
+ * a few more fixes about alsactl init command
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
alsa-utils-1.0.19.tar.bz2
alsa-utils-git-fixes.diff
New:
----
alsa-utils-1.0.20.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ alsa-utils.spec ++++++
--- /var/tmp/diff_new_pack.G10543/_old 2009-05-06 18:35:12.000000000 +0200
+++ /var/tmp/diff_new_pack.G10543/_new 2009-05-06 18:35:12.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package alsa-utils (Version 1.0.19)
+# spec file for package alsa-utils (Version 1.0.20)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,17 +20,17 @@
Name: alsa-utils
BuildRequires: alsa-devel ncurses-devel xmlto
-%define package_version 1.0.19
+%define package_version 1.0.20
License: GPL v2 or later
Group: Productivity/Multimedia/Sound/Players
Provides: alsa-conf
Requires: dialog pciutils
AutoReqProv: on
Summary: Advanced Linux Sound Architecture Utilities
-Version: 1.0.19
-Release: 4
+Version: 1.0.20
+Release: 1
Source: ftp://ftp.alsa-project.org/pub/util/alsa-utils-%{package_version}.tar.bz2
-Patch: alsa-utils-git-fixes.diff
+# Patch: alsa-utils-git-fixes.diff
Url: http://www.alsa-project.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -48,8 +48,8 @@
%prep
%setup -q -n %{name}-%{package_version}
# fix stupid automake's automatic action
-sed -i -e's/EXTRA_DIST= config.rpath /EXTRA_DIST=/' Makefile.am
-%patch -p1
+# sed -i -e's/EXTRA_DIST= config.rpath /EXTRA_DIST=/' Makefile.am
+# %patch -p1
mv alsamixer/README alsamixer/README-alsamixer
%build
@@ -78,6 +78,10 @@
%{_datadir}/alsa
%changelog
+* Wed May 06 2009 tiwai@suse.de
+- updated to version 1.0.20:
+ * including previous patches
+ * a few more fixes about alsactl init command
* Thu Apr 23 2009 tiwai@suse.de
- updated as of 2009.04.23:
* Added vi-like key bindings to alsamixer
++++++ alsa-utils-1.0.19.tar.bz2 -> alsa-utils-1.0.20.tar.bz2 ++++++
++++ 3288 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-utils-1.0.19/alsaconf/alsaconf.in new/alsa-utils-1.0.20/alsaconf/alsaconf.in
--- old/alsa-utils-1.0.19/alsaconf/alsaconf.in 2009-01-19 12:17:19.000000000 +0100
+++ new/alsa-utils-1.0.20/alsaconf/alsaconf.in 2009-05-06 09:07:24.000000000 +0200
@@ -291,6 +291,8 @@
# cfgfile = base config file to remove/update the sound setting
# cfgout = new config file to write the sound setting (if different from $cfgfile)
+cfgout=""
+cfgoldout=""
if [ -n "$cfgfile" ]; then
if [ ! -r "$cfgfile" ]; then
xecho "ERROR: The config file doesn't exist: "
@@ -301,10 +303,22 @@
if [ "$distribution" = "gentoo" ]; then
cfgfile="/etc/modules.d/alsa"
elif [ "$kernel" = "new" ]; then
+ cfgfile="/etc/modprobe.conf"
if [ -d /etc/modprobe.d ]; then
- cfgout="/etc/modprobe.d/sound"
+ cfgout="/etc/modprobe.d/50-sound.conf"
+ cfgoldout="/etc/modprobe.d/sound"
+ if [ ! -f $cfgout ]; then
+ modver=$(modprobe -V | sed -e's/^module-init-tools version //')
+ case "$modver" in
+ 3.[789]*)
+ ;;
+ *)
+ cfgout="/etc/modprobe.d/sound"
+ cfgoldout=""
+ ;;
+ esac
+ fi
fi
- cfgfile="/etc/modprobe.conf"
elif [ "$distribution" = "debian" ]; then
cfgfile="/etc/modutils/sound"
elif [ -e /etc/modules.conf ]; then
@@ -818,7 +832,7 @@
msg=$(xmsg "
Configuring %s
Do you want to modify %s (and %s if present)?" $CARD_DRIVER $cfgout $cfgfile)
- $DIALOG --yesno "$msg" 8 50 || acex 0
+ $DIALOG --yesno "$msg" 10 50 || acex 0
else
msg=$(xmsg "
Configuring %s
@@ -875,6 +889,7 @@
if [ -n "$cfgout" ]; then
[ ! -r "$cfgfile" ] || cmp -s "$TMP" "$cfgfile" || cat "$TMP" > "$cfgfile"
cmp -s "$addcfg" "$cfgout" || cat "$addcfg" > "$cfgout"
+ test -n "$cfgoldout" && rm -f "$cfgoldout"
else
echo "$ACB
# --- ALSACONF version $version ---" >> $TMP
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-utils-1.0.19/alsactl/alsactl.c new/alsa-utils-1.0.20/alsactl/alsactl.c
--- old/alsa-utils-1.0.19/alsactl/alsactl.c 2009-01-19 12:17:19.000000000 +0100
+++ new/alsa-utils-1.0.20/alsactl/alsactl.c 2009-05-06 09:07:24.000000000 +0200
@@ -97,7 +97,8 @@
};
char *cfgfile = SYS_ASOUNDRC;
char *initfile = DATADIR "/init/00main";
- char *cardname, **tmp, ncardname[16];
+ char *cardname, ncardname[16];
+ const char *const *tmp;
int removestate = 0;
int init_fallback = 1; /* new default behavior */
int res;
@@ -106,7 +107,7 @@
while (1) {
int c;
- if ((c = getopt_long(argc, argv, "hdvf:FgE:i:Pr:R", long_option, NULL)) < 0)
+ if ((c = getopt_long(argc, argv, "hdvf:FgE:i:IPr:R", long_option, NULL)) < 0)
break;
switch (c) {
case '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-utils-1.0.19/alsactl/alsactl_init.xml new/alsa-utils-1.0.20/alsactl/alsactl_init.xml
--- old/alsa-utils-1.0.19/alsactl/alsactl_init.xml 2009-01-19 12:17:19.000000000 +0100
+++ new/alsa-utils-1.0.20/alsactl/alsactl_init.xml 2009-05-06 09:07:24.000000000 +0200
@@ -279,7 +279,7 @@
<listitem>
<para>The relative path to sysfs subsystem specifying
the root directory of a soundcard device. Usually,
- it should be set to "/class/sound/controlC$cardinfo{card}/device".
+ it should be set to "/class/sound/card$cardinfo{card}/device".
</para>
</listitem>
</varlistentry>
@@ -462,7 +462,7 @@
<listitem>
<para>The relative path to sysfs subsystem specifying
the root directory of a soundcard device. Usually,
- it should be set to "/class/sound/controlC$cardinfo{card}/device".
+ it should be set to "/class/sound/card$cardinfo{card}/device".
</para>
</listitem>
</varlistentry>
@@ -553,6 +553,13 @@
</varlistentry>
<varlistentry>
+ <term><option>$config{<replaceable>key</replaceable>}</option>, <option>%g{<replaceable>key</replaceable>}</option></term>
+ <listitem>
+ <para>The value of a configuration variable. See CONFIG{} for more details.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>%%</option></term>
<listitem>
<para>The '%' character itself.</para>
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-utils-1.0.19/alsactl/init/00main new/alsa-utils-1.0.20/alsactl/init/00main
--- old/alsa-utils-1.0.19/alsactl/init/00main 2009-01-19 12:17:19.000000000 +0100
+++ new/alsa-utils-1.0.20/alsactl/init/00main 2009-05-06 09:07:24.000000000 +0200
@@ -2,7 +2,9 @@
# See 'man alsactl_init' for syntax.
# set root device directory in sysfs for soundcard for ATTR{} command
-CONFIG{sysfs_device}="/class/sound/controlC$cardinfo{card}/device"
+CONFIG{sysfs_device}="/class/sound/card$cardinfo{card}/device"
+ACCESS!="$sysfsroot$config{sysfs_device}", \
+ CONFIG{sysfs_device}="/class/sound/controlC$cardinfo{card}/device"
# test for extra commands
ENV{CMD}=="help", INCLUDE="help", GOTO="00main_end"
@@ -29,6 +31,7 @@
# real ALSA configuration database
CARDINFO{driver}=="HDA-Intel", INCLUDE="hda", GOTO="init_end"
+CARDINFO{driver}=="CA0106", INCLUDE="ca0106", GOTO="init_end"
CARDINFO{driver}=="Test", INCLUDE="test", GOTO="init_end"
LABEL="init_end"
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-utils-1.0.19/alsactl/init/default new/alsa-utils-1.0.20/alsactl/init/default
--- old/alsa-utils-1.0.19/alsactl/init/default 2009-01-19 12:17:19.000000000 +0100
+++ new/alsa-utils-1.0.20/alsactl/init/default 2009-05-06 09:07:24.000000000 +0200
@@ -10,71 +10,99 @@
# playback
# **************************************************************************
-ENV{volume}:="-20dB"
+ENV{ppercent}:="75%"
+ENV{cpercent}:="75%"
+ENV{pvolume}:="-20dB"
+ENV{cvolume}:="12dB"
+ENV{has_pmaster_vol}:="false"
CTL{reset}="mixer"
CTL{name}="Playback Volume",PROGRAM=="__ctl_search", \
- CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
+ CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
CTL{name}="Playback Switch",PROGRAM=="__ctl_search", \
CTL{values}="on"
CTL{reset}="mixer"
CTL{name}="Master Playback Volume",PROGRAM=="__ctl_search", \
- CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
+ ENV{has_pmaster_vol}:="true", \
+ CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
CTL{name}="Master Playback Switch",PROGRAM=="__ctl_search", \
CTL{values}="on"
CTL{reset}="mixer"
CTL{name}="Master Digital Playback Volume",PROGRAM=="__ctl_search", \
- CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
+ CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
CTL{name}="Master Digital Playback Switch",PROGRAM=="__ctl_search", \
CTL{values}="on"
CTL{reset}="mixer"
-CTL{name}="Front Playback Volume",PROGRAM=="__ctl_search", \
- CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
+CTL{name}="Front Playback Volume",PROGRAM!="__ctl_search",GOTO="front0_end"
+# if master volume control is present, turn front volume to max
+ENV{has_pmaster_vol}=="true",CTL{values}="0dB",RESULT=="0",GOTO="front0_end"
+ENV{has_pmaster_vol}=="true",CTL{values)="100%",GOTO="front0_end"
+CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
+LABEL="front0_end"
CTL{name}="Front Playback Switch",PROGRAM=="__ctl_search", \
CTL{values}="on"
CTL{reset}="mixer"
-CTL{name}="Headphone Playback Volume",PROGRAM=="__ctl_search", \
- CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
+CTL{name}="Headphone Playback Volume",PROGRAM=="__ctl_search",GOTO="headphone0_end"
+# if master volume control is present, turn headphone volume to max
+ENV{has_pmaster_vol}=="true",CTL{values}="0dB",RESULT=="0",GOTO="headphone0_end"
+ENV{has_pmaster_vol}=="true",CTL{values)="100%",GOTO="headphone0_end"
+CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
+LABEL="headphone0_end"
CTL{name}="Headphone Playback Switch",PROGRAM=="__ctl_search", \
CTL{values}="on"
CTL{reset}="mixer"
CTL{name}="Speaker Playback Volume",PROGRAM=="__ctl_search", \
- CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
+ CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
CTL{name}="Speaker Playback Switch",PROGRAM=="__ctl_search", \
CTL{values}="on"
CTL{reset}="mixer"
CTL{name}="PC Speaker Playback Volume",PROGRAM=="__ctl_search", \
- CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
+ CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
CTL{name}="PC Speaker Playback Switch",PROGRAM=="__ctl_search", \
CTL{values}="on"
CTL{reset}="mixer"
-CTL{name}="PCM Playback Volume",PROGRAM=="__ctl_search", \
- CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
+CTL{name}="PCM Playback Volume",PROGRAM!="__ctl_search",GOTO="pcm0_end"
+# if master volume control is present, turn PCM volume to max
+ENV{has_pmaster_vol}=="true",CTL{values}="0dB",RESULT=="0",GOTO="pcm0_end"
+ENV{has_pmaster_vol}=="true",CTL{values)="100%",GOTO="pcm0_end"
+# exception - some HDA codecs have shifted dB range
+CTL{dBmin}=="-34.50dB",CTL{dBmax}=="12.00dB",CTL{values}="0dB",GOTO="pcm0_end"
+CTL{dBmin}=="-30.00dB",CTL{dBmax}=="0dB",CTL{values}="0dB",GOTO="pcm0_end"
+CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="75%"
+LABEL="pcm0_end"
CTL{name}="PCM Playback Switch",PROGRAM=="__ctl_search", \
CTL{values}="on"
CTL{reset}="mixer"
-CTL{name}="PCM Playback Volume",CTL{index}="1",PROGRAM=="__ctl_search", \
- CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
+CTL{name}="PCM Playback Volume",CTL{index}="1",PROGRAM!="__ctl_search", \
+ GOTO="pcm1_end"
+# if master volume control is present, turn PCM volume to max
+ENV{has_pmaster_vol}=="true",CTL{values}="0dB",RESULT=="0",GOTO="pcm1_end"
+ENV{has_pmaster_vol}=="true",CTL{values)="100%",GOTO="pcm1_end"
+# exception - some HDA codecs have shifted dB range
+CTL{dBmin}=="-34.50dB",CTL{dBmax}=="12.00dB",CTL{values}="0dB",GOTO="pcm1_end"
+CTL{dBmin}=="-30.00dB",CTL{dBmax}=="0dB",CTL{values}="0dB",GOTO="pcm1_end"
+CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="75%"
+LABEL="pcm1_end"
CTL{name}="PCM Playback Switch",CTL{index}="1",PROGRAM=="__ctl_search", \
CTL{values}="on"
CTL{reset}="mixer"
CTL{name}="DAC Playback Volume",PROGRAM=="__ctl_search", \
- CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
+ CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
CTL{name}="DAC Playback Switch",PROGRAM=="__ctl_search", \
CTL{values}="on"
CTL{reset}="mixer"
CTL{name}="Synth Playback Volume",,PROGRAM=="__ctl_search", \
- CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
+ CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
CTL{name}="Synth Playback Switch",PROGRAM=="__ctl_search", \
CTL{values}="on"
@@ -91,20 +119,27 @@
CTL{values}="on"
CTL{reset}="mixer"
-CTL{name}="CD Playback Volume",PROGRAM=="__ctl_search", \
- CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
+CTL{name}="CD Playback Volume",PROGRAM!="__ctl_search", GOTO="cd0_end"
+# if master volume control is present, turn CD volume to max
+ENV{has_pmaster_vol}=="true",CTL{values}="0dB",RESULT=="0",GOTO="cd0_end"
+ENV{has_pmaster_vol}=="true",CTL{values)="100%",GOTO="cd0_end"
+# exception - some HDA codecs have shifted dB range
+CTL{dBmin}=="-34.50dB",CTL{dBmax}=="12.00dB",CTL{values}="0dB",GOTO="cd0_end"
+CTL{dBmin}=="-30.00dB",CTL{dBmax}=="0dB",CTL{values}="0dB",GOTO="cd0_end"
+CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
+LABEL="cd0_end"
CTL{name}="CD Playback Switch",PROGRAM=="__ctl_search", \
CTL{values}="on"
CTL{reset}="mixer"
CTL{name}="Mono Playback Volume",PROGRAM=="__ctl_search", \
- CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
+ CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
CTL{name}="Mono Playback Switch",PROGRAM=="__ctl_search", \
CTL{values}="on"
CTL{reset}="mixer"
CTL{name}="Master Mono Playback Volume",PROGRAM=="__ctl_search", \
- CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
+ CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
CTL{name}="Master Mono Playback Switch",PROGRAM=="__ctl_search", \
CTL{values}="on"
@@ -120,25 +155,22 @@
CTL{reset}="mixer"
CTL{name}="DRC Range",PROGRAM=="__ctl_search", \
- CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
+ CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="$env{ppercent}"
# **************************************************************************
# capture
# **************************************************************************
-ENV{volume}:="20dB"
-
CTL{reset}="mixer"
CTL{name}="Capture Volume",PROGRAM=="__ctl_search", \
- CTL{values}="$env{volume}",RESULT!="0",CTL{values}="75%"
+ CTL{values}="$env{cvolume}",RESULT!="0",CTL{values}="$env{cpercent}"
CTL{name}="Capture Switch",PROGRAM=="__ctl_search", \
CTL{values}="on"
-CTL{name}="Input Source",PROGRAM=="__ctl_search", \
- CTL{enums}=="*|Internal Mic|*",CTL{values}="Internal Mic", \
+CTL{name}="Input Source",PROGRAM!="__ctl_search", GOTO="end_input_source"
+CTL{enums}=="*|Internal Mic|*",CTL{values}="Internal Mic", \
GOTO="end_input_source"
-CTL{name}="Input Source",PROGRAM=="__ctl_search", \
- CTL{enums}=="*|Mic|*",CTL{values}="Mic"
+CTL{enums}=="*|Mic|*",CTL{values}="Mic"
LABEL="end_input_source"
CTL{name}="Internal Mic Boost",PROGRAM=="__ctl_search", \
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-utils-1.0.19/alsactl/init/hda new/alsa-utils-1.0.20/alsactl/init/hda
--- old/alsa-utils-1.0.19/alsactl/init/hda 2009-01-19 12:17:19.000000000 +0100
+++ new/alsa-utils-1.0.20/alsactl/init/hda 2009-05-06 09:07:24.000000000 +0200
@@ -11,10 +11,12 @@
LABEL="Acer Travelmate 8100"
# playback
CTL{reset}="mixer"
+CTL{name}="Master Playback Volume", CTL{value}="-21dB"
+CTL{name}="Master Playback Switch", CTL{value}="on"
CTL{name}="Headphone Playback Switch", CTL{value}="on,on"
CTL{name}="Front Playback Volume", CTL{value}="-29dB,-29dB"
CTL{name}="Front Playback Switch", CTL{value}="on,on"
-CTL{name}="PCM Playback Volume", CTL{value}="-21dB,-21dB"
+CTL{name}="PCM Playback Volume", CTL{value}="0dB,0dB"
# capture
CTL{name}="Input Source", CTL{value}="Mic"
CTL{name}="Capture Volume", CTL{value}="20dB,20dB"
@@ -24,8 +26,10 @@
LABEL="Lenovo T61"
# playback
CTL{reset}="mixer"
+CTL{name}="Master Playback Volume", CTL{value}="-13.5dB"
+CTL{name}="Master Playback Switch", CTL{value}="on"
CTL{name}="Headphone Playback Switch", CTL{value}="on,on"
-CTL{name}="PCM Playback Volume", CTL{value}="-13.5dB,-13.5dB"
+CTL{name}="PCM Playback Volume", CTL{value}="0dB,0dB"
# capture
CTL{name}="Input Source", CTL{value}="Internal Mic"
CTL{name}="Internal Mic Boost", CTL{value}="1"
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-utils-1.0.19/alsactl/init_parse.c new/alsa-utils-1.0.20/alsactl/init_parse.c
--- old/alsa-utils-1.0.19/alsactl/init_parse.c 2009-01-19 12:17:19.000000000 +0100
+++ new/alsa-utils-1.0.20/alsactl/init_parse.c 2009-05-06 09:07:24.000000000 +0200
@@ -381,7 +381,7 @@
snd_ctl_elem_value_set_integer(space->ctl_value, idx, val);
} else if (items > 2 && value[items-2] == 'd' && value[items-1] == 'B') {
val = strtol(value, NULL, 0) * 100;
- if ((pos2 = index(value, '.')) != NULL) {
+ if ((pos2 = strchr(value, '.')) != NULL) {
if (isdigit(*(pos2-1)) && isdigit(*(pos2-2))) {
if (val < 0)
val -= strtol(pos2 + 1, NULL, 0);
@@ -396,7 +396,7 @@
}
val = snd_ctl_convert_from_dB(snd_hctl_ctl(space->ctl_handle), space->ctl_id, val, &lval, -1);
if (val < 0) {
- Perror(space, "unable to convert dB value '%s' to internal integer range", value);
+ dbg("unable to convert dB value '%s' to internal integer range", value);
return val;
}
snd_ctl_elem_value_set_integer(space->ctl_value, idx, lval);
@@ -929,6 +929,7 @@
SUBST_ATTR,
SUBST_SYSFSROOT,
SUBST_ENV,
+ SUBST_CONFIG,
};
static const struct subst_map {
char *name;
@@ -941,6 +942,7 @@
{ .name = "attr", .fmt = 's', .type = SUBST_ATTR },
{ .name = "sysfsroot", .fmt = 'r', .type = SUBST_SYSFSROOT },
{ .name = "env", .fmt = 'E', .type = SUBST_ENV },
+ { .name = "config", .fmt = 'g', .type = SUBST_CONFIG },
{ NULL, '\0', 0 }
};
enum subst_type type;
@@ -1101,6 +1103,16 @@
dbg("substitute env '%s=%s'", attr, pos);
strlcat(string, pos, maxsize);
break;
+ case SUBST_CONFIG:
+ if (attr == NULL) {
+ dbg("missing attribute");
+ break;
+ }
+ pair = value_find(space, attr);
+ if (pair == NULL)
+ break;
+ strlcat(string, pair->value, maxsize);
+ break;
default:
Perror(space, "unknown substitution type=%i", type);
break;
@@ -1253,7 +1265,7 @@
res = strdup(filename);
if (res) {
- tmp = rindex(res, '/');
+ tmp = strrchr(res, '/');
if (tmp)
*tmp = '\0';
}
@@ -1313,10 +1325,9 @@
}
snprintf(string, sizeof(string), "%i", err);
space->program_result = strdup(string);
- if (err < 0 || space->program_result == NULL) {
- err = 0;
+ err = 0;
+ if (space->program_result == NULL)
break;
- }
} else if (op == KEY_OP_MATCH || op == KEY_OP_NOMATCH) {
dbg("ctl match: '%s' '%s'", value, attr);
temp = (char *)elemid_get(space, attr);
@@ -1521,15 +1532,23 @@
}
if (strncasecmp(key, "ACCESS", 6) == 0) {
if (op == KEY_OP_MATCH || op == KEY_OP_NOMATCH) {
+ if (value[0] == '$') {
+ strlcpy(string, value, sizeof(string));
+ apply_format(space, string, sizeof(string));
+ if (string[0] == '/')
+ goto __access1;
+ }
if (value[0] != '/') {
strlcpy(string, space->rootdir, sizeof(string));
strlcat(string, "/", sizeof(string));
strlcat(string, value, sizeof(string));
} else {
- strlcat(string, value, sizeof(string));
+ strlcpy(string, value, sizeof(string));
}
+ apply_format(space, string, sizeof(string));
+ __access1:
count = access(string, F_OK);
- dbg("access(%s) = %i", value, count);
+ dbg("access(%s) = %i (%s)", string, count, value);
if (op == KEY_OP_MATCH && count != 0)
break;
if (op == KEY_OP_NOMATCH && count == 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-utils-1.0.19/alsactl/init_utils_string.c new/alsa-utils-1.0.20/alsactl/init_utils_string.c
--- old/alsa-utils-1.0.19/alsactl/init_utils_string.c 2009-01-19 12:17:19.000000000 +0100
+++ new/alsa-utils-1.0.20/alsactl/init_utils_string.c 2009-05-06 09:07:24.000000000 +0200
@@ -17,17 +17,6 @@
*/
-static int string_is_true(const char *str)
-{
- if (strcasecmp(str, "true") == 0)
- return 1;
- if (strcasecmp(str, "yes") == 0)
- return 1;
- if (strcasecmp(str, "1") == 0)
- return 1;
- return 0;
-}
-
static void remove_trailing_chars(char *path, char c)
{
size_t len;
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-utils-1.0.19/alsamixer/alsamixer.c new/alsa-utils-1.0.20/alsamixer/alsamixer.c
--- old/alsa-utils-1.0.19/alsamixer/alsamixer.c 2009-01-19 12:17:19.000000000 +0100
+++ new/alsa-utils-1.0.20/alsamixer/alsamixer.c 2009-05-06 09:07:24.000000000 +0200
@@ -2113,11 +2113,13 @@
mixer_hscroll_delta -= 1;
break;
case KEY_UP:
+ case 'k':
case 'w':
case 'W':
mixer_vscroll_delta -= 1;
break;
case KEY_DOWN:
+ case 'j':
case 'x':
case 'X':
mixer_vscroll_delta += 1;
@@ -2179,12 +2181,14 @@
break;
case 'w':
case KEY_UP:
+ case 'k':
mixer_set_delta(1);
case 'W':
mixer_add_delta(1);
break;
case 'x':
case KEY_DOWN:
+ case 'j':
mixer_set_delta(-1);
case 'X':
mixer_add_delta(-1);
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-utils-1.0.19/aplay/aplay.c new/alsa-utils-1.0.20/aplay/aplay.c
--- old/alsa-utils-1.0.19/aplay/aplay.c 2009-01-19 12:17:19.000000000 +0100
+++ new/alsa-utils-1.0.20/aplay/aplay.c 2009-05-06 09:07:24.000000000 +0200
@@ -101,12 +101,15 @@
static int avail_min = -1;
static int start_delay = 0;
static int stop_delay = 0;
+static int monotonic = 0;
static int verbose = 0;
static int vumeter = VUMETER_NONE;
static int buffer_pos = 0;
static size_t bits_per_sample, bits_per_frame;
static size_t chunk_bytes;
static int test_position = 0;
+static int test_coef = 8;
+static int test_nowait = 0;
static snd_output_t *log;
static int fd = -1;
@@ -188,7 +191,10 @@
" --disable-channels disable automatic channel conversions\n"
" --disable-format disable automatic format conversions\n"
" --disable-softvol disable software volume control (softvol)\n"
-" --test-position test ring buffer position\n")
+" --test-position test ring buffer position\n"
+" --test-coef=# test coeficient for ring buffer position (default 8)\n"
+" expression for validation is: coef * (buffer_size / 2)\n"
+" --test-nowait do not wait for ring buffer - eats whole CPU\n")
, command);
printf(_("Recognized sample formats are:"));
for (k = 0; k < SND_PCM_FORMAT_LAST; ++k) {
@@ -350,7 +356,9 @@
OPT_DISABLE_CHANNELS,
OPT_DISABLE_FORMAT,
OPT_DISABLE_SOFTVOL,
- OPT_TEST_POSITION
+ OPT_TEST_POSITION,
+ OPT_TEST_COEF,
+ OPT_TEST_NOWAIT
};
int main(int argc, char *argv[])
@@ -389,6 +397,8 @@
{"disable-format", 0, 0, OPT_DISABLE_FORMAT},
{"disable-softvol", 0, 0, OPT_DISABLE_SOFTVOL},
{"test-position", 0, 0, OPT_TEST_POSITION},
+ {"test-coef", 1, 0, OPT_TEST_COEF},
+ {"test-nowait", 0, 0, OPT_TEST_NOWAIT},
{0, 0, 0, 0}
};
char *pcm_name = "default";
@@ -570,6 +580,14 @@
case OPT_TEST_POSITION:
test_position = 1;
break;
+ case OPT_TEST_COEF:
+ test_coef = strtol(optarg, NULL, 0);
+ if (test_coef < 1)
+ test_coef = 1;
+ break;
+ case OPT_TEST_NOWAIT:
+ test_nowait = 1;
+ break;
default:
fprintf(stderr, _("Try `%s --help' for more information.\n"), command);
return 1;
@@ -1017,6 +1035,7 @@
&buffer_frames);
}
assert(err >= 0);
+ monotonic = snd_pcm_hw_params_is_monotonic(params);
err = snd_pcm_hw_params(handle, params);
if (err < 0) {
error(_("Unable to install hw params:"));
@@ -1112,6 +1131,18 @@
} while (0)
#endif
+#ifndef timermsub
+#define timermsub(a, b, result) \
+do { \
+ (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
+ (result)->tv_nsec = (a)->tv_nsec - (b)->tv_nsec; \
+ if ((result)->tv_nsec < 0) { \
+ --(result)->tv_sec; \
+ (result)->tv_nsec += 1000000000L; \
+ } \
+} while (0)
+#endif
+
/* I/O error handler */
static void xrun(void)
{
@@ -1124,13 +1155,27 @@
exit(EXIT_FAILURE);
}
if (snd_pcm_status_get_state(status) == SND_PCM_STATE_XRUN) {
- struct timeval now, diff, tstamp;
- gettimeofday(&now, 0);
- snd_pcm_status_get_trigger_tstamp(status, &tstamp);
- timersub(&now, &tstamp, &diff);
- fprintf(stderr, _("%s!!! (at least %.3f ms long)\n"),
- stream == SND_PCM_STREAM_PLAYBACK ? _("underrun") : _("overrun"),
- diff.tv_sec * 1000 + diff.tv_usec / 1000.0);
+ if (monotonic) {
+#ifdef HAVE_CLOCK_GETTIME
+ struct timespec now, diff, tstamp;
+ clock_gettime(CLOCK_MONOTONIC, &now);
+ snd_pcm_status_get_trigger_htstamp(status, &tstamp);
+ timermsub(&now, &tstamp, &diff);
+ fprintf(stderr, _("%s!!! (at least %.3f ms long)\n"),
+ stream == SND_PCM_STREAM_PLAYBACK ? _("underrun") : _("overrun"),
+ diff.tv_sec * 1000 + diff.tv_nsec / 10000000.0);
+#else
+ fprintf(stderr, "%s !!!\n", _("underrun"));
+#endif
+ } else {
+ struct timeval now, diff, tstamp;
+ gettimeofday(&now, 0);
+ snd_pcm_status_get_trigger_tstamp(status, &tstamp);
+ timersub(&now, &tstamp, &diff);
+ fprintf(stderr, _("%s!!! (at least %.3f ms long)\n"),
+ stream == SND_PCM_STREAM_PLAYBACK ? _("underrun") : _("overrun"),
+ diff.tv_sec * 1000 + diff.tv_usec / 1000.0);
+ }
if (verbose) {
fprintf(stderr, _("Status:\n"));
snd_pcm_status_dump(status, log);
@@ -1396,20 +1441,60 @@
static void do_test_position(void)
{
- static int counter = 0;
+ static long counter = 0;
+ static time_t tmr = -1;
+ time_t now;
+ static float availsum, delaysum, samples;
+ static snd_pcm_sframes_t maxavail, maxdelay;
+ static snd_pcm_sframes_t minavail, mindelay;
+ static snd_pcm_sframes_t badavail = 0, baddelay = 0;
+ snd_pcm_sframes_t outofrange;
snd_pcm_sframes_t avail, delay;
int err;
err = snd_pcm_avail_delay(handle, &avail, &delay);
if (err < 0)
return;
- if (avail > 4 * (snd_pcm_sframes_t)buffer_frames ||
- avail < -4 * (snd_pcm_sframes_t)buffer_frames ||
- delay > 4 * (snd_pcm_sframes_t)buffer_frames ||
- delay < -4 * (snd_pcm_sframes_t)buffer_frames) {
- fprintf(stderr, "Suspicious buffer position (%i total): avail = %li, delay = %li, buffer = %li\n", ++counter, (long)avail, (long)delay, (long)buffer_frames);
+ outofrange = (test_coef * (snd_pcm_sframes_t)buffer_frames) / 2;
+ if (avail > outofrange || avail < -outofrange ||
+ delay > outofrange || delay < -outofrange) {
+ badavail = avail; baddelay = delay;
+ availsum = delaysum = samples = 0;
+ maxavail = maxdelay = 0;
+ minavail = mindelay = buffer_frames * 16;
+ fprintf(stderr, _("Suspicious buffer position (%li total): "
+ "avail = %li, delay = %li, buffer = %li\n"),
+ ++counter, (long)avail, (long)delay, (long)buffer_frames);
} else if (verbose) {
- fprintf(stderr, "Buffer position: %li/%li (%li)\n", (long)avail, (long)delay, (long)buffer_frames);
+ time(&now);
+ if (tmr == (time_t) -1) {
+ tmr = now;
+ availsum = delaysum = samples = 0;
+ maxavail = maxdelay = 0;
+ minavail = mindelay = buffer_frames * 16;
+ }
+ if (avail > maxavail)
+ maxavail = avail;
+ if (delay > maxdelay)
+ maxdelay = delay;
+ if (avail < minavail)
+ minavail = avail;
+ if (delay < mindelay)
+ mindelay = delay;
+ availsum += avail;
+ delaysum += delay;
+ samples++;
+ if (avail != 0 && now != tmr) {
+ fprintf(stderr, "BUFPOS: avg%li/%li "
+ "min%li/%li max%li/%li (%li) (%li:%li/%li)\n",
+ (long)(availsum / samples),
+ (long)(delaysum / samples),
+ (long)minavail, (long)mindelay,
+ (long)maxavail, (long)maxdelay,
+ (long)buffer_frames,
+ counter, badavail, baddelay);
+ tmr = now;
+ }
}
}
@@ -1433,7 +1518,8 @@
if (test_position)
do_test_position();
if (r == -EAGAIN || (r >= 0 && (size_t)r < count)) {
- snd_pcm_wait(handle, 1000);
+ if (!test_nowait)
+ snd_pcm_wait(handle, 1000);
} else if (r == -EPIPE) {
xrun();
} else if (r == -ESTRPIPE) {
@@ -1478,7 +1564,8 @@
if (test_position)
do_test_position();
if (r == -EAGAIN || (r >= 0 && (size_t)r < count)) {
- snd_pcm_wait(handle, 1000);
+ if (!test_nowait)
+ snd_pcm_wait(handle, 1000);
} else if (r == -EPIPE) {
xrun();
} else if (r == -ESTRPIPE) {
@@ -1520,7 +1607,8 @@
if (test_position)
do_test_position();
if (r == -EAGAIN || (r >= 0 && (size_t)r < count)) {
- snd_pcm_wait(handle, 1000);
+ if (!test_nowait)
+ snd_pcm_wait(handle, 1000);
} else if (r == -EPIPE) {
xrun();
} else if (r == -ESTRPIPE) {
@@ -1562,7 +1650,8 @@
if (test_position)
do_test_position();
if (r == -EAGAIN || (r >= 0 && (size_t)r < count)) {
- snd_pcm_wait(handle, 1000);
+ if (!test_nowait)
+ snd_pcm_wait(handle, 1000);
} else if (r == -EPIPE) {
xrun();
} else if (r == -ESTRPIPE) {
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-utils-1.0.19/aplay/Makefile.am new/alsa-utils-1.0.20/aplay/Makefile.am
--- old/alsa-utils-1.0.19/aplay/Makefile.am 2009-01-19 12:17:19.000000000 +0100
+++ new/alsa-utils-1.0.20/aplay/Makefile.am 2009-05-06 09:07:24.000000000 +0200
@@ -1,5 +1,7 @@
+LIBRT = @LIBRT@
+
INCLUDES = -I$(top_srcdir)/include
-LDADD = $(LIBINTL)
+LDADD = $(LIBINTL) $(LIBRT)
# debug flags
#LDFLAGS = -static
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-utils-1.0.19/configure.in new/alsa-utils-1.0.20/configure.in
--- old/alsa-utils-1.0.19/configure.in 2009-01-19 12:24:19.000000000 +0100
+++ new/alsa-utils-1.0.20/configure.in 2009-05-06 09:17:13.000000000 +0200
@@ -2,7 +2,7 @@
AC_PREREQ(2.59)
AC_INIT(alsamixer/alsamixer.c)
AC_PREFIX_DEFAULT(/usr)
-AM_INIT_AUTOMAKE(alsa-utils, 1.0.19)
+AM_INIT_AUTOMAKE(alsa-utils, 1.0.20)
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.15])
@@ -29,10 +29,44 @@
AC_PROG_LN_S
AM_PATH_ALSA(1.0.16)
+dnl Check components
+AC_CHECK_HEADERS([alsa/pcm.h], [have_pcm="yes"], [have_pcm="no"],
+ [#include
participants (1)
-
root@Hilbert.suse.de