summaryrefslogtreecommitdiffstats
path: root/move
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-04-28 14:17:00 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-04-28 14:17:00 +0000
commit5d2056b8b38b4b11bc048c51fb39d5b7d6cd8dcc (patch)
tree6f5e7e873e153ecf9be4521c7f428da6e84750ca /move
parent464162d12076095b4e03762b6f285689b4798f2f (diff)
downloaddrakx-backup-do-not-use-5d2056b8b38b4b11bc048c51fb39d5b7d6cd8dcc.tar
drakx-backup-do-not-use-5d2056b8b38b4b11bc048c51fb39d5b7d6cd8dcc.tar.gz
drakx-backup-do-not-use-5d2056b8b38b4b11bc048c51fb39d5b7d6cd8dcc.tar.bz2
drakx-backup-do-not-use-5d2056b8b38b4b11bc048c51fb39d5b7d6cd8dcc.tar.xz
drakx-backup-do-not-use-5d2056b8b38b4b11bc048c51fb39d5b7d6cd8dcc.zip
resync with initscripts (fix sound on many sound cards) (imho, this should not
be in move cvs but should be copied at build time from initscripts one)
Diffstat (limited to 'move')
-rwxr-xr-xmove/tree/alsa_default.pl12
-rwxr-xr-xmove/tree/sound.initscript4
2 files changed, 8 insertions, 8 deletions
diff --git a/move/tree/alsa_default.pl b/move/tree/alsa_default.pl
index 0ad89c264..d95400f67 100755
--- a/move/tree/alsa_default.pl
+++ b/move/tree/alsa_default.pl
@@ -1,19 +1,19 @@
-#!/usr/bin/perl
+#!/usr/bin/perl -pi
# state machine:
if (/\s*control\./) {
($min, $max) = (0, 0);
} elsif (/\s*name '/) {
- # skip masks
- $ignore = /\s*name '.*(3D Control|mask|Exchange DAC|Output Jack)/;
+ # skip masks and blacklist sb live and the like:
+ $ignore = /\s*name '.*(3D Control|AC97 Playback Volume|Audigy Analog\/Digital Output Jack|External Amplifier Power Down|Exchange DAC|IEC958 input monitor|IEC958 Capture Monitor|IEC958 Playback Switch|mask|Output Jack|Surround down mix)/i;
} elsif (!$ignore) {
if (/s*comment.range '(\d+) - (\d+)'/) {
($min, $max) = ($1, $2);
} elsif (/s*value/) {
- # enable switches (we should really blacklist sb live and the like):
+ # enable switches:
s/(value\w*\S*)\s* false/\1 true/;
- # set volume to 67%:
- my $val = int($max*0.6);
+ # set volume to 80%:
+ my $val = int($max*0.8);
s/(value\w*\S*)\s* 0/\1 $val/
}
}
diff --git a/move/tree/sound.initscript b/move/tree/sound.initscript
index 756f22398..8fbd5d317 100755
--- a/move/tree/sound.initscript
+++ b/move/tree/sound.initscript
@@ -21,8 +21,8 @@ function start_mixer () {
if [ -d /proc/asound ] && [ -x /usr/sbin/alsactl ];then
MIXER_SETTINGS=/root/tmp/asound.state_tmp
alsactl -f $MIXER_SETTINGS store
- # set sensible defaults:
- perl -pi /usr/bin/alsa_default.pl $MIXER_SETTINGS
+ # set some sane default volume and unmute needed channels:
+ /etc/rc.d/rc.alsa_default $MIXER_SETTINGS
action "Setting mixer settings" alsactl -f $MIXER_SETTINGS restore
rm -f $MIXER_SETTINGS
return 0