荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: cycker (still), 信区: Linux
标  题: unstable debian安装历程(8)zz
发信站: 荔园晨风BBS站 (Sat Mar 13 10:53:24 2004), 站内信件

http://www.linuxsir.com/bbs/showthread.php?s=&threadid=9940
我的unstable debian安装历程[八][原创:JiRen兄]
八.安装alsa

一)下载:
(以下alsa的使用抄自某位网友大作)
1:在Linux里面装载含有此文件的Windows分区,
输入命令:
“mount -t vfat /dev/hadx /win98 ”其中hdax中的“x”是Win98硬盘分区号码
。如果对此有任何疑问,请请教其他熟悉的朋友。
2:进入下载的目录,把alsa-driver-0.5.9b.tar.bz2和其它两个文件拷贝到一子
目录中,
输入命令:
“cp alsa-driver-0.5.9* /root”
3:解压缩文件。
输入命令:
“bzip2 -dv alsa-driver-0.5.9b.tar.bz2”
此时用“ls”命令查看,当前目录里面只有alsa-driver-0.5.9b.tar,说明bzip压
缩已经解除。
输入命令:
“tar vfx alsa-driver-0.5.9b.tar”
  程序自动生成一个名为---alsa-driver-0.5.9b的子目录。
  对其它两个软件包重复此步骤,解开压缩。使用“ls”命令查看,就会发现相
应的目录了。
  如果你对命令行不够熟悉,可以查看帮助信息和书籍。也可以启动X-Window窗
口环境,在文件管理程序里面选择相应压缩文件,然后在文件菜单里面选择解压缩
命令就可以了。

二)安装驱动文件。
1:打开内核中的声卡支持。
绝大多数情况下,此步骤可以忽略,因为基本所有Linux发行版本内核默认状态都
是支持声卡设备的。
2:运行脚本。
输入命令:
“./configure”
如果你的声卡属于ISA即插即用类型,请输入下面的命令:
“./configure --with-isapnp=yes”
输入命令:
“make install”
注意此步骤操作时间较长,请耐心等候。如果一切正常,程序最后会提示模块编译
成功!并且警告声卡默认的状态是静音,需要使用“amixer”等实用程序调节音量

“amixer”等命令正是alsa-utils-0.5.9a.tar.bz2附带的,需要编译才能使用。

如果make命令不能执行,那么你需要找出Linux安装盘,把有关开发编译的文件包
安装进系统。具体操作请参考软件手册。
输入命令:
“./snddevices”
脚本程序会在“/dev“目录自动创建有关声卡设备。

三)安装库文件和实用程序。
由于“amixer”等程序需要找到对应的库文件才能编译,所以需要首先安装
alsa-lib-0.5.9.tar.bz2。
进入相应的子目录alsa-lib-0.5.9,
输入命令:
“./configure”
输入命令:
“make install”
这两步做好后,回到上层目录,进入alsa-utils-0.5.9a子目录,
输入命令:
“./configure”
输入命令:
“make install”
注意,如果上面步骤中“./configure”出错,恐怕你需要使用“-prefix”参数来
指定路径。
如:在安装库文件时尝试使用“./configure -prefix=/usr/include/linux”
在安装实用程序时尝试“./configure -prefix=/usr/include/sys”

四)编辑/etc/modules.conf文件

五)系统测试和声卡设备调整
1:编辑好/etc/modules.conf文件后,需要使用系统程序测试模块是否可以正常加
载。
输入命令:
“modprobe snd-card-ymfpci”
系统直接进入提示符状态,表明加载正常。不过,如果你搞不清到底加载什么模块
,可以去/lib/modules/2.2.13/misc下面去查看,可加载声卡模块都在里面。凭借
模块名字就可以知道自己需要什么文件了。
2:调节音量。
输入命令:
“amixer”
  这表明声卡驱动默认状态是静音,所以需要使用程序调节合适的音量。
  本来使用“amixer”命令可以手工指定参数,进行音量调整。不过,为了不至
于把跟随此文一直到现在,大脑可能一直糊里糊涂的朋友们吓跑,可以尝试使用下
面的办法,非常方便。
输入命令:
“alsamixer”
你是否看到一个图形界面?按F1可以察看帮助信息。注意每个竖条都代表你的声卡
特性。使用 上下左右 光标键,可以很容易的调节每种特性的音量。上下光标调数
量,比如,我把他们都调到了“74”,左右光标切换竖条。调好之后,按“ESC”
键退出。
再输入命令:
“amixer“
你会发现你的调整已经起作用了
3:存储配置参数。
因为刚才的调整不是永久性的,下次重新启动时,又成了静音状态。所以,需要把
参数存储起来。
输入命令:
“ alsactl store”
程序自动的建立了配置文件---“/etc/asound.conf“。如果对修改后的配置不满
意,可以使用:
“alsactl restore”恢复。

有时alsamixer和alsactl不可用,那就用aumix或gmix吧。

我的modules.conf(看最后两行,我的声卡是AC97板载via8233):


源码:
------------------------------------------------------------------------
--------
### This file is automatically generated by update-modules"
#
# Please do not edit this file directly. If you want to change or add
# anything please take a look at the files in /etc/modutils and read
# the manpage for update-modules.
#
### update-modules: start processing /etc/modutils/0keep
# DO NOT MODIFY THIS FILE!
# This file is not marked as conffile to make sure if you upgrade
modutils
# it will be restored in case some modifications have been made.
#
# The keep command is necessary to prevent insmod and friends from
ignoring
# the builtin defaults of a path-statement is encountered. Until all
other
# packages use the new `add path'-statement this keep-statement is
essential
# to keep your system working
keep

### update-modules: end processing /etc/modutils/0keep

### update-modules: start processing /etc/modutils/actions
# Special actions that are needed for some modules

# The BTTV module does not load the tuner module automatically,
# so do that in here
post-install bttv insmod tuner
post-remove bttv rmmod tuner


### update-modules: end processing /etc/modutils/actions

### update-modules: start processing /etc/modutils/aliases
# Aliases to tell insmod/modprobe which modules to use

# Uncomment the network protocols you don't want loaded:
# alias net-pf-1 off            # Unix
# alias net-pf-2 off            # IPv4
# alias net-pf-3 off            # Amateur Radio AX.25
# alias net-pf-4 off            # IPX
# alias net-pf-5 off            # DDP / appletalk
# alias net-pf-6 off            # Amateur Radio NET/ROM
# alias net-pf-9 off            # X.25
# alias net-pf-10 off           # IPv6
# alias net-pf-11 off           # ROSE / Amateur Radio X.25 PLP
# alias net-pf-19 off           # Acorn Econet

alias char-major-10-175 agpgart
alias char-major-10-200 tun
alias char-major-81     bttv
alias char-major-108    ppp_generic
alias /dev/ppp          ppp_generic
alias tty-ldisc-3       ppp_async
alias tty-ldisc-14      ppp_synctty
alias ppp-compress-21   bsd_comp
alias ppp-compress-24   ppp_deflate
alias ppp-compress-26   ppp_deflate

# Crypto modules (see http://www.kerneli.org/)
alias loop-xfer-gen-0   loop_gen
alias loop-xfer-3       loop_fish2
alias loop-xfer-gen-10  loop_gen
alias cipher-2          des
alias cipher-3          fish2
alias cipher-4          blowfish
alias cipher-6          idea
alias cipher-7          serp6f
alias cipher-8          mars6
alias cipher-11         rc62
alias cipher-15         dfc2
alias cipher-16         rijndael
alias cipher-17         rc5


### update-modules: end processing /etc/modutils/aliases

### update-modules: start processing /etc/modutils/paths
# This file contains a list of paths that modprobe should scan,
# beside the once that are compiled into the modutils tools
# themselves.


### update-modules: end processing /etc/modutils/paths

### update-modules: start processing /etc/modutils/ppp
alias /dev/ppp          ppp_generic
alias char-major-108    ppp_generic
alias tty-ldisc-3       ppp_async
alias tty-ldisc-14      ppp_synctty
alias ppp-compress-21   bsd_comp
alias ppp-compress-24   ppp_deflate
alias ppp-compress-26   ppp_deflate

### update-modules: end processing /etc/modutils/ppp

### update-modules: start processing /etc/modutils/setserial
#
# This is what I wanted to do, but logger is in /usr/bin, which isn't
loaded
# when the module is first loaded into the kernel at boot time!
#
#post-install serial /etc/init.d/setserial start | logger -p daemon.info
 -t "setserial-module reload"
#pre-remove serial /etc/init.d/setserial stop | logger -p daemon.info -t
 "setserial-module uload"
#
alias /dev/tts          serial
alias /dev/tts/0        serial
alias /dev/tts/1        serial
alias /dev/tts/2        serial
alias /dev/tts/3        serial
post-install serial /etc/init.d/setserial modload > /dev/null 2>
/dev/null
pre-remove serial /etc/init.d/setserial modsave  > /dev/null 2>
/dev/null

### update-modules: end processing /etc/modutils/setserial

### update-modules: start processing /etc/modutils/arch/i386
alias parport_lowlevel parport_pc
alias char-major-10-144 nvram
alias binfmt-0064 binfmt_aout
alias char-major-10-135 rtc

### update-modules: end processing /etc/modutils/arch/i386
#BJR:
above snd-via8233 snd-pcm-oss
alias sound-slot-0 snd-via8233

--
i want to live
like animals.
careless and free
like animals.
i want to live.
i want to run through the jungle the wind in my hair and the sand at my feet.

※ 来源:·荔园晨风BBS站 bbs.szu.edu.cn·[FROM: 192.168.36.98]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店