声音搞定(790gx,netbsd5。02)
发表于 : 2010-06-06 9:25
今天在netbsd5。02上试试openbsd4。6上的老方法,居然管用(虽然openbsd4。6无效)
这是我的主板关于声卡部分:
audio0 at azalia0: full duplex, independent
audio1 at azalia1: full duplex, independent
audio2 at pad0: half duplex
azalia0 at pci1 dev 0 function 1: Generic High Definition Audio Controller
azalia0: codec[0]: ATI R600 HDMI (rev. 1.0), HDA rev. 1.0
azalia0: host: 0x1002/0xaa30 (rev. 0), HDA rev. 1.0
azalia0: interrupting at ioapic0 pin 19
azalia1 at pci0 dev 20 function 2: Generic High Definition Audio Controller
azalia1: host: 0x1002/0x4383 (rev. 0), HDA rev. 1.0
azalia1: interrupting at ioapic0 pin 16
方法如下:
1) dmesg | grep -i audio 找到声卡
2) ls -lh /dev/audio*
可能得到如下结果:
lrwxr-xr-x 1 root wheel 6B Jun 6 08:34 /dev/audio -> audio0
crw-rw-rw- 1 root wheel 42, 128 Jun 4 16:21 /dev/audio0
crw-rw-rw- 1 root wheel 42, 129 Jun 6 08:47 /dev/audio1
crw-rw-rw- 1 root wheel 42, 130 May 30 23:16 /dev/audio2
crw-rw-rw- 1 root wheel 42, 131 May 30 23:16 /dev/audio3
lrwxr-xr-x 1 root wheel 9B Jun 6 08:35 /dev/audioctl -> audioctl0
crw-rw-rw- 1 root wheel 42, 192 May 30 23:16 /dev/audioctl0
crw-rw-rw- 1 root wheel 42, 193 May 30 23:16 /dev/audioctl1
crw-rw-rw- 1 root wheel 42, 194 May 30 23:16 /dev/audioctl2
crw-rw-rw- 1 root wheel 42, 195 May 30 23:16 /dev/audioctl3
“/dev/audio -> audio0,/dev/audioctl -> audioctl0”这是关键的,表示系统默认的声音设备是audio0,可是
audio0 at azalia0: full duplex, independent
azalia0 at pci1 dev 0 function 1: Generic High Definition Audio Controller
azalia0: codec[0]: ATI R600 HDMI (rev. 1.0), HDA rev. 1.0
注意到没有,audio0,指的是,790gx主板上“ATI R600 HDMI”,也就是集成显卡hd330所带的声卡,而市面上大多数790gx,780gx主板还带了自己声卡,比如想我的主板"azalia1: codec[0]: Realtek ALC888 (rev. 0.1), HDA rev. 1.0"就有装了Realtek ALC888。
3)
a) cd /dev
b) sudo ln -sf audio1 audio
sudo ln -sf audioctl1 audioctl
sudo ln -sf mixer1 mixer
sudo ln -sf sound1 sound
4) 测试
cat /dev/urandom > /dev/audio
cat /dev/urandom > /dev/sound
如果听到声音,就OK了,提醒一下,在xorg,图形桌面下能没有声音,那是他没有该过来,我怀疑是xorg,缓冲了/dev/* 设备,重启电脑就好了。还有 /dev/urandom指的是一个新的随机数产生器,用以改进原来的/dev/random,原来看netbsd手册他说:cat filename > /dev/audio 可是对于我这种新手小白来说,那里找到声音文件,普通文件往往又发不了声音,还是 /dev/urandom好使。
5) 如国 3)出错了,补救方法
cd /dev
sudo ./MAKEDEV all(他将重建系统硬件设备)
后记:为什么 openbsd4。6,这种方法无效呢。奇怪!!!
这是我的主板关于声卡部分:
audio0 at azalia0: full duplex, independent
audio1 at azalia1: full duplex, independent
audio2 at pad0: half duplex
azalia0 at pci1 dev 0 function 1: Generic High Definition Audio Controller
azalia0: codec[0]: ATI R600 HDMI (rev. 1.0), HDA rev. 1.0
azalia0: host: 0x1002/0xaa30 (rev. 0), HDA rev. 1.0
azalia0: interrupting at ioapic0 pin 19
azalia1 at pci0 dev 20 function 2: Generic High Definition Audio Controller
azalia1: host: 0x1002/0x4383 (rev. 0), HDA rev. 1.0
azalia1: interrupting at ioapic0 pin 16
方法如下:
1) dmesg | grep -i audio 找到声卡
2) ls -lh /dev/audio*
可能得到如下结果:
lrwxr-xr-x 1 root wheel 6B Jun 6 08:34 /dev/audio -> audio0
crw-rw-rw- 1 root wheel 42, 128 Jun 4 16:21 /dev/audio0
crw-rw-rw- 1 root wheel 42, 129 Jun 6 08:47 /dev/audio1
crw-rw-rw- 1 root wheel 42, 130 May 30 23:16 /dev/audio2
crw-rw-rw- 1 root wheel 42, 131 May 30 23:16 /dev/audio3
lrwxr-xr-x 1 root wheel 9B Jun 6 08:35 /dev/audioctl -> audioctl0
crw-rw-rw- 1 root wheel 42, 192 May 30 23:16 /dev/audioctl0
crw-rw-rw- 1 root wheel 42, 193 May 30 23:16 /dev/audioctl1
crw-rw-rw- 1 root wheel 42, 194 May 30 23:16 /dev/audioctl2
crw-rw-rw- 1 root wheel 42, 195 May 30 23:16 /dev/audioctl3
“/dev/audio -> audio0,/dev/audioctl -> audioctl0”这是关键的,表示系统默认的声音设备是audio0,可是
audio0 at azalia0: full duplex, independent
azalia0 at pci1 dev 0 function 1: Generic High Definition Audio Controller
azalia0: codec[0]: ATI R600 HDMI (rev. 1.0), HDA rev. 1.0
注意到没有,audio0,指的是,790gx主板上“ATI R600 HDMI”,也就是集成显卡hd330所带的声卡,而市面上大多数790gx,780gx主板还带了自己声卡,比如想我的主板"azalia1: codec[0]: Realtek ALC888 (rev. 0.1), HDA rev. 1.0"就有装了Realtek ALC888。
3)
a) cd /dev
b) sudo ln -sf audio1 audio
sudo ln -sf audioctl1 audioctl
sudo ln -sf mixer1 mixer
sudo ln -sf sound1 sound
4) 测试
cat /dev/urandom > /dev/audio
cat /dev/urandom > /dev/sound
如果听到声音,就OK了,提醒一下,在xorg,图形桌面下能没有声音,那是他没有该过来,我怀疑是xorg,缓冲了/dev/* 设备,重启电脑就好了。还有 /dev/urandom指的是一个新的随机数产生器,用以改进原来的/dev/random,原来看netbsd手册他说:cat filename > /dev/audio 可是对于我这种新手小白来说,那里找到声音文件,普通文件往往又发不了声音,还是 /dev/urandom好使。
5) 如国 3)出错了,补救方法
cd /dev
sudo ./MAKEDEV all(他将重建系统硬件设备)
后记:为什么 openbsd4。6,这种方法无效呢。奇怪!!!