ALSA Wiki Guide that this is based off of.
I will provide examples of what I have on my system, feel free to use those, but be sure to make changes necessary for your system.
Switch to a root terminal
$ sudo su
Load the loopback device
$ modprobe snd-aloop
Make sure that worked
$ aplay -l
Make it permanent
$ echo "snd_aloop" > /etc/modules-load.d/aloop.conf
Check what your sound modules are
$ cat /proc/asound/modules
On my system it looks like:
[willdu@diablo ~]$ cat /proc/asound/modules
0 snd_aloop
1 snd_hda_intel
2 snd_hda_intel
3 snd_usb_audio
4 snd_usb_audio
Create alsa-base and set defaults
$ nano /etc/modprobe.d/alsa-base.conf
My alsa-base.conf is:
options snd_aloop index=0 pcm_substreams=2
options snd_usb_audio index=2
options snd_usb_audio index=1 enable=0,1
Exit the root terminal and go back to your user.
$ exit
Create or replace your asoundrc
nano ~/.asoundrc
My .asoundrc is:
# ------------------------------------------------------
# default device
#
pcm.card0 {
type plug
slave.pcm "aduplex"
}
#
#-------------------------------------------------------
# Resampling
defaults.pcm.rate_converter "speexrate_medium"
#
# ------------------------------------------------------
# hardware 0,0 : used for ALSA playback
pcm.loophw00 {
type hw
card Loopback
device 0
subdevice 0
format S32_LE
rate 48000
}
#
# ------------------------------------------------------
# playback PCM device: using loopback subdevice 0,0
# Don't use a buffer size that is too small. Some apps
# won't like it and it will sound crappy
#
pcm.amix {
type dmix
ipc_key 219345
slave {
pcm loophw00
period_size 4096
periods 3
}
}
#
# ------------------------------------------------------
# software volume
pcm.asoftvol {
type softvol
slave.pcm "amix"
#
control { name PCM }
#
min_dB -51.0
max_dB 0.0
}
#
# ------------------------------------------------------
# for jack alsa_in: looped-back signal at other ends
pcm.cloop {
type hw
card Loopback
device 1
subdevice 0
format S32_LE
rate 48000
}
#
# ======================================================
# ------------------------------------------------------
# hardware 0,1 : used for ALSA capture
pcm.loophw01 {
type hw
card Loopback
device 0
subdevice 1
format S32_LE
rate 48000
}
#
# ------------------------------------------------------
# for jack alsa_out: looped-back signal at other end
pcm.ploop {
type hw
card Loopback
device 1
subdevice 1
format S32_LE
rate 48000
}
#
# ======================================================
# ------------------------------------------------------
# duplex device combining our PCM devices defined above
pcm.aduplex {
type asym
playback.pcm "asoftvol"
capture.pcm "loophw01"
}
#
# ------------------------------------------------------
# default device
pcm.!default {
type plug
slave.pcm aduplex
#
hint {
show on
description "Duplex Loopback"
}
}
#
Create Jack Bridge
Capture client:
alsa_in -j cloop -d cloop
Playback client:
alsa_out -j ploop -d ploop
Use a script to automate this. In my case as a script executed after startup in QJackCtl. My script also creates my other connections, but the relevant parts are:
#!/bin/bash
#
# Launch alsa_in and alsa_out
alsa_in -j cloop -d cloop &
alsa_out -j ploop -d ploop &
To get Skype 4.3 to work install apulse and lib32-apulse and then launch Skype with the command:
apulse32 skype
Or use the new Skype for Linux Alpha.