jack2 has no sound when going through audio interface

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
somedude
Established Member
Posts: 16
Joined: Tue Feb 18, 2014 9:49 pm
Location: Mexico City

jack2 has no sound when going through audio interface

Post by somedude »

My fellow LM's: I am trying to take the first baby step of recording some loops in SooperLooper using a Focusrite 2i4 interface, but there is no sound coming out. I am able to fire up jack2 and SooperLooper and record some loops, and I know they are being recorded but when I playback no audio comes out. Here is how I run jack:

Code: Select all

/usr/bin/jackd -P10 -t2000 -dalsa -dhw:USB -r48000 -p256 -n2 -Xseq -D -Phw:USB
The weird thing is that a couple of days ago, after restarting the machine a couple of times I was able to succesfully record and playback audio using SooperLooper and jack (playback through the intreface that is), so that makes me think that I have a problem when my system assigns soundcard at boot time. I've tried assigning manually the sound card but problem persists.

Some info:
$ cat /proc/asound/modules
0 snd_usb_audio
1 snd_hda_intel
and also
[~]$ cat /proc/asound/cards
0 [USB ]: USB-Audio - Scarlett 2i4 USB
Focusrite Scarlett 2i4 USB at usb-0000:00:1d.0-1.1, high speed
1 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xd0600000 irq 43
Since
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: USB [Scarlett 2i4 USB], device 0: USB Audio [USB Audio]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 0: CX20590 Analog [CX20590 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
I tried by putting into /etc/asound.conf

Code: Select all

pcm.!default {
	type hw
	card USB
}

ctl.!default {
	type hw           
	card USB
}
and I get some very interesting glitches, but now what I need right now.

I have managed to setup some udev rules to dynamically switch audio card when I plug in the USB port of the interaface, so at least I got that going for me.

My list of devices and modules is:
[~]$ lsmod | grep snd
snd_hrtimer 1636 1
snd_seq_midi 5136 2
snd_seq_midi_event 5628 1 snd_seq_midi
snd_seq_dummy 1463 2
snd_seq 50170 13 snd_seq_midi_event,snd_seq_dummy,snd_seq_midi
snd_hda_codec_hdmi 36379 1
snd_hda_codec_conexant 37907 1
snd_usb_audio 117811 5
snd_usbmidi_lib 19755 1 snd_usb_audio
snd_rawmidi 18742 2 snd_usbmidi_lib,snd_seq_midi
snd_seq_device 5180 4 snd_seq,snd_rawmidi,snd_seq_dummy,snd_seq_midi
snd_hda_intel 37352 0
snd_hda_codec 150017 3 snd_hda_codec_hdmi,snd_hda_codec_conexant,snd_hda_intel
snd_hwdep 6332 2 snd_usb_audio,snd_hda_codec
snd_pcm 77822 6 snd_usb_audio,snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_page_alloc 7298 2 snd_pcm,snd_hda_intel
snd_timer 18718 3 snd_hrtimer,snd_pcm,snd_seq
snd 59029 18 snd_usb_audio,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_conexant,snd_pcm,snd_seq,snd_rawmidi,snd_usbmidi_lib,snd_hda_codec,snd_hda_intel,snd_seq_device
soundcore 5418 1 snd
usbcore 180320 6 snd_usb_audio,uvcvideo,rts5139,snd_usbmidi_lib,ehci_hcd,ehci_pci
The messages when I start jack via qjackctl are:
JACK server starting in realtime mode with priority 10
audio_reservation_init
Acquire audio card Audio0
creating alsa driver ... hw:USB|hw:USB|256|2|48000|0|0|nomon|swmeter|-|32bit
configuring for 48000Hz, period = 256 frames (5.3 ms), buffer = 2 periods
ALSA: final selected sample format for capture: 32bit integer little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit integer little-endian
ALSA: use 2 periods for playback
port created: Midi-Through:midi/playback_1
port created: Midi-Through:midi/capture_1
port created: Scarlett-2i4-USB:midi/playback_1
port created: Scarlett-2i4-USB:midi/capture_1
I'm on a 64bit Lenovo G570, using kernel 3.13.4-1 on Arch Linux, jackdmp 1.9.9.5 (from Arch repositories).

I've searched online all weekend, and haven't found anything that helps. I'm sure I'm missing something simple but by god I can't figure it out.

(First real post, I'll be happy to move it to a more appropriate forum if needed).
User avatar
bluebell
Established Member
Posts: 1927
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 113 times
Been thanked: 122 times

Re: jack2 has no sound when going through audio interface

Post by bluebell »

I don't use names, so I nail the interface to a fixed position:

/etc/modprobe/usb-audio-interfaces.conf:

# Mit Logitch Webcam und Focusrite Scarlett 2i2
options snd_usb_audio index=2,3 vid=0x46d,0x1235 pid=0x809,0x8006

So my Logitech webcam is on position 2 and my Focusrite Scarlett 2i2 is on position 3.

I start JACK like:
/usr/bin/jackd -t2000 -dalsa -r44100 -p256 -n3 -M -Xseq -D -Chw:3 -Phw:3 >/tmp/jackd-hm.log 2>&1

I redirect ALSA-clients to JACK with the following .aoundrc:
pcm.!default {
type plug
slave.pcm "jack"
hint {
show on
description "Playback/recording through JACK"
}
}

pcm.jack {
type jack
playback_ports {
0 "system:playback_1"
1 "system:playback_2"
}
capture_ports {
0 system:capture_1
1 system:capture_2
}
hint {
show on
description "Playback/recording through JACK"
}
}

System is a Core i5, 8 GB RAM, 64 Bit Xubuntu 12.04, self-compiled Kernel with HZ1000 and preemptive model.

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

somedude
Established Member
Posts: 16
Joined: Tue Feb 18, 2014 9:49 pm
Location: Mexico City

Re: jack2 has no sound when going through audio interface

Post by somedude »

Hi bluebell, thanks for the info. I tried setting fixed positions but it doesn't work either. I've been playing with the jack settings to use defaults, hw:USB, hw:USB,0 but still no sound. Weird thing is, I do get proper output from the Focusrite's headphone output, but nothing from the main audio output. I can connect Sooper Looper and Guitarix to Ardour and record their outputs, but the main output to my monitors is always dead. I know its not a hw problem since this audio interface works well under W7 and Live.

Sometimes when I close and restart jack after multiple times things just magically work. Then I try restarting again and back to square one. I've read people having trouble with recent kernels and usa audio interfaces. Could this be related? Is it that Arch Linux is not the best option for doing music with Linux perhaps because these quirks?
somedude
Established Member
Posts: 16
Joined: Tue Feb 18, 2014 9:49 pm
Location: Mexico City

Re: jack2 has no sound when going through audio interface

Post by somedude »

I'm such a noob. The problem was in the routing of the audio in jack connect. I had to disconnect everything and route the signals properly because jack wasn't doing it properly by default. If someone else comes across this post in the future: make sure you route the audio properly in your jack connect panel.
Post Reply