ubuntu10.04插入耳塞还有外音问题解决的过程

来源:互联网 发布:绝世秘籍辅助软件 编辑:程序博客网 时间:2024/04/28 21:51
        纠结了很久,大概有三四天,我的ubuntu10.04一直没有解决电脑插上耳塞后还有外音的问题,今天我又开机在弄这个缺陷了。看到网上一个帖子是这样的:
    注意:红色部分为要在终端输入的命令。
    Ubuntu Lucid Lynx 10.04 is coming by default with the version 1.0.21 of Alsa so I decided to upgrade to the last version wich is 1.0.23.
    According to Wikipedia, Alsa is a Linux kernel component intended to replace the original Open Sound System (OSS) for providing device drivers for sound cards. Some of the goals of the ALSA project at its inception were automatic configuration of sound-card hardware, and graceful handling of multiple sound devices in a system, goals which it has largely met.

    To do this, we must begin by determining our version of alsa as follows :

cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.21.

    To avoid problems during the upgrade of Alsa-utils, we need to stop it with the following command :

sudo /sbin/alsa-utils stop
We must then install the necessary tools to compile along with the kernel headers :

sudo apt-get -y install build-essential ncurses-dev gettext xmlto libasound2-dev
sudo apt-get -y install linux-headers-`uname -r` libncursesw5-dev


    Then, we go in our personal folder and download alsa-driver, alsa-lib and alsa-utils :

cd ~
rm -rf ~/alsa* ~/.pulse*
wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.23.tar.bz2
wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.23.tar.bz2
wget ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.23.tar.bz2


    After that, we create a new folder for the compilation and installation of the 3 files. Then, we move the 3 tar files that we just downloaded in this folder :

sudo rm -rf /usr/src/alsa
sudo mkdir -p /usr/src/alsa
cd /usr/src/alsa
sudo cp ~/alsa* .


    Unpack the 3 tar files :

sudo tar xjf alsa-driver*
sudo tar xjf alsa-lib*
sudo tar xjf alsa-utils*


    We compile and install alsa-driver :

cd alsa-driver*
sudo ./configure
sudo make
sudo make install

    We compile and install alsa-lib :

cd ../alsa-lib*
sudo ./configure
sudo make
sudo make install


    We compile and install alsa-utils :

cd ../alsa-utils*
sudo ./configure
sudo make
sudo make install


    Then, we remove the 3 tar files in our personal folder that are not anymore necessary :

rm -f ~/alsa-driver*
rm -f ~/alsa-lib*
rm -f ~/alsa-utils*


    Then, just restart your computer and your alsa version should be 1.0.23!

    You can verify that you have now indeed have this version of alsa :

cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.23.
Compiled on May 2 2010 for kernel 2.6.32-21-generic (SMP).

    Just to be sure everything is well configured, execute this command :

sudo alsaconf

    and reboot again!
    看到这样一个帖子,我大喜,因为我一直在找升级声卡驱动的方法,这正是我要找的方法,但是同时我发现升级这个驱动要花很长时间的,我担心我的校园网能不能快点,否则不知道要升级多久。但是无论如何我还是开始了这个进程,花了大概四个小时才完成,如果我用的ADSL,应该是两个钟左右就可以了。但是我重启电脑后还是没有什么改变,我的情绪又跌落到深渊,我重新找了原来的方法,结果找到这样一个帖子:
    哎呀呀,困扰已久的问题解决了
下载最新的alsa驱动(1.0.23)
编译安装
然后解压后找到alsa/alsa-kernel/Documentation
我的声卡是intel-hda,芯片是conexant
不知道的同学可以在终端下输入alsamixer,card和chip后的名称则分别是声卡和芯片
在刚才提到的目录下找到hd-audio-models文件,
从其中找到conexant相关内容
我直接选择了model=ideapad
(即在/etc/modprobe.d/alsa-base.conf中添加
options snd-hda-intel model =ideapad)
然后保存,退出,重启,插上耳机,外放就没有声音了
呼呼,以后就可以呆着耳机听歌不妨碍别人啦~~~~

    我又一次喜悦了起来,因为原来我按照这个帖子上的方法没有成功,我归结于是因为我没有升级alsa驱动的缘故,而现在我花了一个下午的时间来升级它,哈哈,这次还不行吗?我就按照上面的方法去做了,然后重启电脑,但是还是没有什么改善,更有甚者,连耳塞都没有什么声音了(以前是有外音但是耳塞有声音)!!!!我再一次绝望。
    然后我去了终端去输入alsamixer试图调节声音输出,但是出来一个找不到文件!我无语。然后我认真看了一下复制过去的代码——options snd-hda-intel model =ideapad,我把它于前面的代码对比了一下,发现一个地方很有疑问,那就是model后面的空格!!!我觉得这个可能不小心的误差,于是我去到那个修改过的文件,把那个空格去了,然后保存,退出重启电脑,我插上了耳塞开机,没有了开机声音!!这是好的先兆,我打开了Rythmbox,导入歌曲播放,没有外音!!!塞上耳塞,有声音!!哈哈,我的天,终于在纠结了三四天的时候解决了这个最头痛的问题,终于不用担心晚上用不了ubuntu了,前几天都是把声音关了才能用的,哈哈哈。我高兴到叫我的舍友去睡觉了,这次绝对不会吵到他睡觉了。
原创粉丝点击