From 981cb7a0eaa42604b1cca789ce927311efedb550b01a24454371bcdb9d269f45 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 5 Dec 2007 22:34:26 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/alsa-utils?expand=0&rev=12 --- alsa-utils-alsactl-force-default.diff | 68 +++++++++++++++++++++++++++ alsa-utils-alsactl-restore-fix.diff | 22 +++++++++ alsa-utils-iecset-index-fix.diff | 21 +++++++++ alsa-utils.changes | 8 ++++ alsa-utils.spec | 14 +++++- 5 files changed, 132 insertions(+), 1 deletion(-) create mode 100644 alsa-utils-alsactl-force-default.diff create mode 100644 alsa-utils-alsactl-restore-fix.diff create mode 100644 alsa-utils-iecset-index-fix.diff diff --git a/alsa-utils-alsactl-force-default.diff b/alsa-utils-alsactl-force-default.diff new file mode 100644 index 0000000..6220aea --- /dev/null +++ b/alsa-utils-alsactl-force-default.diff @@ -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; diff --git a/alsa-utils-alsactl-restore-fix.diff b/alsa-utils-alsactl-restore-fix.diff new file mode 100644 index 0000000..84e40d1 --- /dev/null +++ b/alsa-utils-alsactl-restore-fix.diff @@ -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; diff --git a/alsa-utils-iecset-index-fix.diff b/alsa-utils-iecset-index-fix.diff new file mode 100644 index 0000000..f3eb117 --- /dev/null +++ b/alsa-utils-iecset-index-fix.diff @@ -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; + } diff --git a/alsa-utils.changes b/alsa-utils.changes index b539f33..bc46f97 100644 --- a/alsa-utils.changes +++ b/alsa-utils.changes @@ -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 diff --git a/alsa-utils.spec b/alsa-utils.spec index 13e0212..8dbbace 100644 --- a/alsa-utils.spec +++ b/alsa-utils.spec @@ -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