LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 2494|回复: 2

我的unstable debian安装历程[八][原创:JiRen兄]

[复制链接]
发表于 2002-10-18 00:16:25 | 显示全部楼层 |阅读模式
八.安装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):

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

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

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

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


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

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

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

  38. alias char-major-10-175        agpgart
  39. alias char-major-10-200        tun
  40. alias char-major-81        bttv
  41. alias char-major-108        ppp_generic
  42. alias /dev/ppp                ppp_generic
  43. alias tty-ldisc-3        ppp_async
  44. alias tty-ldisc-14        ppp_synctty
  45. alias ppp-compress-21        bsd_comp
  46. alias ppp-compress-24        ppp_deflate
  47. alias ppp-compress-26        ppp_deflate

  48. # Crypto modules (see [url]http://www.kerneli.org/[/url])
  49. alias loop-xfer-gen-0        loop_gen
  50. alias loop-xfer-3        loop_fish2
  51. alias loop-xfer-gen-10        loop_gen
  52. alias cipher-2                des
  53. alias cipher-3                fish2
  54. alias cipher-4                blowfish
  55. alias cipher-6                idea
  56. alias cipher-7                serp6f
  57. alias cipher-8                mars6
  58. alias cipher-11                rc62
  59. alias cipher-15                dfc2
  60. alias cipher-16                rijndael
  61. alias cipher-17                rc5


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

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


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

  68. ### update-modules: start processing /etc/modutils/ppp
  69. alias /dev/ppp          ppp_generic
  70. alias char-major-108    ppp_generic
  71. alias tty-ldisc-3       ppp_async  
  72. alias tty-ldisc-14      ppp_synctty
  73. alias ppp-compress-21   bsd_comp   
  74. alias ppp-compress-24   ppp_deflate
  75. alias ppp-compress-26   ppp_deflate

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

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

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

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

  98. ### update-modules: end processing /etc/modutils/arch/i386
  99. #BJR:
  100. above snd-via8233 snd-pcm-oss
  101. alias sound-slot-0 snd-via8233
复制代码
发表于 2002-10-18 00:58:04 | 显示全部楼层
alsa没有这么麻烦啦!
比如我的声卡为ac97 集成intel8x0
1. apt-get alsa-drivers alsa-utils
2. 修改/etc/modutils/alsa文件加入
alias snd-card-0  snd-intel8x0
3.更新模块
update-modules
4.启动/etc/init.d/alsasound start
update-rc.d alsasound default
发表于 2003-3-5 23:45:45 | 显示全部楼层
unstable 是没有 driver 这个包的,只好自己编译。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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