From: Dima Vukolov <dvukol@rosmail.ru>
To: sisyphus@altlinux.ru
Subject: [sisyphus] Re: Установки микшера в сервисе sound
Date: Fri, 13 Dec 2002 00:19:21 +0300
Message-ID: <200212130019.21670.dvukol@rosmail.ru> (raw)
In-Reply-To: <20021213000211.2cc42fca.matrix@podlipki.ru>
[-- Attachment #1: Type: text/plain, Size: 23 bytes --]
Вот.
--
Dima Vukolov
[-- Attachment #2: sound.patch --]
[-- Type: text/x-diff, Size: 1568 bytes --]
--- sound.orig 2002-12-12 20:52:56 +0300
+++ sound 2002-12-12 21:26:18 +0300
@@ -32,6 +32,8 @@
AUMIX=
[ -x /usr/bin/aumix ] && AUMIX=/usr/bin/aumix
+ALSACTL=
+[ -x /usr/sbin/alsactl ] && ALSACTL=/usr/sbin/alsactl
function LookupDevices()
{
@@ -71,7 +73,7 @@
function unload_alsa()
{
- RETVAL=0 stop_mixer;
+ RETVAL=0 SOUND_ALSA=1 stop_mixer;
/sbin/lsmod |grep "^snd" |
while read line; do
/sbin/rmmod `echo $line |cut -d\ -f 1`
@@ -81,20 +83,28 @@
function start_mixer()
{
- if [ -n "$AUMIX" -a "$RETVAL" -eq 0 ] && LookupDevices; then
- if [ -s /etc/.aumixrc ]; then
- action "Loading mixer settings:" "$AUMIX" -f /etc/.aumixrc -L
- elif [ -n "$SOUND_ALSA" ]; then
- action "Loading mixer settings:" "$AUMIX" -v90 -w90
+ if [ "$RETVAL" -eq 0 ] && LookupDevices; then
+ if [ -n "$SOUND_ALSA" -a -n "$ALSACTL" -a -s /etc/asound.state ]; then
+ action "Loading mixer settings:" "$ALSACTL" restore
+ elif [ -n "$AUMIX" ]; then
+ if [ -s /etc/.aumixrc ]; then
+ action "Loading mixer settings:" "$AUMIX" -f /etc/.aumixrc -L
+ elif [ -n "$SOUND_ALSA" ]; then
+ action "Loading mixer settings:" "$AUMIX" -v90 -w90
+ fi
fi
fi
}
function stop_mixer()
{
- if [ -n "$AUMIX" ] && LookupDevices; then
- action "Saving mixer settings:" "$AUMIX" -f /etc/.aumixrc -S
- fi
+ if LookupDevices; then
+ if [ -n "$SOUND_ALSA" -a -n "$ALSACTL" ]; then
+ action "Saving mixer settings:" "$ALSACTL" store
+ elif [ -n "$AUMIX" ]; then
+ action "Saving mixer settings:" "$AUMIX" -f /etc/.aumixrc -S
+ fi
+ fi
}
start()
next prev parent reply other threads:[~2002-12-12 21:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-12 20:58 [sisyphus] " Dima Vukolov
2002-12-12 21:02 ` Герасимов Дмитрий
2002-12-12 21:19 ` Dima Vukolov [this message]
2002-12-12 22:10 ` [sisyphus] " Ivan Zakharyaschev
2002-12-12 22:36 ` Dmitry V. Levin
2002-12-12 22:49 ` Dima Vukolov
2002-12-13 9:25 ` Ivan Zakharyaschev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200212130019.21670.dvukol@rosmail.ru \
--to=dvukol@rosmail.ru \
--cc=sisyphus@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git