代码改变世界

ubuntu 10.04 无声 之解决办法

2010-06-21 23:39  马克曼  阅读(261)  评论(0)    收藏  举报

 

一直在 用 Ubuntu, 最近看世界杯,但是一只没有声音,搜索一下,重新编译驱动就行了.

如下步骤:

1) Make sure the package “build-essentials” is installed

2) 打开终端:
$ wget -c ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/misc/hda-verb/hda-verb-0.3.tar.gz

 


$ tar vxzf hda-verb-0.3.tar.gz
$ cd hda-verb-0.3/
$ make
gcc -Wall -O2 -g -c -o hda-verb.o hda-verb.c
gcc -o hda-verb hda-verb.o

 

3) run your “hda-verb”:
$ ./hda-verb /dev/snd/hwC0D0 0×1a 0×701 0
$ ./hda-verb /dev/snd/hwC0D0 0×1b 0×701 0
现在就有声音了!

4) add two lines in /etc/rc.local, so that they’ll be automatically applied when booting:

/path/to/hda-verb /dev/snd/hwC0D0 0×1a 0×701 0
/path/to/hda-verb /dev/snd/hwC0D0 0×1b 0×701 0
Remember to replace “/path/to/hda-verb” with the actual full path of your “hda-verb”.

More details: https://bugs.launchpad.net/ubuntu/+source/alsa-driver/+bug/582199

 

写成脚本开机启动:

echo "dell"|sudo -S /usr/local/src/hda-verb /dev/snd/hwC0D0 0x1a 0x701 0

echo "dell"|sudo -S /usr/local/src/hda-verb /dev/snd/hwC0D0 0x1b 0x701 0