Linux系统Debian下如何编译声卡驱动
安装Linux操作系统Debian时,也希望能够有娱乐的功能,所以声卡是不能少的,现在我把我在Debian编译声卡驱动的步骤整理出来,分享给大家.
惠普笔记本刚买来时,安装Debian 5,通常会遇到两个问题.
一个是无线网卡驱动没有安装,一个是“带上耳机可以听歌,但是喇叭无法发声”,对于前面一个问题,请参照文章 GNU小本无线上网-BCM4312驱动安装.
第二个问题,大部分是由于Debian 5的声卡驱动版本号太低,所以只要下载最新的声卡驱动,编译安装就能解决问题.
步骤如下:
1.到alsa主页下载最新驱动,并解压到当前目录,网址http://www.alsa-project.org,下载.
- alsa-driver-1.0.21.tar.bz2
- alsa-lib-1.0.21a.tar.bz2
- alsa-utils-1.0.21.tar.bz2
- $ pwd
- /home/c-aries/download/alsa
- $ ls
- alsa-driver-1.0.21.tar.bz2 alsa-lib-1.0.21a.tar.bz2 alsa-utils-1.0.21.tar.bz2
- $ tar xf alsa-driver-1.0.21.tar.bz2
- $ tar xf alsa-utils-1.0.21.tar.bz2
- $ tar xf alsa-lib-1.0.21a.tar.bz2
- $ ls -F
- alsa-driver-1.0.21/ alsa-lib-1.0.21a/ alsa-utils-1.0.21/
- alsa-driver-1.0.21.tar.bz2 alsa-lib-1.0.21a.tar.bz2 alsa-utils-1.0.21.tar.bz2
- $
2.安装必需的软件包,关闭声卡.
- $ sudo apt-get install build-essential ncurses-dev gettext xmlto linux-headers-`uname -r` libncursesw5-dev
- $ sudo /etc/init.d/alsa-utils stop
3.软链接相关的函数库,编译出错时才运行如下命令,如报错.
- checking for new_panel in -lpanelw... no
- configure: error: panelw library not found
链接命令:
- $ sudo ln -s libpanelw.so.5 /usr/lib/libpanelw.so
- $ sudo ln -s libformw.so.5 /usr/lib/libformw.so
- $ sudo ln -s libmenuw.so.5 /usr/lib/libmenuw.so
- $ sudo ln -s libncursesw.so.5 /lib/libncursesw.so
4.依次编译,安装alsa-driver,alsa-lib,alsa-utils.
- $ pwd
- /home/c-aries/download/alsa/alsa-driver-1.0.21
- $ ./configure
- $ make
- $ sudo make install
- $ pwd
- /home/c-aries/download/alsa/alsa-lib-1.0.21a
- $ ./configure //phpfensi.com
- $ make
- $ sudo make install
#需要编译安装了alsa-driver和alsa-lib后才能编译alsa-utils,否则运行configure时会报错.
- $ pwd
- /home/c-aries/download/alsa/alsa-utils-1.0.21
- $ ./configure
- $ make
- $ sudo make install
5.重启系统,查看声卡驱动版本号.
- $ cat /proc/asound/version
- Advanced Linux Sound Architecture Driver Version 1.0.21.
- Compiled on Dec 9 2009 for kernel 2.6.26-2-686 (SMP).
- $
6.配置声卡,调节音量.
- #关闭声卡
- $ sudo /etc/init.d/alsa-utils stop
- #配置声卡,选择声卡进行配置,我部小本选择了hda-intel
- $ sudo alsaconf
- #调节音量,将Master和PCM都调到100,外置喇叭声音非常大>_<
- #提示:按m键,如Master下面出现OO标志,说明该选项可以使用;再按一次m键,如Master下面出现MM标志,说明该选项被禁用
- $ alsamixer
Linux系统Debian下如何编译声卡驱动.
参考资源:
1.Upgrade Alsa (1.0.21) on Ubuntu Jaunty 9.04 | To a free world
http://monespaceperso.org/blog-en/2009/08/31/upgrade-alsa-1-0-21-on-ubuntu-jaunty-9-04/