====== Alsa ====== Official Alsa pages: * [[http://www.alsa-project.org/main/index.php/Asoundrc|Asoundrc]] * [[http://alsa.opensrc.org/Asoundrc]] * [[http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html|Alsa PCM plugins]] Very precious notes from users: * [[http://www.volkerschatz.com/noise/alsa.html]] * [[http://www.sabi.co.uk/Notes/linuxSoundALSA.html|Linux ALSA sound notes]] ===== asoundrc / asound.conf ===== By default sound is processed through dmix plugin which handles rate and channels conversion. ==== Plugin: hw ==== This plugin communicates directly with the ALSA kernel driver. It is a raw communication without any conversions. To override "default" pcm device and route outputdirectly into hardware: pcm.!default { type hw card 0 format S16_LE } With settings above, there is no possiblity to play mono sound (channel=1), when there is stereo audio device. Change default card: pcm.!default { type hw card 1 device 3 } ctl.!default { type hw card 1 device 3 } ==== Plguin: plug ==== Is a plugin responsible for rate and format conversion. pcm.!default { type plug slave { pcm "hw:0,0" format S16_LE } } There might be problems with some programs though. Some applications always try to open a control device with the same name as the pcm device they are given, so you may also need to create a dummy control device with the same name: ctl.!default { type hw card 0 } ==== Plugin: asym ==== asym is an ALSA PCM plugin that combines half-duplex PCM plugins like dsnoop and dmix into one full-duplex device. [[http://alsa.opensrc.org/Asym]] ==== Plugin: dmix ==== PCM plugins extend the functionality of PCM devices allowing low-level sample conversions and copying between channels, files and soundcard devices. The dmix plugin provides for direct mixing of multiple streams. [[http://alsa.opensrc.org/Dmix]]