alsa-utils 1.0.19 final
This commit is contained in:
parent
964d7e1ebd
commit
a4b4a7e3d8
@ -19,3 +19,4 @@ alsa-utils-1.0.16.tar.bz2
|
||||
alsa-utils-1.0.17.tar.bz2
|
||||
alsa-utils-1.0.18rc3.tar.bz2
|
||||
alsa-utils-1.0.18.tar.bz2
|
||||
alsa-utils-1.0.19.tar.bz2
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
Summary: Advanced Linux Sound Architecture (ALSA) utilities
|
||||
Name: alsa-utils
|
||||
Version: 1.0.18
|
||||
Release: 5%{?prever_dot}%{?dist}
|
||||
Version: 1.0.19
|
||||
Release: 1%{?prever_dot}%{?dist}
|
||||
License: GPLv2+
|
||||
Group: Applications/Multimedia
|
||||
URL: http://www.alsa-project.org/
|
||||
@ -90,6 +90,9 @@ if [ -s /etc/alsa/asound.state -a ! -s /etc/asound.state ] ; then
|
||||
fi
|
||||
|
||||
%changelog
|
||||
* Tue Jan 20 2009 Jaroslav Kysela <jkysela@redhat.com> 1.0.19-1
|
||||
- updated to 1.0.19 final
|
||||
|
||||
* Tue Nov 04 2008 Jaroslav Kysela <jkysela@redhat.com> 1.0.18-5
|
||||
- fixed building
|
||||
|
||||
|
@ -1,126 +0,0 @@
|
||||
From f63ff476f3538f519ac8ff0acd4acdab29889ad5 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Thu, 18 Sep 2008 09:40:02 +0200
|
||||
Subject: [PATCH] alsactl: Add -g,--ignore option to ignore 'No soundcards found' error
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
alsactl/alsactl.1 | 5 +++++
|
||||
alsactl/alsactl.c | 10 ++++++++--
|
||||
alsactl/alsactl.h | 1 +
|
||||
alsactl/state.c | 16 ++++++++++++----
|
||||
4 files changed, 26 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/alsactl/alsactl.1 b/alsactl/alsactl.1
|
||||
index d7f30f6..b038a82 100644
|
||||
--- a/alsactl/alsactl.1
|
||||
+++ b/alsactl/alsactl.1
|
||||
@@ -51,6 +51,11 @@ Used with restore command. Try to restore the matching control elements
|
||||
as much as possible. This option is set as default now.
|
||||
|
||||
.TP
|
||||
+\fI\-g, \-\-ignore\fP
|
||||
+Used with store and restore commands. Do not show 'No soundcards found'
|
||||
+and do not set an error exit code when soundcards are not installed.
|
||||
+
|
||||
+.TP
|
||||
\fI\-P, \-\-pedantic\fP
|
||||
Used with restore command. Don't restore mismatching control elements.
|
||||
This option was the old default behavior.
|
||||
diff --git a/alsactl/alsactl.c b/alsactl/alsactl.c
|
||||
index 57957bf..f846316 100644
|
||||
--- a/alsactl/alsactl.c
|
||||
+++ b/alsactl/alsactl.c
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
int debugflag = 0;
|
||||
int force_restore = 1;
|
||||
+int ignore_nocards = 0;
|
||||
char *command;
|
||||
char *statefile = NULL;
|
||||
|
||||
@@ -48,7 +49,8 @@ static void help(void)
|
||||
printf(" -f,--file # configuration file (default " SYS_ASOUNDRC ")\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(" -g,--ignore ignore 'No soundcards found' error\n");
|
||||
+ printf(" -P,--pedantic do not restore mismatching controls (old default)\n");
|
||||
printf(" -r,--runstate # save restore and init state to this file (only errors)\n");
|
||||
printf(" default settings is 'no file set'\n");
|
||||
printf(" -R,--remove remove runstate file at first, otherwise append errors\n");
|
||||
@@ -75,6 +77,7 @@ int main(int argc, char *argv[])
|
||||
{"env", 1, NULL, 'E'},
|
||||
{"initfile", 1, NULL, 'i'},
|
||||
{"force", 0, NULL, 'F'},
|
||||
+ {"ignore", 0, NULL, 'g'},
|
||||
{"pedantic", 0, NULL, 'P'},
|
||||
{"runstate", 0, NULL, 'r'},
|
||||
{"remove", 0, NULL, 'R'},
|
||||
@@ -99,7 +102,7 @@ int main(int argc, char *argv[])
|
||||
while (1) {
|
||||
int c;
|
||||
|
||||
- if ((c = getopt_long(argc, argv, "hdvf:FE:i:Pr:R", long_option, NULL)) < 0)
|
||||
+ if ((c = getopt_long(argc, argv, "hdvf:FgE:i:Pr:R", long_option, NULL)) < 0)
|
||||
break;
|
||||
switch (c) {
|
||||
case 'h':
|
||||
@@ -111,6 +114,9 @@ int main(int argc, char *argv[])
|
||||
case 'F':
|
||||
force_restore = 1;
|
||||
break;
|
||||
+ case 'g':
|
||||
+ ignore_nocards = 1;
|
||||
+ break;
|
||||
case 'E':
|
||||
if (putenv(optarg)) {
|
||||
fprintf(stderr, "environment string '%s' is wrong\n", optarg);
|
||||
diff --git a/alsactl/alsactl.h b/alsactl/alsactl.h
|
||||
index 408b145..44d27f1 100644
|
||||
--- a/alsactl/alsactl.h
|
||||
+++ b/alsactl/alsactl.h
|
||||
@@ -1,5 +1,6 @@
|
||||
extern int debugflag;
|
||||
extern int force_restore;
|
||||
+extern int ignore_nocards;
|
||||
extern char *command;
|
||||
extern char *statefile;
|
||||
|
||||
diff --git a/alsactl/state.c b/alsactl/state.c
|
||||
index 554020b..576721a 100644
|
||||
--- a/alsactl/state.c
|
||||
+++ b/alsactl/state.c
|
||||
@@ -1507,8 +1507,12 @@ int save_state(const char *file, const char *cardname)
|
||||
break;
|
||||
if (card < 0) {
|
||||
if (first) {
|
||||
- error("No soundcards found...");
|
||||
- return -ENODEV;
|
||||
+ if (ignore_nocards) {
|
||||
+ return 0;
|
||||
+ } else {
|
||||
+ error("No soundcards found...");
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -1606,8 +1610,12 @@ int load_state(const char *file, const char *initfile, const char *cardname)
|
||||
break;
|
||||
if (card < 0) {
|
||||
if (first) {
|
||||
- error("No soundcards found...");
|
||||
- return -ENODEV;
|
||||
+ if (ignore_nocards) {
|
||||
+ return 0;
|
||||
+ } else {
|
||||
+ error("No soundcards found...");
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
}
|
||||
break;
|
||||
}
|
||||
--
|
||||
1.6.0.GIT
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 0a8e8d581e5df6f1b13ea009fcdd77c6afcbdc43 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Thu, 11 Sep 2008 13:39:42 +0200
|
||||
Subject: [PATCH] alsactl: Fix oops (when parsing card argument)
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
alsactl/alsactl.c | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/alsactl/alsactl.c b/alsactl/alsactl.c
|
||||
index 6728fbc..57957bf 100644
|
||||
--- a/alsactl/alsactl.c
|
||||
+++ b/alsactl/alsactl.c
|
||||
@@ -150,7 +150,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
cardname = argc - optind > 1 ? argv[optind + 1] : NULL;
|
||||
- for (tmp = devfiles; cardname != NULL && tmp != NULL; tmp++) {
|
||||
+ for (tmp = devfiles; cardname != NULL && *tmp != NULL; tmp++) {
|
||||
int len = strlen(*tmp);
|
||||
if (!strncmp(cardname, *tmp, len)) {
|
||||
long l = strtol(cardname + len, NULL, 0);
|
||||
--
|
||||
1.6.0.GIT
|
||||
|
Loading…
Reference in New Issue
Block a user