Jack multiple interface (internal audio + usb mic)

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
leledumbo
Established Member
Posts: 7
Joined: Sun Jul 14, 2013 6:57 am

Jack multiple interface (internal audio + usb mic)

Post by leledumbo »

Hello,

My system is Kubuntu and I'm using Jack (through QJackCtl) as my main sound server with ALSA applications routed to it for the purpose of multiplexing. In the past, I use headset which mic gets into audio-in, this works flawlessly. I can record with another application (like Amarok) providing the other sound. I recently bought a USB microphone and noticed that it's detected as hw:2 instead of the default hw:0. From what I understand, Jack can only connect to one at a time. Now here's the problem: if I connect to hw:2 then hw:0 would have to be disconnected and this makes Phonon complains that the default audio doesn't work. I also can't record simultaneously from mic and other audio application because each requires different interface. How can I solve this?
luster
Established Member
Posts: 221
Joined: Mon Mar 05, 2012 10:03 pm

Re: Jack multiple interface (internal audio + usb mic)

Post by luster »

some info in the later posts here might be of interest:

http://www.linuxmusicians.com/viewtopic ... 27&t=11246

See: http://jackaudio.org/multiple_devices
leledumbo
Established Member
Posts: 7
Joined: Sun Jul 14, 2013 6:57 am

Re: Jack multiple interface (internal audio + usb mic)

Post by leledumbo »

Using alsa_in/alsa_out seems to work, just need to arrange the connections so that only USB mic is used for recording (audio-in excluded), otherwise there will be noise (even if no device is attached to audio-in). Thanks!
luster
Established Member
Posts: 221
Joined: Mon Mar 05, 2012 10:03 pm

Re: Jack multiple interface (internal audio + usb mic)

Post by luster »

Be aware that:
The precise order in which a Linux system discovers any soundcards can vary each time the machine is rebooted. This is particularly true of USB devices. The device that used to be "hw:0" can become "hw:1" after a reboot, or vice versa. Fortunately, you don't need to use names like this, and can instead use a form that isn't dependent on the order that the Linux discovers your soundcards.
See more here: http://jackaudio.org/device_naming

If you have two identical devices, the situation is more complicated:

http://alsa.opensrc.org/Udev#Identify_t ... io_devices
leledumbo
Established Member
Posts: 7
Joined: Sun Jul 14, 2013 6:57 am

Re: Jack multiple interface (internal audio + usb mic)

Post by leledumbo »

The device that used to be "hw:0" can become "hw:1" after a reboot, or vice versa. Fortunately, you don't need to use names like this, and can instead use a form that isn't dependent on the order that the Linux discovers your soundcards.
Don't worry, I'm aware of that. Fortunately, I don't have my mic plugged-in all the time, so it would always be hw:2 (hw:0 is the onboard sound card, hw:1 is from my graphic card). There would be problem though if I have two or more USB mic like this, since the name is damn generic (cat /proc/asound/cards gives [Microphone ]), but thank God I only have one.
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: Jack multiple interface (internal audio + usb mic)

Post by Pablo »

just need to arrange the connections so that only USB mic is used for recording (audio-in excluded), otherwise there will be noise (even if no device is attached to audio-in). Thanks!
Avoid the problem altogether by starting jack in "playback only" mode (of course, alsa_in will still work for the USB mic).

Some people recommend zita-ajbridge over alsa_in/out, if you want to check it out. http://apps.linuxaudio.org/apps/all/zita-ajbridge
leledumbo
Established Member
Posts: 7
Joined: Sun Jul 14, 2013 6:57 am

Re: Jack multiple interface (internal audio + usb mic)

Post by leledumbo »

Some people recommend zita-ajbridge over alsa_in/out, if you want to check it out. http://apps.linuxaudio.org/apps/all/zita-ajbridge
That's something that doesn't come up in my google search. Will try, thanks.
Post Reply