Introduction

This tutorial is not a howto on setting up slackware or on installing software… There are pleanty of tutorials out there on that subject so no need to re-design the wheel… I am assuming a certain proficency with a linux system.. I am basing this set up on my own setup which works and is stable..
first things first..

Load the module for the loopback sound card

The loopback soundcard is already part of the slackware base install.. It is just not loaded by default.You will need to be root to do this task

edit /etc/rc.d/rc.modules and add the following line to the file….

/sbin/modprobe snd-aloop

save and exit

reload alsa with following command.

/etc/rc.d/rc.alsa restart

What we have done here with the loopback soundcard is the groundwork for preparing the alsa to jack loopback bridge which will become very handy later on if we want to play multiple sounds at the same time. There are few ways to set the bridge up but we are going to do the simple setup here for now. Threre is another way to set up the bridge which creates up to 4 virtual soundcards but that is for another tutorial. This basic setup here will achieve everything we need to do for the moment.

Software Installation

most of the software available from http://www.slackbuilds.org

Setup the realtime permissions for jack and alsa in and out

edit /etc/set_rlimits.conf and add the following lines. If you wish to cheat I have provided a copy of my set_rlimits.conf which you can find to the right in the attachments section.

 @audio /usr/bin/qjackctl -1 80
 @audio /usr/bin/alsa_in -1 80
 @audio /usr/bin/alsa_out -1 80

Make sure your user is part of the audio group or these settings added to set_rlimits.conf wont make the slighest bit of difference and you will get an error trying to start jack or use the alsa_in and alsa_out comands.

Configure your Soundcard

create a file in your home directory called .asoundrc and insert the following code into it. I have also provided a copy of my .asoundrc file to the right in attachments if you wish to take a shortcut.

The /etc/asound.conf may also be used instead of the .asoundrc. When asound.conf is used the audio configuration will affect all users of your system globally which may not be desirable.

#playback PCM device: using loopback subdevice 0,0 
  pcm.amix { 
    type dmix 
    ipc_key 219345 
    slave.pcm "hw:Loopback,0,0" 
  } 

# capture PCM device: using loopback subdevice 0,1 
  pcm.asnoop { 
    type dsnoop 
    ipc_key 219346 
    slave.pcm "hw:Loopback,0,1" 
  } 

# duplex device combining our PCM devices defined above 
  pcm.aduplex { 
    type asym 
    playback.pcm "amix" 
    capture.pcm "asnoop" 
  } 

# for jack alsa_in and alsa_out: looped-back signal at other ends 
  pcm.ploop { 
    type plug 
    slave.pcm "hw:Loopback,1,1" 
  } 

  pcm.cloop { 
    type dsnoop 
    ipc_key 219348 
    slave.pcm "hw:Loopback,1,0" 
  } 

# default device 
  pcm.!default { 
    type plug 
    slave.pcm "aduplex" 
  } 

now restart alsa again

  /etc/rc.d/rc.alsa restart.

Previous steps explained

What we have done here is configure the loopback sound card and the bridge control which handles all out sound mixing. We can capture these sounds and route them with jack into the idjc aux channels. If we play a flash video or play audio on a player idjc can now hear them.

Setup some default connections

Create a file called loop2jack or whatever you want and insert the following code

 #!/bin/sh 
 # script loop2jack, located in /usr/local/bin 
 # start idjc 
  /usr/local/bin/idjc & 
# give it a chance to start 
  sleep 2 
# loop client creation 
  set_rlimits /usr/bin/alsa_out -j ploop -dploop -q 1 2>&1 1> /dev/null & 
  set_rlimits /usr/bin/alsa_in -j cloop -dcloop -q 1 2>&1 1> /dev/null & 
# The following line is specific to my setup only #but I shall leave it here for refference. 
# It sets up a jack plug for my USB microphone 
# in the jack connection manager which i can then 
# plug into IDJC. you can find the name of your USB 
# mic by using the command arecord -l. 
# The name of your mic will be the second field of the 
# revelent audio device. Mine is called mirophone. 
  #set_rlimits /usr/bin/alsa_in -j Microphone -d hw:Microphone -q 1 2>&1> /dev/null & 
# give it some time before connection to system ports 
  sleep 1 
# cloop ports -> jack -> idjc voip input ports 
  jack_connect cloop:capture_1 idjc_default:voip_in_l 
  jack_connect cloop:capture_2 idjc_default:voip_in_r 
  #jack_connect Microphone:capture_1 idjc_default:ch_in_1 
# done 
  exit 0

now make that loop2jack script executeable

  chmod 744 loop2jack

Testing and finishing setup

We will start qjackctl the following way we can create a command for easy launch later..

  set_rlimits /usr/bin/qjackctl

Next we will go to setup on the qjackctl window.

  1. Click on the options tab.
  2. Select execute script after startup
  3. The command you want to start is the loop2jack script we just created.
  4. now quit jack and restart it again the way we did the first time.
  5. now clik the start button
  6. in a moment idjc should start
  7. set the default to open autmatically
  8. start skype
  9. go to options and sound devices and set the mic speaker and ringing to idjc (plug)
  10. clik apply.
  11. in idjc clik the green button
  12. in skype make a test called
  13. all should be working.

Ok that is it thank your for reading the article and if you have any suggestions to make please chime in with the comments.

Peace and Love
Jimmy