LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
123
返回列表 发新帖
楼主: admint

怎样装ac97的声卡

[复制链接]
发表于 2002-8-3 09:52:06 | 显示全部楼层

alsa安装

首先去www.alsa-project.org ,下载需要的alsadriver

  ALSA目前最新版本是0.5.10b,文件全名是alsa-driver-0.5.10b.tar.bz2。采用的新的bz2压缩格式,占用空间更小。除了它之外,正常操作还需要下面的软件包:


alsa-utils-0.5.10a.tar.bz2----------实用程序包


alsa-lib-0.5.10.tar.bz2-------------编译实用程序需要的库文件


  如果你是使用Windows操作系统下载的软件,那么需要把它拷贝到Linux系统里面。


  首先请使用root用户登录并开始安装过程。


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:建立modules.conf文件。


因为系统里面有一个演示文件,所以只要复制一份,重新修改即可


输入命令:


“cp modules.conf.sample modules.conf”


2:修改modules.conf。


使用任何一种文本编辑器,如VI,打开此文件,在最下面加入下列内容:





#ALSA portion


alias char-major-116 snd


#注释:ALSA使用的主设备号码


alias snd-card-0 snd-card-ymfpci


#snd-card-0是系统里面第一个声卡设备,如果系统有两个以上声卡,


#可以使用snd-card-1 snd-card-2等方法映射


# snd-card-ymfpci是声卡设备名称.


#OSS /free portion----因为ALSA需要内核中OSS SoundCore和其它设备的支持


alias char-major-14 soundcore


#系统中soundcore的主设备号码


alias sound-slot-0 snd-card-0


#第一个声卡对应的插槽


#下面是声卡驱动模块,sound-service-0指第一块声卡,如果系统里面只有一块,原封不动#拷贝即可.否则按照此格式加入其它声卡驱动模块


#card #1


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


#ISA声卡还需要指定IRQ/IO地址,因为市场上已经很少,在此不再探讨。有需要可以查


#看此软件的相关说明。





六:系统测试和声卡设备调整。


1:编辑好/etc/modules.conf文件后,需要使用系统程序测试模块是否可以正常加载。


输入命令:


“modprobe snd-card-ymfpci”


系统直接进入提示符状态,表明加载正常。不过,如果你搞不清到底加载什么模块,可以去/lib/modules/2.2.13/misc下面去查看,可加载声卡模块都在里面。凭借模块名字就可以知道自己需要什么文件了。


2:调节音量。


输入命令:


“amixer”


命令提示如下:





Capabilities: volume

Channels: Front-Left Front-Right

Limits: min = 0, max = 16383

Front-Left: 0 [0%] [on] [---]

Front-Right: 0 [0%] [on] [---]

Group ADC Record,0

Capabilities: volume

Channels: Front-Left Front-Right

Limits: min = 0, max = 16383

Front-Left: 0 [0%] [on] [---]

Front-Right: 0 [0%] [on] [---]

Group Capture Volume,0

Capabilities: volume

Channels: Front-Left Front-Right

Limits: min = 0, max = 16383

Front-Left: 0 [0%] [on] [---]

Front-Right: 0 [0%] [on] [---]

Group Input Gain,0

Capabilities: volume mute jointly-mute

Channels: Front-Left Front-Right

Limits: min = 0, max = 15

Front-Left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

Group Master Mono,0

Capabilities: volume mute capture exclusive-capture

Capture exclusive group: 1

Channels: Front-Left Front-Right

Limits: min = 0, max = 31

Front-Left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

Group Master,0

Capabilities: volume mute jointly-mute capture exclusive-capture

Capture exclusive group: 1

Channels: Front-Left Front-Right

Limits: min = 0, max = 31

Front-Left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

Group Aux,0

Capabilities: volume mute jointly-mute capture exclusive-capture

Capture exclusive group: 1

Channels: Front-Left Front-Right

Limits: min = 0, max = 31

Front-Left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

Group Video,0

Capabilities: volume mute jointly-mute capture exclusive-capture

Capture exclusive group: 1

Channels: Front-Left Front-Right

Limits: min = 0, max = 31

Front-Left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

Group CD,0

Capabilities: volume mute jointly-mute capture exclusive-capture

Capture exclusive group: 1

Channels: Front-Left Front-Right

Limits: min = 0, max = 31

Front-Left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

Group Line,0

Capabilities: volume mute jointly-mute capture exclusive-capture

Capture exclusive group: 1

Channels: Front-Left Front-Right

Limits: min = 0, max = 31

Front-Left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

Group MIC,0

Capabilities: volume mute capture exclusive-capture

Capture exclusive group: 1

Channels: Front-Left Front-Right

Limits: min = 0, max = 31

Front-Left: 0 [0%] [mute] [capture]

Front-Right: 0 [0%] [mute] [capture]

Group Phone,0

Capabilities: volume mute capture exclusive-capture

Capture exclusive group: 1

Channels: Front-Left Front-Right

Limits: min = 0, max = 31

Front-Left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

Group PC Speaker,0

Capabilities: volume mute

Channels: Front-Left Front-Right

Limits: min = 0, max = 15

Front-Left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

Group PCM,0

Capabilities: volume mute jointly-mute

Channels: Front-Left Front-Right

Limits: min = 0, max = 31

Front-Left: 0 [0%] [mute] [---]

Front-Right: 0 [0%] [mute] [---]

发表于 2002-8-3 10:04:33 | 显示全部楼层
辛苦了,兄弟。。。。
多谢!!
发表于 2002-8-5 13:11:20 | 显示全部楼层

我在安装库文件和实用程序时出现了如下问题,望指点.

[root@KING root]# modprobe snd-card-ymfpci
modprobe: Can't locate module snd-card-ymfpci
[root@KING root]# amixer
bash: amixer: command not found
[root@KING root]# cd /tmp/sound/
[root@KING sound]# ls
alsa-driver-0.9.0beta12          alsa-lib-0.9.0rc1
alsa-driver-0.9.0beta12.tar.bz2  alsa-lib-0.9.0rc1.tar.bz2
alsa-driver-0.9.0rc1             alsa-utils-0.9.0beta12
alsa-driver-0.9.0rc1.tar.bz2     alsa-utils-0.9.0beta12.tar.bz2
alsa-lib-0.9.0beta12             alsa-utils-0.9.0rc1
alsa-lib-0.9.0beta12.tar.bz2     alsa-utils-0.9.0rc1.tar.bz2
[root@KING sound]# cd alsa-lib-0.9.0rc1
[root@KING alsa-lib-0.9.0rc1]# ls
acinclude.m4  config.cache  configure.in  INSTALL     Makefile.am    test
aclocal.m4    config.guess  COPYING       install-sh  Makefile.in    TODO
aserver       config.log    cvscompile    libtool     missing        utils
ChangeLog     config.sub    doc           ltconfig    mkinstalldirs  version
confdefs.h    configure     include       ltmain.sh   src
[root@KING alsa-lib-0.9.0rc1]# make
make: *** No targets specified and no makefile found.  Stop.
[root@KING alsa-lib-0.9.0rc1]# make install
make: *** No rule to make target `install'.  Stop.
[root@KING alsa-lib-0.9.0rc1]# ./configure
loading cache ./config.cache
checking host system type... configure: error: can not guess host type; you must specify one
[root@KING alsa-lib-0.9.0rc1]# ./configure -prefix=/usr/include/linux
loading cache ./config.cache
checking host system type... configure: error: can not guess host type; you must specify one
[root@KING alsa-lib-0.9.0rc1]#
发表于 2002-8-5 13:37:54 | 显示全部楼层

看一下这个文章可能对兄弟有所启发

发表于 2002-8-5 14:56:49 | 显示全部楼层
北南兄,你链接的那片帖子不够全,还是这页的water01兄写的全一点,可惜多出来的那几步过不去,也跳不过去.
发表于 2002-8-5 15:11:07 | 显示全部楼层
sh ./configure
试一下,有问题再发帖
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表