Jackd No Sound on USB Card

Hi. I have been using FreeBSD for more than 3 years now and this is the first time I could not be able to resolve an issue.

I would like to use audio/jack for music production but I have not been able to get sound out of it.

My cat /dev/sndstat:
Code:
Installed devices:
pcm0: <Conexant CX20590 (Analog 2.0+HP/2.0)> (play/rec)
pcm1: <Intel Cougar Point (HDMI/DP 8ch)> (play)
pcm2: <Intel Cougar Point (HDMI/DP 8ch)> (play)
pcm3: <Intel Cougar Point (HDMI/DP 8ch)> (play)
pcm4: <USB audio> (play/rec) default
No devices installed from userspace.

My dmesg | grep audio:
Code:
uaudio0 on uhub3
uaudio0: <M-Audio M-Track, class 0/0, rev 1.10/1.03, addr 3> on usbus0
uaudio0: Play[0]: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Play[0]: 44100 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record[0]: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record[0]: 44100 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio0: MIDI sequencer.
pcm4: <USB audio> on uaudio0
uaudio0: No HID volume keys found.
uaudio0 on uhub2
uaudio0: <M-Audio M-Track, class 0/0, rev 1.10/1.03, addr 3> on usbus0
uaudio0: Play[0]: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Play[0]: 44100 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record[0]: 48000 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record[0]: 44100 Hz, 2 ch, 24-bit S-LE PCM format, 2x8ms buffer.
uaudio0: MIDI sequencer.
pcm4: <USB audio> on uaudio0
uaudio0: No HID volume keys found.

My ossinfo:
Code:
Version info: FreeBSD native OSS ABI 1300139 (0x00040000) BSD
Platform: FreeBSD/amd64 13.0-RELEASE FreeBSD 13.0-RELEASE #0 releng/13.0-n244733-ea31abc261f: Fri Ar  9 04:24:09 UTC 2021     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC (t20)

Number of audio devices:        18
Number of audio engines:        18
Number of MIDI devices:         0
Number of mixer devices:        5


Device objects
 0: pcm0 Conexant CX20590 (Analog 2.0+HP/2.0)
    on hdaa0
 1: pcm1 Intel Cougar Point (HDMI/DP 8ch)
    on hdaa1
 2: pcm2 Intel Cougar Point (HDMI/DP 8ch)
    on hdaa1
 3: pcm3 Intel Cougar Point (HDMI/DP 8ch)
    on hdaa1
 4: pcm4 USB audio
    at ? kld snd_uaudio

MIDI devices (/dev/midi*)

Mixer devices
 0: pcm0:mixer (Mixer 0 of device object 0)
 1: pcm1:mixer (Mixer 0 of device object 1)
 2: pcm2:mixer (Mixer 0 of device object 2)
 3: pcm3:mixer (Mixer 0 of device object 3)
 4: pcm4:mixer (Mixer 0 of device object 4)

Audio devices
pcm0:play:dsp0.p0                 /dev/dsp0.p0  (device index 0)
pcm0:virtual:dsp0.vp0             /dev/dsp0.vp0  (device index 1)
pcm0:record:dsp0.r0               /dev/dsp0.r0  (device index 2)
pcm0:virtual:dsp0.vr0             /dev/dsp0.vr0  (device index 3)
pcm1:play:dsp1.p0                 /dev/dsp1.p0  (device index 4)
pcm1:virtual:dsp1.vp0             /dev/dsp1.vp0  (device index 5)
pcm2:play:dsp2.p0                 /dev/dsp2.p0  (device index 6)
pcm2:virtual:dsp2.vp0             /dev/dsp2.vp0  (device index 7)
pcm3:play:dsp3.p0                 /dev/dsp3.p0  (device index 8)
pcm3:virtual:dsp3.vp0             /dev/dsp3.vp0  (device index 9)
pcm4:play:dsp4.p0                 /dev/dsp4.p0  (device index 10)
pcm4:virtual:dsp4.vp0             /dev/dsp4.vp0  (device index 11)
pcm4:virtual:dsp4.vp1             /dev/dsp4.vp1  (device index 12)
pcm4:virtual:dsp4.vp2             /dev/dsp4.vp2  (device index 13)
pcm4:virtual:dsp4.vp3             /dev/dsp4.vp3  (device index 14)
pcm4:virtual:dsp4.vp4             /dev/dsp4.vp4  (device index 15)
pcm4:record:dsp4.r0               /dev/dsp4.r0  (device index 16)
pcm4:virtual:dsp4.vr0             /dev/dsp4.vr0  (device index 17)

Nodes

I can listen to anything on OSS. But when it comes to Jack, I cannot get any audio out of it (unless occasional crackling slow playback counts, more down below).

Things I have tried:
  • Running audio/qjackctl as a root user and a non-root user,
  • Running jackd from commandline:
    • jackd -r -d oss -r 48000 -C /dev/dsp4 -P /dev/dsp4
  • Running audio/virtual_oss with the following flags:
    • -T /dev/sndstat -S -i 8 -C 2 -c 2 -r 48000 -b 24 -s 1024 -f /dev/dsp4 -d dsp -d vdsp.jack -t vdsp.ctl
    • and then running jackd as: jackd -r -d oss -r 48000 -C /dev/vdsp.jack -P /dev/vdsp.jack
to no avail. One of the following things happen:
  • jackd starts with no problem, I can route programs and record audio, but I cannot get audio out. I can export audio files and listen to it on OSS,
  • jackd starts with no problem, I can route programs but I can neither record nor play audio,
  • jackd starts with no problem, I can route programs and record audio, but the audio playback is very slow and crackling a lot, then goes into a feedback loop and crashes jackd,
  • jackd cannot find device and quits.
I have probably read every thread, I have watched and read all the stuff that meka has posted about this. I know that my setup is not the problem because I have tried a Fedora Jam live image and jack recognizes my card and I can perfectly record and play simultaneously.
One thing I suspect is that I cannot get jack to start with proper settings. Because when it's started my device is recognized as "system". But when initialize my MIDI input as jack_umidi -d /dev/umidi0.0, it's recognized as "M-Audio M-Track MIDI Input".

I may actually go insane about this :)
 
Do you build jack with COOKEDMODE = off?
Default is on. It says the OSS driver is broken without it, but for me it works well.

If you do disable it, maybe you're in a case where it is broken and this is the problem.
If you don't... let's try!
 
Do you build jack with COOKEDMODE = off?
Default is on. It says the OSS driver is broken without it, but for me it works well.

If you do disable it, maybe you're in a case where it is broken and this is the problem.
If you don't... let's try!
I had installed jack through pkg. I just force deleted jack and installed it from ports, disabling COOKEDMODE. It didn't make a difference. If I start jackd with root user, I get nothing. For example, I connect Hydrogen to system playback and I don't get any sound. If I start jackd with non-root user, connect Hydrogen to system playback and play a track then the playback speed is very slow and the sound gets stretched and distorted. After a while it goes into a feedback loop and crashes jackd.

It doesn't make any sense.

I found a spare harddisk lying around and installed AV Linux MX Edition on it and it's working as intended. But I don't really like Linux and if I could find a way to make this work, I would be glad.
 
Something else you can try is to run jack as regular user but with realtime scheduling, using sysutils/mac_rtprio. While my internal sound card works best with jack running at normal priority, I tried using a Zoom H4n recorder as an external USB sound card and results were in this case better with realtime enabled (but latency was still not as low as with the internal sound card).
 
Back
Top