[linux-audio-user] .asoundrc for dummies
Novensiles divi Flamen
noven at sincorp.org
Thu Oct 19 06:50:48 EDT 2006
On Thursday 19 October 2006 17:34, Mathias Friman wrote:
>
> I wonder if anyone got easy-to-understand links for this, except the
> ALSA-wiki and the Gentoo ALSA-howto? These both round up an endless number
> of examples, but does leave out (IMHO) important parts that is needed for a
> thourough understanding if you're a moron like me. ;)
>
No howto on hand, but maybe I can answer some questions
> For example:
>
> pcm.!default {
> type asym
> playback.pcm {
> type plug
> slave.pcm "hw:0,0"
> }
> capture.pcm {
> type plug
> slave.pcm "hw:1,0"
> }
> }
>
> This overrides the default setting,
> uses type asym (which is what exactly? asymmetrical, yes, but what does
> that mean?) sets a playback.pcm (which is defined where originally?)
>
asym means the control is used for both play and record.
> Why does it say 'slave.pcm "hw:0,0"' and nothing like:
>
> pcm_slave.sltest {
> pcm ens1371
> }
>
> and what is the difference?
>
hw:0,0 is a syntax for the first alsa device, regardless of *what* device it
actually is. So the config will work regardless of what card you have.
> So, anyone got tips, links, an hour to spare or whatever? All is welcome.
>
A while ago I did some research and tweaking to make a .asoundrc with
program-specific controls. The theory is taken from a website which I really
should reference but can't recall. Maybe the file will be of use to you? It
creates a number of useable controls, and then you tell the actual program to
use the named control.
It should show a logical chain of events. Feel free to ask questions about it.
# ALSA controls to enable software mixers
# PCM output devices
pcm.output_main
{
type dmix
ipc_key 1024
ipc_perm 0666
slave
{
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 8192
}
}
bindings
{
0 0
1 1
}
# PCM input devices
pcm.input_mic
{
type dsnoop
ipc_key 2048
slave.pcm "hw:0,0"
}
# Asym devices
# use input and output at the same time
pcm.asym_main_mic
{
type asym
playback.pcm "output_main_control"
capture.pcm "input_mic"
}
# Hardware control devices
ctl.mixer0
{
type hw
card 0
}
# Volume controls
pcm.output_main_control
{
type softvol
slave.pcm "output_main"
control
{
name "All"
card 0
}
}
pcm.default_control
{
type softvol
slave.pcm "asym_main_mic"
control
{
name "Unassigned"
card 0
}
}
pcm.xmms_control
{
type softvol
slave.pcm "output_main_control"
control
{
name "XMMS"
card 0
}
}
pcm.film_control
{
type softvol
slave.pcm "output_main_control"
control
{
name "Film"
card 0
}
}
pcm.psi_control
{
type softvol
slave.pcm "output_main_control"
control
{
name "Psi"
card 0
}
}
pcm.skype_control
{
type softvol
slave.pcm "asym_main_mic"
control
{
name "Skype"
card 0
}
}
pcm.system_control
{
type softvol
slave.pcm "asym_main_mic"
control
{
name "System"
card 0
}
}
# OSS devices (Audacity) - doesn't quite work as expected. Fix sometime.
pcm.output_oss
{
type softvol
slave.pcm "asym_main_mic"
control
{
name "OSS"
card 0
}
}
pcm.dsp0
{
type plug
slave.pcm "output_oss"
}
# Default ALSA devices
pcm.!default
{
type plug
slave.pcm "default_control"
}
pcm.default
{
type plug
slave.pcm "default_control"
}
# Custom app plug devices
pcm.xmms
{
type plug
slave.pcm "xmms_control"
}
pcm.film
{
type plug
slave.pcm "film_control"
}
pcm.psi
{
type plug
slave.pcm "psi_control"
}
pcm.skype
{
type plug
slave.pcm "skype_control"
}
pcm.system
{
type plug
slave.pcm "system_control"
}
# To make the mixer devices available you need to run the following commands
# aplay /path/to/a.wav -D film
# aplay /path/to/a.wav -D psim
# aplay /path/to/a.wav -D system
# aplay /path/to/a.wav -D xmms
# aplay /path/to/a.wav -D skype
# aplay /path/to/a.wav
- Noven
--
>-- Novensiles divi Flamen --<
>---- Miles Militis Fons ----<
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.linuxaudio.org/pipermail/linux-audio-user/attachments/20061019/0f49460e/attachment.pgp
More information about the Linux-audio-user
mailing list