forked from pool/alsa-utils
This commit is contained in:
parent
11f79dbc96
commit
56e362f096
@ -36,6 +36,84 @@ index 554617d..5296977 100644
|
||||
EXTRA_DIST= TODO gitcompile
|
||||
AUTOMAKE_OPTIONS=foreign
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
diff --git a/alsaconf/alsaconf.in b/alsaconf/alsaconf.in
|
||||
index 6e9ff75..ccc1b37 100644
|
||||
--- a/alsaconf/alsaconf.in
|
||||
+++ b/alsaconf/alsaconf.in
|
||||
@@ -291,6 +291,8 @@ esac
|
||||
|
||||
# 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 @@ else
|
||||
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 @@ ac_config_card () {
|
||||
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 @@ alias sound-slot-0 $CARD_DRIVER" >> $addcfg
|
||||
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 --git a/alsactl/alsactl.c b/alsactl/alsactl.c
|
||||
index e0bc276..02e082f 100644
|
||||
--- a/alsactl/alsactl.c
|
||||
+++ b/alsactl/alsactl.c
|
||||
@@ -97,7 +97,8 @@ int main(int argc, char *argv[])
|
||||
};
|
||||
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 @@ int main(int argc, char *argv[])
|
||||
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 --git a/alsactl/init/default b/alsactl/init/default
|
||||
index 66692b3..e2dcfd6 100644
|
||||
--- a/alsactl/init/default
|
||||
@ -130,6 +208,28 @@ index 31ed56e..77146d2 100644
|
||||
if (tmp)
|
||||
*tmp = '\0';
|
||||
}
|
||||
diff --git a/alsactl/init_utils_string.c b/alsactl/init_utils_string.c
|
||||
index 2598e9f..01ea800 100644
|
||||
--- a/alsactl/init_utils_string.c
|
||||
+++ b/alsactl/init_utils_string.c
|
||||
@@ -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 --git a/configure.in b/configure.in
|
||||
index 59247ed..0facec4 100644
|
||||
--- a/configure.in
|
||||
@ -170,3 +270,92 @@ index 59247ed..0facec4 100644
|
||||
AM_CONDITIONAL(ALSAMIXER, test x$alsamixer = xtrue)
|
||||
|
||||
dnl Disable alsaconf
|
||||
diff --git a/speaker-test/speaker-test.c b/speaker-test/speaker-test.c
|
||||
index 75a4bed..63a7151 100644
|
||||
--- a/speaker-test/speaker-test.c
|
||||
+++ b/speaker-test/speaker-test.c
|
||||
@@ -85,48 +85,48 @@ static const char *given_test_wav_file = NULL;
|
||||
static char *wav_file_dir = SOUNDSDIR;
|
||||
|
||||
static const char *const channel_name[MAX_CHANNELS] = {
|
||||
- N_("Front Left"),
|
||||
- N_("Front Right"),
|
||||
- N_("Rear Left"),
|
||||
- N_("Rear Right"),
|
||||
- N_("Center"),
|
||||
- N_("LFE"),
|
||||
- N_("Side Left"),
|
||||
- N_("Side Right"),
|
||||
- N_("Channel 9"),
|
||||
- N_("Channel 10"),
|
||||
- N_("Channel 11"),
|
||||
- N_("Channel 12"),
|
||||
- N_("Channel 13"),
|
||||
- N_("Channel 14"),
|
||||
- N_("Channel 15"),
|
||||
- N_("Channel 16")
|
||||
+ /* 0 */ N_("Front Left"),
|
||||
+ /* 1 */ N_("Front Right"),
|
||||
+ /* 2 */ N_("Rear Left"),
|
||||
+ /* 3 */ N_("Rear Right"),
|
||||
+ /* 4 */ N_("Center"),
|
||||
+ /* 5 */ N_("LFE"),
|
||||
+ /* 6 */ N_("Side Left"),
|
||||
+ /* 7 */ N_("Side Right"),
|
||||
+ /* 8 */ N_("Channel 9"),
|
||||
+ /* 9 */ N_("Channel 10"),
|
||||
+ /* 10 */ N_("Channel 11"),
|
||||
+ /* 11 */ N_("Channel 12"),
|
||||
+ /* 12 */ N_("Channel 13"),
|
||||
+ /* 13 */ N_("Channel 14"),
|
||||
+ /* 14 */ N_("Channel 15"),
|
||||
+ /* 15 */ N_("Channel 16")
|
||||
};
|
||||
|
||||
static const int channels4[] = {
|
||||
- 0,
|
||||
- 1,
|
||||
- 3,
|
||||
- 2
|
||||
+ 0, /* Front Left */
|
||||
+ 1, /* Front Right */
|
||||
+ 3, /* Rear Right */
|
||||
+ 2, /* Rear Left */
|
||||
};
|
||||
static const int channels6[] = {
|
||||
- 0,
|
||||
- 4,
|
||||
- 1,
|
||||
- 3,
|
||||
- 2,
|
||||
- 5
|
||||
-};
|
||||
+ 0, /* Front Left */
|
||||
+ 4, /* Center */
|
||||
+ 1, /* Front Right */
|
||||
+ 3, /* Rear Right */
|
||||
+ 2, /* Rear Left */
|
||||
+ 5, /* LFE */
|
||||
+};
|
||||
static const int channels8[] = {
|
||||
- 0,
|
||||
- 4,
|
||||
- 1,
|
||||
- 7,
|
||||
- 3,
|
||||
- 2,
|
||||
- 6,
|
||||
- 5
|
||||
-};
|
||||
+ 0, /* Front Left */
|
||||
+ 4, /* Center */
|
||||
+ 1, /* Front Right */
|
||||
+ 7, /* Side Right */
|
||||
+ 3, /* Rear Right */
|
||||
+ 2, /* Rear Left */
|
||||
+ 6, /* Side Left */
|
||||
+ 5, /* LFE */
|
||||
+};
|
||||
|
||||
static void generate_sine(uint8_t *frames, int channel, int count, double *_phase) {
|
||||
double phase = *_phase;
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 18 12:19:29 CET 2009 - tiwai@suse.de
|
||||
|
||||
- add missing -I option for alsactl
|
||||
- prefer /etc/modprobe.d/50-sound.conf for new module-init-tools
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 16 14:33:14 CET 2009 - tiwai@suse.de
|
||||
|
||||
|
@ -28,7 +28,7 @@ Requires: dialog pciutils
|
||||
AutoReqProv: on
|
||||
Summary: Advanced Linux Sound Architecture Utilities
|
||||
Version: 1.0.19
|
||||
Release: 2
|
||||
Release: 3
|
||||
Source: ftp://ftp.alsa-project.org/pub/util/alsa-utils-%{package_version}.tar.bz2
|
||||
Patch: alsa-utils-git-fixes.diff
|
||||
Url: http://www.alsa-project.org/
|
||||
@ -78,6 +78,9 @@ make %{?jobs:-j %jobs}
|
||||
%{_datadir}/alsa
|
||||
|
||||
%changelog
|
||||
* Wed Mar 18 2009 tiwai@suse.de
|
||||
- add missing -I option for alsactl
|
||||
- prefer /etc/modprobe.d/50-sound.conf for new module-init-tools
|
||||
* Mon Feb 16 2009 tiwai@suse.de
|
||||
- alsactl: init - modify default rule to better support some HDA
|
||||
codecs
|
||||
|
Loading…
Reference in New Issue
Block a user