当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 1 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : Howto: Happy ALSA, OSS, ESD, with Duplex - Sound Settings(摘)
帖子发表于 : 2008-09-26 18:34 

注册: 2008-08-21 12:25
帖子: 64
地址: 上海
送出感谢: 0 次
接收感谢: 0 次
还没有试过,自存,有机会试试, 自觉也是一个方法。

I know it's been done before, but I don't think anybody has compiled all the settings into a single happy set of instructions.

This setup should work with most sound systems, it is from my Nforce2 setup at home, it makes everything work quite nicely together, OSS, ESD, ALSA and make your Mic work while sound is playing (great for UT2004!!).

These instructions assume you know how to edit config files on your system and add/remove packages on your own.

1. Goto System->Preferences->Sound and disable "Enable Sound Server Startup"
2. Install libesd-alsa0 which will remove libesd0, but that's ok.
3. Make /etc/esound/esd.conf look like this:
Code:

[esd]
auto_spawn=1
spawn_options=-terminate -nobeeps -as 2 -d default
spawn_wait_ms=100
# default options are used in spawned and non-spawned mode
default_options=

4.Make /etc/asound.conf look like this:
Code:

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

# Allow mixing of multiple output streams to this device
pcm.dmixer {
type dmix
ipc_key 1024
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 4096
# rate 44100
}

bindings {
0 0
1 1
}
}

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

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 "dmixer"
capture.pcm "dsnooper"
}

###################
# 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 asym
playback.pcm "dmixer"
capture.pcm "dsnooper"
}

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

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

# OSS control for dsp0 (default old OSS is mixer0)
ctl.mixer0 {
type plug
slave.pcm "snd_card"
}


If you look, the first setting will let you select a different sound card as your primary if you have multiple sound cards.

5.Make /etc/libao.conf look like this:
Code:
default_driver=alsa

6. Reboot to make sure all the systems startup correctly.

OSS stuff will still tie up the sound card, but they don't run all the time. Just configure most things to use ALSA and you'll be good.

Side-Effect: The Ubuntu startup sounds will go away, but i think the trade-off is worth it.

Note: If stuff plays a little static through ESD, in /etc/esound/esd.conf try changing
spawn_options=-terminate -nobeeps -as 2 -d default
to
spawn_options=-terminate -nobeeps -as 2 -d duplex


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 1 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译