|
发表于 2010-6-7 23:39:08
|
显示全部楼层
如何设置alsa默认走pulseaudio (抄自http://www.pulseaudio.org/wiki/P ... *****Applications):
ALSA Applications
If the PulseAudio plugin for alsalibs is installed all applications with support for the ALSA API should be able to access a PulseAudio server. You need version 1.0.12 or newer of the ALSA packages for the PulseAudio plugin to be included.
To activate the driver edit /etc/asound.conf or ~/.asoundrc and add:
- pcm.pulse {
- type pulse
- }
- ctl.pulse {
- type pulse
- }
复制代码
Now you you can access the PulseAudio server under the virtual ALSA device pulse:
% aplay -Dpulse foo.wav
% amixer -Dpulse
If you want to make the PulseAudio driver the default, use something like this in the ALSA configuration files:
- pcm.!default {
- type pulse
- }
- ctl.!default {
- type pulse
- }
复制代码
If you select the default ALSA device to be "pulse", you need to make sure that PA doesn't try to open the "default" device for its own audio output. If you previously were loading module-alsa-sink without special device argument this means you have to change it to the raw "hw:0" devices. Example:
load-module module-alsa-sink device=hw:0
load-module module-alsa-source device=hw:0
If you use HAL this is not necessary, because the raw ALSA device strings are used anyway.
The PulseAudio plugin for ALSA supports audio playback, audio capturing and supports the mixer. |
|