SHA256
1
0
forked from pool/alsa-utils
OBS User unknown 2007-12-05 22:34:26 +00:00 committed by Git OBS Bridge
parent e1754caa88
commit 981cb7a0ea
5 changed files with 132 additions and 1 deletions

View File

@ -0,0 +1,68 @@
# HG changeset patch
# User tiwai
# Date 1195037678 -3600
# Node ID 05c093789c5e03b91af50baa8889b7356e18b42f
# Parent 40051fabcab00bd4fcfab41e11b609acf32a6a22
alsactl - Set -F option as default
Set -F option as default for restore. There are still too many systems
that are too lazy to set -F option...
Added the new -P option to back to the old behavior.
diff -r 40051fabcab0 -r 05c093789c5e alsactl/alsactl.1
--- a/alsactl/alsactl.1 Mon Nov 12 17:24:27 2007 +0100
+++ b/alsactl/alsactl.1 Wed Nov 14 11:54:38 2007 +0100
@@ -41,7 +41,12 @@ Select the configuration file to use. Th
.TP
\fI\-F, \-\-force\fP
Used with restore command. Try to restore the matching control elements
-as much as possible.
+as much as possible. This option is set as default now.
+
+.TP
+\fI\-P, \-\-pedantic\fP
+Used with restore command. Don't restore mismatching control elements.
+This option was the old default behavior.
.TP
\fI\-d, \-\-debug\fP
diff -r 40051fabcab0 -r 05c093789c5e alsactl/alsactl.c
--- a/alsactl/alsactl.c Mon Nov 12 17:24:27 2007 +0100
+++ b/alsactl/alsactl.c Wed Nov 14 11:54:38 2007 +0100
@@ -34,7 +34,7 @@
#define SYS_ASOUNDNAMES "/etc/asound.names"
int debugflag = 0;
-int force_restore = 0;
+int force_restore = 1;
char *command;
static void help(void)
@@ -44,6 +44,8 @@ static void help(void)
printf(" -h,--help this help\n");
printf(" -f,--file # configuration file (default " SYS_ASOUNDRC " or " SYS_ASOUNDNAMES ")\n");
printf(" -F,--force try to restore the matching controls as much as possible\n");
+ printf(" (default mode)\n");
+ printf(" -P,--pedantic don't restore mismatching controls (old default)\n");
printf(" -d,--debug debug mode\n");
printf(" -v,--version print version of this program\n");
printf("\nAvailable commands:\n");
@@ -62,6 +64,7 @@ int main(int argc, char *argv[])
{"help", 0, NULL, 'h'},
{"file", 1, NULL, 'f'},
{"force", 0, NULL, 'F'},
+ {"pedantic", 0, NULL, 'P'},
{"debug", 0, NULL, 'd'},
{"version", 0, NULL, 'v'},
{NULL, 0, NULL, 0},
@@ -84,6 +87,9 @@ int main(int argc, char *argv[])
break;
case 'F':
force_restore = 1;
+ break;
+ case 'P':
+ force_restore = 0;
break;
case 'd':
debugflag = 1;

View File

@ -0,0 +1,22 @@
# HG changeset patch
# User tiwai
# Date 1196439639 -3600
# Node ID 8aa60471d254c4e60c95740478842d8500274d90
# Parent b57d8cd4f4900d029176850cd7d706a7e135a394
alsactl - Fix wrong restore
Fix a bug in alsactl that restores wrong values for elements with
multiple channels (counts).
diff -r b57d8cd4f490 -r 8aa60471d254 alsactl/state.c
--- a/alsactl/state.c Fri Nov 30 08:14:04 2007 +0100
+++ b/alsactl/state.c Fri Nov 30 17:20:39 2007 +0100
@@ -1380,7 +1380,7 @@ static int set_control(snd_ctl_t *handle
return -EINVAL;
continue;
}
- err = restore_config_value2(handle, info, type, value,
+ err = restore_config_value2(handle, info, type, n,
ctl, idx, numid);
if (err < 0)
return err;

View File

@ -0,0 +1,21 @@
# HG changeset patch
# User cladisch
# Date 1196406844 -3600
# Node ID b57d8cd4f4900d029176850cd7d706a7e135a394
# Parent 05c093789c5e03b91af50baa8889b7356e18b42f
iecset: fix card index check
Allow card indices up to 31.
diff -r 05c093789c5e -r b57d8cd4f490 iecset/iecset.c
--- a/iecset/iecset.c Wed Nov 14 11:54:38 2007 +0100
+++ b/iecset/iecset.c Fri Nov 30 08:14:04 2007 +0100
@@ -308,7 +308,7 @@ int main(int argc, char **argv)
break;
case 'c':
i = atoi(optarg);
- if (i < 0 || i >= 7) {
+ if (i < 0 || i >= 32) {
fprintf(stderr, "invalid card index %d\n", i);
return 1;
}

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Fri Nov 30 17:55:38 CET 2007 - tiwai@suse.de
- Merge upstream fixes:
* make -F option as default for alsactl
* fix iecset index range
* fix a bug in alsactl restore that restores wrong values
-------------------------------------------------------------------
Mon Nov 12 17:28:30 CET 2007 - tiwai@suse.de

View File

@ -20,11 +20,14 @@ Requires: dialog pciutils
AutoReqProv: on
Summary: Advanced Linux Sound Architecture Utilities
Version: 1.0.15
Release: 8
Release: 14
Source: ftp://ftp.alsa-project.org/pub/util/alsa-utils-%{package_version}.tar.bz2
Patch: alsa-utils-hg-fixes.diff
Patch1: alsa-utils-speaker-test-fix.diff
Patch2: alsa-utils-alsactl-tlv-comment-fix.diff
Patch3: alsa-utils-alsactl-force-default.diff
Patch4: alsa-utils-iecset-index-fix.diff
Patch5: alsa-utils-alsactl-restore-fix.diff
Url: http://www.alsa-project.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -44,6 +47,9 @@ Authors:
%patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
mv alsamixer/README alsamixer/README-alsamixer
%{?suse_update_config:%{suse_update_config -f .}}
@ -71,7 +77,13 @@ make DESTDIR=$RPM_BUILD_ROOT install
%{_sbindir}/*
%{_datadir}/sounds/alsa
%{_datadir}/alsa
%changelog
* Fri Nov 30 2007 - tiwai@suse.de
- Merge upstream fixes:
* make -F option as default for alsactl
* fix iecset index range
* fix a bug in alsactl restore that restores wrong values
* Mon Nov 12 2007 - tiwai@suse.de
- fix double entries of comment.tlv in alsactl (#340516)
* Mon Nov 05 2007 - tiwai@suse.de