ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Serge Ryabchun <sr@osdn.org.ua>
To: <Sisyphus@altlinux.ru>
Subject: [sisyphus] /etc/rc.d/init.d/sound, aumix, alsa, oss
Date: Thu, 25 Sep 2003 12:52:40 +0300 (EEST)
Message-ID: <Pine.LNX.4.33.0309251117070.23543-100000@kvazar.bank.i-net> (raw)

Здравствуйте,

Сначала про aumix. В RedHat начиная где-то c 5.0 есть /bin/aumix-minimal:

$ ldd /bin/aumix-minimal
        libc.so.6 => /lib/libc.so.6 (0x40022000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
        
в отличии от нашего:
# ldd /usr/bin/aumix
        libgpm.so.1 => /usr/lib/libgpm.so.1 (0x4000d000)
        libncurses.so.5 => /usr/lib/libncurses.so.5 (0x40013000)
        libgtk-1.2.so.0 => /usr/lib/libgtk-1.2.so.0 (0x4002f000)
        libgdk-1.2.so.0 => /usr/lib/libgdk-1.2.so.0 (0x4018b000)
        libgmodule-1.2.so.0 => /lib/libgmodule-1.2.so.0 (0x401c4000)
        libglib-1.2.so.0 => /lib/libglib-1.2.so.0 (0x401c7000)
        libdl.so.2 => /lib/libdl.so.2 (0x401ee000)
        libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x401f1000)
        libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x401f9000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40207000)
        libm.so.6 => /lib/libm.so.6 (0x402cf000)
        libc.so.6 => /lib/libc.so.6 (0x402f2000)
        libtinfo.so.5 => /lib/libtinfo.so.5 (0x4040d000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x80000000)
        
libX11.so и остальные у меня на многих серверах никогда не появится,
в тоже время aumix там нужен - помимо емыла, на матюгальник выдаются
сообщения о том-сём. Приходится собирать и ставить красношляпный.
Посему вопрос, будет ли у нас aumix-minimal?

Не совсем понятна наша политика со звуком:
Если есть ALSA, грузим ALSA, иначе грузим OSS. IMHO, очень жесткая
завязка. У меня 3 источника звука - es1371, на ней висят колонки, в
зависимости от задачи грузятся alsa или oss; via8235, воткнут в
телевизор вместе с tvout, грузится alsa; и tvtuner, но этим за
последний год я не пользовался, хотя он таки есть. Те меня совершенно
не устраивает имеющийся стартовый скрипт, пришлось заменить своим:

cat /adm/sound >>>>>>>>>>>>---

#!/bin/bash

function rm_sound_modules() {

    [ -f /etc/sysconfig/sound-0.alsa -o -f /etc/sysconfig/sound-0.oss ] && modprobe -r sound-slot-0
    [ -f /etc/sysconfig/sound-1.alsa -o -f /etc/sysconfig/sound-1.oss ] && modprobe -r sound-slot-1
    [ -f /etc/sysconfig/sound-2.alsa -o -f /etc/sysconfig/sound-2.oss ] && modprobe -r sound-slot-2
}

function probe_sound_modules() {

     [ -f /etc/sysconfig/sound-0.alsa -o -f /etc/sysconfig/sound-0.oss ] && modprobe sound-slot-0
     [ -f /etc/sysconfig/sound-1.alsa -o -f /etc/sysconfig/sound-1.oss ] && modprobe sound-slot-1
     [ -f /etc/sysconfig/sound-2.alsa -o -f /etc/sysconfig/sound-2.oss ] && modprobe sound-slot-2
}

case "$1" in
    start|restart|reload)
        rm_sound_modules
        probe_sound_modules
        ;;
    stop)
    	rm_sound_modules
        ;;
    set)
    	case "$2" in
            0|1|2)
            	case "$3" in
                    alsa|oss)
                        rm_sound_modules
                    	rm -f /etc/sysconfig/sound-$2.* 2> /dev/null
                        touch /etc/sysconfig/sound-$2.$3
                        probe_sound_modules
                    	;;
                esac
            	;;
            *)
            	;;
        esac
    	;;
    *)
    	;;
esac
exit 0

<<<<<<<<<<<<---

в quake3 зовется "sudo /adm/sound set 0 oss", а в winex "sudo /adm/sound set 0 alsa"

В modules.conf прописано:

alias char-major-116 snd
post-install sound-slot-0       /usr/bin/aumix -d /dev/mixer  -f /etc/.aumixrc  -L >/dev/null 2>&1 || :
pre-remove sound-slot-0         /usr/bin/aumix -d /dev/mixer  -f /etc/.aumixrc  -S >/dev/null 2>&1 || :
post-install sound-slot-1       /usr/bin/aumix -d /dev/mixer1 -f /etc/.aumixrc1 -L >/dev/null 2>&1 || :
pre-remove sound-slot-1         /usr/bin/aumix -d /dev/mixer1 -f /etc/.aumixrc1 -S >/dev/null 2>&1 || :

if     -f /etc/sysconfig/sound-0.oss
    alias sound-slot-0 es1371
    alias sound-service-0-0 es1371
elseif -f /etc/sysconfig/sound-0.alsa
    alias snd-card-0 snd-ens1371
    	below snd-card-0 snd-pcm-oss
    alias sound-slot-0 snd-card-0
    alias sound-service-0-0 snd-mixer-oss
    alias sound-service-0-1 snd-seq-oss
    alias sound-service-0-3 snd-pcm-oss
    alias sound-service-0-8 snd-seq-oss
    alias sound-service-0-12 snd-pcm-oss
endif
                                                                                                                   
if     -f /etc/sysconfig/sound-1.oss
    alias sound-slot-1 via82cxxx_audio
    alias sound-service-1-0 via82cxxx_audio
elseif -f /etc/sysconfig/sound-1.alsa
    alias snd-card-1 snd-via82xx
    	below snd-card-1 snd-pcm-oss
    alias sound-slot-1 snd-card-1
    alias sound-service-1-0 snd-mixer-oss
    alias sound-service-1-1 snd-seq-oss
    alias sound-service-1-3 snd-pcm-oss
    alias sound-service-1-8 snd-seq-oss
    alias sound-service-1-12 snd-pcm-oss
endif

-- 
Serge Ryabchun sr@osdn.org.ua



             reply	other threads:[~2003-09-25  9:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-25  9:52 Serge Ryabchun [this message]
2003-09-26  8:28 ` Stanislav Ievlev
2003-09-26  9:01   ` Serge Ryabchun

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=Pine.LNX.4.33.0309251117070.23543-100000@kvazar.bank.i-net \
    --to=sr@osdn.org.ua \
    --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