KXStudio: apulse skype

What other apps and distros do you use to round out your studio?

Moderators: MattKingUSA, khz

Post Reply
tc1384
Established Member
Posts: 31
Joined: Wed Dec 18, 2013 9:02 pm

KXStudio: apulse skype

Post by tc1384 »

I need help getting skype to work without messing up KXStudio.

I'm trying to use apluse, a Pulseaudio emulation for ALSA.

I start KXStudio

then

Start skype:

Code: Select all

apulse32 skype
I have audio output from skype but the mic is not working.
The mic built-in to a USB Logitech Webcam Pro 9000, the last card listed below.

cat /proc/asound/cards

Code: Select all

   0 [Loopback       ]: Loopback - Loopback
                        Loopback 1
   1 [PCH            ]: HDA-Intel - HDA Intel PCH
                        HDA Intel PCH at 0xdfa30000 irq 38
   2 [NVidia         ]: HDA-Intel - HDA NVidia
                        HDA NVidia at 0xdf080000 irq 17
   3 [Saffire        ]: BeBoB - Saffire
                        Focusrite Saffire (id:2, rev:1), GUID 00130e0100010c0b at fw1.0, S400
   4 [U0x46d0x809    ]: USB-Audio - USB Device 0x46d:0x809
                        USB Device 0x46d:0x809 at usb-0000:00:14.0-9.1.2, high speed
I am using the Cadence snd-aloop daemon (ALSA -> Loop-> JACK)

Code: Select all

# playback device
pcm.aloopPlayback {
  type dmix
  ipc_key 1
  ipc_key_add_uid true
  slave {
    pcm "hw:Loopback,0,0"
    format S32_LE
    rate {
      @func igetenv
      vars [ JACK_SAMPLE_RATE ]
      default 44100
    }
    period_size {
      @func igetenv
      vars [ JACK_PERIOD_SIZE ]
      default 1024
    }
    buffer_size 4096
  }
}

# capture device
pcm.aloopCapture {
  type dsnoop
  ipc_key 2
  ipc_key_add_uid true
  slave {
    pcm "hw:Loopback,0,1"
    format S32_LE
    rate {
      @func igetenv
      vars [ JACK_SAMPLE_RATE ]
      default 44100
    }
    period_size {
      @func igetenv
      vars [ JACK_PERIOD_SIZE ]
      default 1024
    }
    buffer_size 4096
  }
}

# duplex device
pcm.aloopDuplex {
  type asym
  playback.pcm "aloopPlayback"
  capture.pcm "aloopCapture"
}

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

# ------------------------------------------------------
# alsa_in -j alsa_in -dcloop -q 1
pcm.cloop {
  type dsnoop
  ipc_key 3
  ipc_key_add_uid true
  slave {
    pcm "hw:Loopback,1,0"
    channels 2
    format S32_LE
    rate {
      @func igetenv
      vars [ JACK_SAMPLE_RATE ]
      default 44100
    }
    period_size {
      @func igetenv
      vars [ JACK_PERIOD_SIZE ]
      default 1024
    }
    buffer_size 32768
  }
}

# ------------------------------------------------------
# alsa_out -j alsa_out -dploop -q 1
pcm.ploop {
  type plug
  slave.pcm "hw:Loopback,1,1"
}
I assume I need to add a capture entry above .asoundrc - but that is generated by cadence.py

Does anyone have suggestions as to how to get this to work?
Is there a way to do it through cadence??

If not then I assume I need something like: slave.pcm "hw:4,0"
but asound code is my weakness and really struggle with it.'
Fire_String
Established Member
Posts: 19
Joined: Mon Jul 16, 2012 8:34 pm

Re: KXStudio: apulse skype

Post by Fire_String »

Wouldn't you just install the PA binary and bridge it into JACK?
I don't need/use PA but there is a bridging option in Cadence.
Can't it run along side aloop-JACK?
tc1384
Established Member
Posts: 31
Joined: Wed Dec 18, 2013 9:02 pm

Re: KXStudio: apulse skype

Post by tc1384 »

I'm trying to avoid pulseaudio if at all possible... but thanks for the suggestion
User avatar
sysrqer
Established Member
Posts: 2527
Joined: Thu Nov 14, 2013 11:47 pm
Has thanked: 320 times
Been thanked: 153 times
Contact:

Re: KXStudio: apulse skype

Post by sysrqer »

Have you looked in Cadence settings to make sure it is set to duplex and the input is enabled? Can you record audio from the mic in to ardour or audacity? Can you see the input in Catia?
tc1384
Established Member
Posts: 31
Joined: Wed Dec 18, 2013 9:02 pm

Re: KXStudio: apulse skype

Post by tc1384 »

I'm usng a Saffire firewre interface.
All primary mic inputs are coming from that audio interface and all of that is working great with excellent latency.

however, as stated in the first post, I need integrate mic input from the USB webcam.

I can record using the USB mic Ok.

Code: Select all

arecord -D hw:4,0 -d 5 -f cd -c 1 test.wav
No - I don't see the USB mic input in Catia...
tc1384
Established Member
Posts: 31
Joined: Wed Dec 18, 2013 9:02 pm

Re: KXStudio: apulse skype

Post by tc1384 »

I have been able to get skype mic working but it is not the solution I would like.

I've update my /etc/asound.config

Code: Select all

pcm.!default {
         type asym
         playback.pcm {
                 type plug
                 slave.pcm "hw:1,0"
         }
         capture.pcm {
                 type plug
                 slave.pcm "hw:4,0"
         } 
}
/proc/asound/cards

Code: Select all

 0 [Loopback       ]: Loopback - Loopback
                      Loopback 1
 1 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xdfa30000 irq 38
 2 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xdf080000 irq 17
 3 [Saffire        ]: BeBoB - Saffire
                      Focusrite Saffire (id:2, rev:1), GUID 00130e0100010c0b at fw1.0, S400
 4 [U0x46d0x809    ]: USB-Audio - USB Device 0x46d:0x809
                      USB Device 0x46d:0x809 at usb-0000:00:14.0-9.1.2, high speed
Then if I start cadence / jack: - all is ok
But when I start the ALSA ->Loop-> JACK bridge the skype mic stops working, obviously.

I don't know how to do this - but the /etc/asound.conf contents need to be integrated into the bridge.
Is it possible to include two [pmc.capture]s in the ~/.asoundrc ??

Cadence: ~/.asoundrc

Code: Select all

# ------------------------------------------------------
# Custom asoundrc file for use with snd-aloop and JACK
#
# use it like this:
# env JACK_SAMPLE_RATE=44100 JACK_PERIOD_SIZE=1024 alsa_in (...)
#

# ------------------------------------------------------
# playback device
pcm.aloopPlayback {
  type dmix
  ipc_key 1
  ipc_key_add_uid true
  slave {
    pcm "hw:Loopback,0,0"
    format S32_LE
    rate {
      @func igetenv
      vars [ JACK_SAMPLE_RATE ]
      default 44100
    }
    period_size {
      @func igetenv
      vars [ JACK_PERIOD_SIZE ]
      default 1024
    }
    buffer_size 4096
  }
}

# capture device
pcm.aloopCapture {
  type dsnoop
  ipc_key 2
  ipc_key_add_uid true
  slave {
    pcm "hw:Loopback,0,1"
    format S32_LE
    rate {
      @func igetenv
      vars [ JACK_SAMPLE_RATE ]
      default 44100
    }
    period_size {
      @func igetenv
      vars [ JACK_PERIOD_SIZE ]
      default 1024
    }
    buffer_size 4096
  }
}

# duplex device
pcm.aloopDuplex {
  type asym
  playback.pcm "aloopPlayback"
  capture.pcm "aloopCapture"
}

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

# ------------------------------------------------------
# alsa_in -j alsa_in -dcloop -q 1
pcm.cloop {
  type dsnoop
  ipc_key 3
  ipc_key_add_uid true
  slave {
    pcm "hw:Loopback,1,0"
    channels 2
    format S32_LE
    rate {
      @func igetenv
      vars [ JACK_SAMPLE_RATE ]
      default 44100
    }
    period_size {
      @func igetenv
      vars [ JACK_PERIOD_SIZE ]
      default 1024
    }
    buffer_size 32768
  }
}

# ------------------------------------------------------
# alsa_out -j alsa_out -dploop -q 1
pcm.ploop {
  type plug
  slave.pcm "hw:Loopback,1,1"
}
Post Reply