LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: inness2006

请教:有没有办法提高alsa音质?

[复制链接]
发表于 2006-11-16 18:25:05 | 显示全部楼层
我试着重新换了份~/.asoundrc文件,效果就好很多了。
以前用的那个.asoundrc文件太简单了,仅仅能达到有声音而已,后来我在www.gentoo-wiki.com上找到howo alsa complete那篇文章,把后边那个intel810的.asoundrc文件复制过来,效果大改。
杂音爆音都没了,建议lz也更新.asoundrc文件吧。

Post by inness2006
谢谢各位的建议。
4front那个驱动待会儿去下来试试看。要是还不行,也就只能先这么凑合了。
回复 支持 反对

使用道具 举报

发表于 2006-11-16 18:25:24 | 显示全部楼层
在这个链接里
http://gentoo-wiki.com/HOWTO_ALSA_Complete_%28includes_dmix%29
Post by inness2006
谢谢各位的建议。
4front那个驱动待会儿去下来试试看。要是还不行,也就只能先这么凑合了。
回复 支持 反对

使用道具 举报

发表于 2006-11-16 18:45:19 | 显示全部楼层
Another complex example for nvidia nforce(2) boards (intel8x0) - while the above solution didn't work for me, the following does. (taken from forum.hardware.fr (thread in french language).

This probably works better on the nVidia chips because the codecs don't properly support 44k1 output; they work much more reliably at 48kHz.

  1. ~/.asoundrc
  2. pcm.nforce-hw {
  3.         type hw
  4.         card 0
  5. }
  6. pcm.!default {
  7.         type plug
  8.         slave.pcm "nforce"
  9. }
  10. pcm.nforce {
  11.         type dmix
  12.         ipc_key 1234
  13.         ipc_perm 0660
  14.         slave {
  15.                 pcm "hw:0,0"
  16.                 period_time 0
  17.                 period_size 1024
  18.                 buffer_size 4096
  19.                 #rate 44100
  20.                 rate 48000
  21.         }
  22. }
  23. ctl.nforce-hw {
  24.         type hw
  25.         card 0
  26. }
复制代码
Have a look at Hardware Related Configs below on this page for more configs. **

复制过来,方便看。
回复 支持 反对

使用道具 举报

发表于 2006-11-16 19:11:10 | 显示全部楼层
$ cat .asoundrc
# Aliases
pcm.intel8x0 {
    type hw
    card 0
}

ctl.intel8x0 {
    type hw
    card 0
}

# Output stuff
pcm.dmixed {
    type dmix
    ipc_key 1024
    ipc_key_add_uid yes
    slave {
        pcm "intel8x0"
        period_time 0
        period_size 512
        buffer_size 8192
        rate 48000
    }
    bindings {
        0 0
        1 1
    }
}

# Input stuff
pcm.dsnooped {
    type dsnoop
    ipc_key 1027
    ipc_key_add_uid yes
    slave {
        pcm "intel8x0"
        period_time 0
        period_size 256
        buffer_size 4096
        rate 48000
    }
    bindings {
        0 0
        1 1
    }
}

# Full-duplex stuff
pcm.asymed {
    type asym
    playback.pcm "dmixed"
    capture.pcm "dsnooped"
}

ctl.asymed {
    type hw
    card 0
}

# Default ALSA device stuff
pcm.!default {
    type plug
    slave.pcm "asymed"
}

# OSS (aoss) stuff
pcm.dsp0 {
    type plug
    slave.pcm "asymed"
}

ctl.mixer0 {
    type hw
    card 0
}
回复 支持 反对

使用道具 举报

发表于 2006-11-16 21:16:12 | 显示全部楼层
这是我的
主板是华硕的P4SD,声卡是集成的intel 5.1 channel

# Set default sound card
# Useful so that all settings can be changed to a different card here.
pcm.snd_card {
      type hw
      card 0
      device 0
}

# Allow mixing of multiple output streams to this device
pcm.output {
    type dmix
    ipc_key 1024
    ipc_perm 0660 # Sound for everybody in your group!
    slave.pcm "snd_card"

    slave {
        # This stuff provides some fixes for latency issues.
        # buffer_size should be set for your audio chipset.
        period_time 0
        period_size 1024
        buffer_size 8192
    }
   
    bindings {
        0 0
        1 1
    }
}

# Allow reading from the default device.
# Also known as record or capture.
pcm.input {
    type dsnoop
    ipc_key 2048
    slave.pcm "snd_card"

## Possible artsd full duplex fix:
#     slave {
#          period_time 0
#          period_size 1024
#          buffer_size 8192
#     }
     
    bindings {
        0 0
        1 1
    }
}

# This is what we want as our default device
# # a fully duplex (read/write) audio device.
pcm.duplex {
    type asym
    playback.pcm "output"
    capture.pcm "input"
}

###################
# CONVERSION PLUG #
###################
# Setting the default pcm device allows the conversion
# rate to be selected on the fly.
# duplex mode allows any alsa enabled app to read/write
# to the dmix plug (Fixes a problem with wine).
pcm.!default {
     type plug
     slave.pcm "duplex"
}

# Apparently this is wrong (breaks mplayer for me opening the device)
#ctl.!default {
#     type plug
#     slave.pcm "snd_card"
#}

########
# AOSS #
########
# OSS dsp0 device (OSS needs only output support, duplex will break some stuff)
pcm.dsp0 {
    type plug
    slave.pcm "output"
}

# OSS control for dsp0 (needed?...this might not be useful)
ctl.dsp0 {
    type plug
    slave.pcm "snd_card"
}

####
#### As of November 2005 with the following packages:
#### >=mozilla-firefox-1.0.7-r2, netscape-flash-7.0.25,
#### alsa-oss-1.0.8-r1 and alsa-oss-1.0.10_rc3
####
#### I have been experiencing crashes related to firefox when rendering flash.
#### I used "aoss firefox" to start the browser.
#### Commenting out the below ctl.mixer0 and using the above ctl.dsp0 allows
#### firefox to render flash without crashing (and yes the aoss mixing works)
#### However aoss Skype does not work properly without mixer0 under some configurations.
####
# OSS control for dsp0 (default old OSS is mixer0)
#ctl.mixer0 {
#     type plug
#     slave.pcm "snd_card"
#}
回复 支持 反对

使用道具 举报

发表于 2009-9-15 22:27:55 | 显示全部楼层

我的alsa怎么有杂音啊

操作系统是arm linux 用的是ac97
=====================================
lsmod
Module                  Size  Used by
snd_mx27_wm9712        10400  0
ssi_ac97                7160  1 snd_mx27_wm9712
snd_ac97_codec         99968  1 snd_mx27_wm9712
snd_ac97_bus            2336  1 snd_ac97_codec
mx27_capture           35184  1
tvp5150_cam             8548  1 mx27_capture
opl                     7008  1 mx27_capture
mx27_csi                5688  1 mx27_capture
====================================

在/dev/snd下面只有这几个
===================================
crw-rw----    1 root     root     116,   0 Jan  1 00:43 controlC0
crw-rw----    1 root     root     116,  24 Jan  1 00:43 pcmC0D0c
crw-rw----    1 root     root     116,  16 Jan  1 00:43 pcmC0D0p
crw-rw----    1 root     root     116,  33 Jan  1 00:43 timer
================================

不知是少了什么,还是.asoundrc没配置好?
回复 支持 反对

使用道具 举报

发表于 2009-9-16 00:04:39 | 显示全部楼层
沒有,我很明顯覺得ALSA音質有問題。現在已經在安裝Gentoo/FreeBSD了,而且改用OSSv4。
回复 支持 反对

使用道具 举报

发表于 2009-9-16 11:56:36 | 显示全部楼层

最开始的时候我用OSS,因为有杂音才换成ALSA的

不知道为什么,OSS还是有杂音,把话筒取下来还是有一些杂音在里面。不过用ALSA的杂音比OSS的还要大。。。。。
回复 支持 反对

使用道具 举报

发表于 2009-9-16 22:04:01 | 显示全部楼层
AC97是有一定的噪音,不过噪音太大一定有问题。
试试在 alsamixer 里把 跟 mic 有关的全部 mut 了,
然后把音量尽量调到别调到红色,声音不够大的话时用音箱或软件放大。
回复 支持 反对

使用道具 举报

发表于 2009-9-16 22:52:42 | 显示全部楼层
最简单改善音质的方法是换个好音箱。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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