Multiuser/multiseat ALSA, software-mixing, and applications that do not use the default device.

Avi's picture

This is the /etc/asound.conf file that works for me:

#SWCONF
#DEV 0
defaults.pcm.card 0
defaults.pcm.device 0
defaults.ctl.card 0

#
# DMIX input device
#
pcm.!output {
type dmix
ipc_key 1234
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"
period_time 0
period_size 1024
buffer_size 8192
rate 48000
}
}

#
# DSNOOP output device
#
pcm.!input {
type dsnoop
ipc_key 1234
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
rate 48000
}
}

#
# ASYM duplex device
#
pcm.!duplex {
type asym
playback.pcm "output"
capture.pcm "input"
}

#
# Make the duplex device default
#
pcm.!default {
type plug
slave.pcm "duplex"
# This is needed by apps that do not access the default device
# so software-mixing doesn't work (e.g. Amarok 2+, KDE 4+, etc).
# Just select in those apps to use the "ALSA Default Device".
hint {
show on
description "ALSA Default Device"
}
}

ctl.!default {
type plug
slave.pcm "duplex"
}

#
# OSS Compability
#
pcm.!dsp0 {
type plug
slave.pcm "duplex"
}

ctl.!mixer0 {
type hw
card 0
}

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.