怎么介绍?
分类:
2009-10-12 00:45:26
amixer set 'VIA DXS',0 100%
amixer set 'VIA DXS',1 100%
amixer set 'VIA DXS',2 100%
amixer set 'VIA DXS',3 100%
The provides audio and MIDI functionality to the Linux operating system.
The Gentoo is a good documentation about this installation. The provides specific information about ALSA on the Via EPIA mainboards.
Remove previous sound drivers:
cd /usr/src/linuxIn the menus, select Sound ---> Sound Card Support as Module (M) and deselect all other sound drivers.
cp .config ~/
make mrproper
mv ~/.config .
make menuconfig
make dep clean
make modules modules_install
Specify your sound card in /etc/make.conf
.
Check for your card in the
.
For an Epia-M motherboard, for example, insert the line
ALSA_CARDS="via82xx"
You might as well pre-fetch the installation files
with a emerge -f ...
or a wget ...
Install ALSA
emerge alsa-driverEdit the ALSA configuration in
emerge alsa-utils
/etc/modules.d/alsa
.
For an Epia-M motherboard, for example, make sure you have:
# ALSA portionStart ALSA and add it at boot time
alias char-major-116 snd
alias snd-card-0 snd-via82xx
options snd-via82xx dxs_support=3
# OSS/Free portion
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss
options snd cards_limit=1
modules-update
/etc/init.d/alsasound start
rc-update add alsasound boot
Unmute the mixer, command line interface:
amixer set Master 100% unmuteor graphic interface ( Press 'M' to unmute, Up and Down to adjust the volume levels, 'Esc' to exit):
amixer set PCM 100% unmute
aplay $KDEDIR/share/sounds/pop.wav
alsamixerand test it (if KDE is installed)
aplay $KDEDIR/share/sounds/pop.wav
On EPIA mother boards, the sound output must be sampled at 48 kHz.
To be sure this is done, create the file ~/.asoundrc
with :
pcm.via82xx {
type plug
slave {
pcm "hw:0,0"
rate 48000
}
}
ctl.via82xx {
type hw
card 0
}
I have been told that this 48 kHz sampling is not mandatory and that the following settings also work fine:
options snd-via82xx dxs_support=1or
options snd-via82xx dxs_support=4Here an information about dxs support:
With this, you have the following utilities:
amixer
: the command-line control of the mixer,
aplay
: a command-line sound player,
plays voc
, wav
, raw
or au
files.
arecord
: a command-line sound recorder.
Setup KDE to use ALSA for the sounds:
-> Control Center Modules
-> Sound & Multimedia
-> Sound system
-> Hardware
-> Select the audio device: Advanced Linux Sound Architecture
After installing KDE on an EPIA motherboard, the sound is muted on startup. This is due to the last 4 mixer controls to be set to zero. These controls can be set to 100% with the following commands:
amixer set 'VIA DXS',0 100%
amixer set 'VIA DXS',1 100%
amixer set 'VIA DXS',2 100%
amixer set 'VIA DXS',3 100%
This initial setup can be automated by creating a alsaInit.sh
file
in ~/.kde/Autosrtart
(with "execute" rights):
#!/bin/bash
amixer set 'VIA DXS',0 100%
amixer set 'VIA DXS',1 100%
amixer set 'VIA DXS',2 100%
amixer set 'VIA DXS',3 100%
I have been told that with other distributions or ALSA versions, there were further mute problems which can be solved by adding:
amixer set 'IEC958 Capture Monitor' muted
amixer set 'PCM' unmuted
On a PC with an ISA card and KDE installed,
I had trouble playing tracks with alsaplayer
.
I worked around it with the following command:
$ artsd -a alsaAs an alternative, I could remove the
autosuspend
mode
in the sound system control center module.