I use ALSA since knoppix v3.7 & kernel 2.4.27, it still works perfectly but many guides-wikis-howto are too old to use in actual days, many things are the some others are different. This Howto is to make a standard system-sound-ready (prefer kernel > 2.6.16) for programs/games, no taking in consideration latency,quality and other sound Specifications like 5.1 sound or jack.
---
1_Identify Your Card2_Building Support from Kernel Source (2.6.x)Code:# lspci | grep -i audio 00:01.4 Multimedia audio controller: Silicon Integrated Systems [SiS] SiS PCI Audio Accelerator (rev 02)
ALSA modules can be built from your kernel source, in my case I used 'make xconfig' and choose the next modules (I prefer modules and not build all in the kernel)
- -
Compile the new kernel with your sound modules.3_UtilsKnown Issues Kernel 2.6.16
There is currently a problem with the alsa-driver package and kernel 2.6.16, either vanilla, Gentoo, or -ck. Please note that upgrading to ALSA 1.0.11_rc3 or newer should solve the problem for some. Yet for others, this option might create modules that cannot load into your new kernel. Be aware that as of right now, you should only run 2.6.16 with Alsa built into the kernel. This issue is resolved in kernels 2.6.17 and above.
If you choose to compile sound card support directly into the kernel and have alsa-sound on video capture cards there may be problems starting with 2.6.16. Compiling as modules solved this problem. This is also resolved in 2.6.17 and up.
You still need some utils to make use of your new kernel with alsa support4_ Dmix & AsoundrcCode:#apt-get update #apt-get alsa-lib alsa-oss alsa-utils
There are many configurations files (/home/username/.asoundrc & /etc/asound.conf) on the net to make use of the plugin:dmix, but this configurations are from the old days on kernel 2.4.x. Today (for general use) you don't need to spec dmix on the configuration files, the kernel with the alsa modules already use dmix automatically for alsa-sound.
You still need the configuration files for the ALSA OSS emulation (example aoss for Simcity 3000 Unlimited or realplayer) bellow a common .asoundrc which only control the ALSA OSS emulation with the line pcm.dsp0The dmix virtual sound mixing device is a plugin to ALSA which takes multiple sound streams and mixes them into one virtual stream which a lower-end card can handle. Any card which does not support multiple streams or hardware mixing of sounds must use this plugin to take full advantage of ALSA and its capabilities.5_ Common Applications with alsa supportCode:#nano /home/username/.asoundrc pcm.ossmix { type dmix ipc_key 1024 # must be unique! # ipc_key_add_uid false # let multiple users share # ipc_perm 0666 # IPC permissions for multi-user sharing (octal, default 0600) slave { pcm "hw:0,0" # you cannot use a "plug" device here, darn. period_time 0 period_size 1024 # must be power of 2 buffer_size 8192 # dito. It #format "S32_LE" #periods 128 # dito. rate 44100 # with rate 8000 you *will* hear, # if ossmix is used :) } # bindings are cool. This says, that only the first # two channels are to be used by dmix, which is # enough for (most) oss apps and also lets # multichannel chios work much faster: bindings { 0 0 # from 0 => to 0 1 1 # from 1 => to 1 } } pcm.dsp0 { type plug slave.pcm "ossmix" # use our new PCM here } # mixer0 like above ctl.mixer0 { type hw card 0 }
MplayerMplayer-pluginCode:#nano ~./mplayer/config # Write your default config options here! vo=xv #Use alsa device for audio ao=alsa #Activated soft volume control softvol=1XMMSCode:nano ~/.mplayer/mplayerplug-in.conf vo=xv #Use ALSA device for sound ao=alsa cachesize=512 cache-percent=20 ...6_ Reset and enjoy your new kernel with alsa supportOptions -> Preferences -> Audio
* Select Alsa Plugin
* Output Plugins Preferences
1. Audio Device: default (which is NOT the same as "ossmix")
2. Use software volume control
3. Advanced Settings (these settings may be for a particular sound card)
o buffer time: 750ms
o period time: 75ms
o uncheck mmap mode, if present
I hope it help others, with this steps I can hear at the same time (for testing, not for common use) demo on skype, movie on mplayer, song on xmms and play simcity 3000 unlimited.
----
Bibliography
HOWTO ALSA Complete (includes dmix)
Advanced Linux Sound Architecture
ALSA Soundcard MATRIX
$199.99
Grandstream GS-HT802 2 Port Analog Telephone Adapter VoIP Phone & Device, Black
$32.00
VoIP IP Phone SIP WAN FV6020 Fanvil Gigabit Office Support IAX IAX2
$35.56
Yealink SIP-T41P PoE Ultra Elegant VoIP Phone
$29.95
Cisco CP-7945G VOIP Phone With Stand & Handset Business IP Phone 7945
$3.00
New Cisco 7945G IP VoIP Gigabit GIGE Telephone Phone CP-7945G -
$24.95
Poly VVX 350 Business IP Phone VoIP - 2200-48830-025 - Refresh Grade A
$49.99
Cisco CP-8861-K9 5-Line VoIP Business Phone w/ Stand & Handset
$24.98
Cisco 8841 CP-8841-K9 VoIP Business IP Phone (Charcoal)
$49.00
LOT OF 10 Cisco CP-7841-K9 VoIP 4-Line Business Phone w/ Stand Handset Cord
$69.99