rpms/alsa-utils/F-10 alsactl-fix-restore1.patch, NONE, 1.1 alsa-utils.spec, 1.76, 1.77 alsactl-add-ignore-option.patch, 1.1, NONE alsactl-fix-card-parsing.patch, 1.1, NONE
Jaroslav Kysela
perex at fedoraproject.org
Fri Nov 21 14:12:57 UTC 2008
Author: perex
Update of /cvs/pkgs/rpms/alsa-utils/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv3787
Modified Files:
alsa-utils.spec
Added Files:
alsactl-fix-restore1.patch
Removed Files:
alsactl-add-ignore-option.patch alsactl-fix-card-parsing.patch
Log Message:
alsa-utils: fix alsactl restore
alsactl-fix-restore1.patch:
--- NEW FILE alsactl-fix-restore1.patch ---
>From 05f78cc6811110156c701fd9a2a5d15de8b4b1c7 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex at perex.cz>
Date: Fri, 21 Nov 2008 14:44:31 +0100
Subject: [PATCH] alsactl: Fix restore / init call behaviour when driver contains more controls
Fix check when driver contains more controls than state file. In this case,
initialization procedure should be run, too.
Signed-off-by: Jaroslav Kysela <perex at perex.cz>
---
alsactl/state.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/alsactl/state.c b/alsactl/state.c
index 467fa93..635a999 100644
--- a/alsactl/state.c
+++ b/alsactl/state.c
@@ -1162,7 +1162,7 @@ static int set_control(snd_ctl_t *handle, snd_config_t *control,
return -EINVAL;
}
numid = atoi(id);
- if (numid > *maxnumid)
+ if ((int)numid > *maxnumid)
*maxnumid = numid;
snd_config_for_each(i, next, control) {
snd_config_t *n = snd_config_iterator_entry(i);
@@ -1398,7 +1398,7 @@ static int set_controls(int card, snd_config_t *top, int doit)
snd_ctl_card_info_t *info;
snd_config_t *control;
snd_config_iterator_t i, next;
- int err, maxnumid;
+ int err, maxnumid = -1;
char name[32], tmpid[16];
const char *id;
snd_ctl_card_info_alloca(&info);
@@ -1442,7 +1442,7 @@ static int set_controls(int card, snd_config_t *top, int doit)
/* check if we have additional controls in driver */
/* in this case we should go through init procedure */
- if (!doit) {
+ if (!doit && maxnumid >= 0) {
snd_ctl_elem_id_t *id;
snd_ctl_elem_info_t *info;
snd_ctl_elem_id_alloca(&id);
--
1.6.0.1.217.gb4928
Index: alsa-utils.spec
===================================================================
RCS file: /cvs/pkgs/rpms/alsa-utils/F-10/alsa-utils.spec,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- alsa-utils.spec 4 Nov 2008 09:58:22 -0000 1.76
+++ alsa-utils.spec 21 Nov 2008 14:12:27 -0000 1.77
@@ -4,7 +4,7 @@
Summary: Advanced Linux Sound Architecture (ALSA) utilities
Name: alsa-utils
Version: 1.0.18
-Release: 5%{?prever_dot}%{?dist}
+Release: 6%{?prever_dot}%{?dist}
License: GPLv2+
Group: Applications/Multimedia
URL: http://www.alsa-project.org/
@@ -13,6 +13,7 @@
Source6: alsa-info.sh
Source10: alsa.rules
Source11: alsactl.conf
+Patch0: alsactl-fix-restore1.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: alsa-lib-devel >= %{version}
BuildRequires: ncurses-devel
@@ -26,6 +27,7 @@
%prep
%setup -q -n %{name}-%{version}%{?prever}
+%patch0 -p1 -b .restore1
%build
%configure CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" --sbindir=/sbin --disable-alsaconf
@@ -90,6 +92,9 @@
fi
%changelog
+* Fri Nov 21 2008 Jaroslav Kysela <jkysela at redhat.com> 1.0.18-6
+- fix alsactl restore when driver has more controls than asound.state file
+
* Tue Nov 04 2008 Jaroslav Kysela <jkysela at redhat.com> 1.0.18-5
- fixed building
--- alsactl-add-ignore-option.patch DELETED ---
--- alsactl-fix-card-parsing.patch DELETED ---
More information about the scm-commits
mailing list