You are not logged in.

#1 2020-05-10 10:43:08

Ploppz
Member
Registered: 2013-09-14
Posts: 311

[SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

I installed jack2, pulseaudio-jack, cadence.

When I start cadence, the ALSA -> PulseAudio -> Jack bridge is automatically enabled, which is what I want.
I had to add myself to both the `realtime` and `audio`groups. After that, I managed to play a song on spotify. That is, the progress bar moves to the right, but the sound is just really choppy and unrecognizable. Besides, the Xruns counter in cadence goes up rapidly.  However DSP Load is consistently around 0.5%.

watching this video (https://www.youtube.com/watch?v=Nx9snvfzRFY) I tried to add this to `/etc/security/limits.conf`:

@audio - rtprio 99
@audio - memlock unlimited
@audio - nice -19

After which there is no sound when I run jack, and spotify says it can't even play any sound. I guess I should revert that.
pavucontrol looks like this https://i.imgur.com/p9ysK3b.png (I have tried to leave the top-most device both muted and unmuted), and both devices are completely silent.
At some several points during all my attempts, there was only a "Dummy output" here, but a reboot would 'fix' that.
Invariant through all these different runs, Xruns keeps going up, whether there is any sound or not.

To show some of my cadence settings: https://i.imgur.com/oFLe4aE.png

Last edited by Ploppz (2020-05-14 11:35:54)

Offline

#2 2020-05-10 11:53:52

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

It looks like in Cadence your Device/Interface (greyed out by the look of it) is an analog device and I'm guessing that that's probably why you're getting loads of xruns since the CPU can't process the analog.
From ALSA alone, without JACK and Pulseaudio, what is your default sound card?
Do you get the same quality audio when you run speaker-test -c 2?

Offline

#3 2020-05-10 14:22:24

Ploppz
Member
Registered: 2013-09-14
Posts: 311

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

In cadence, "Device/Interface" is greyed out when "Duplex mode" is checked, and then you have to select Input and Output device so I think you can ignore that field.

$    cat /proc/asound/cards
 0 [Snowball       ]: USB-Audio - Blue Snowball
                      BLUE MICROPHONE Blue Snowball at usb-0000:03:00.0-2, full speed
 1 [HDMI           ]: HDA-Intel - HDA ATI HDMI
                      HDA ATI HDMI at 0xfe960000 irq 49
 2 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfe800000 irq 51

I'm pretty sure 2 is the one I'm using then. It's the one I should use for output.
What's the problem with an analog device? I tried to change it to the Digital entry in the dropdown list but then Jack fails to start. Logs:

Sun May 10 16:20:00 2020: ------------------
Sun May 10 16:20:00 2020: Controller activated. Version 1.9.14 (unknown) built on Tue Nov 19 19:56:27 2019
Sun May 10 16:20:00 2020: ERROR: Could not open component .so '/usr/lib/jack/jack_firewire.so': libffado.so.2: cannot open shared object file: No such file or directory
Sun May 10 16:20:00 2020: ERROR: Could not open component .so '/usr/lib/jack/jack_firewire.so': libffado.so.2: cannot open shared object file: No such file or directory
Sun May 10 16:20:00 2020: ERROR: jack_get_descriptor : dll jack_firewire.so is not a driver
Sun May 10 16:20:00 2020: ERROR: jack_get_descriptor returns null for 'jack_firewire.so'
Sun May 10 16:20:00 2020: ERROR: Could not open component .so '/usr/lib/jack/jack_firewire.so': libffado.so.2: cannot open shared object file: No such file or directory
Sun May 10 16:20:00 2020: Loading settings from "/home/ploppz/.config/jack/conf.xml" using expat_2.2.9 ...
Sun May 10 16:20:00 2020: setting parameter 'engine':'driver':'(null)' to value "alsa"
Sun May 10 16:20:00 2020: setting parameter 'drivers':'alsa':'device' to value "hw:Generic,0"
Sun May 10 16:20:00 2020: setting parameter 'drivers':'alsa':'capture' to value "hw:Snowball,0"
Sun May 10 16:20:00 2020: setting parameter 'drivers':'alsa':'playback' to value "hw:Generic,1"
Sun May 10 16:20:00 2020: setting parameter 'drivers':'alsa':'period' to value "1024"
Sun May 10 16:20:00 2020: setting parameter 'drivers':'alsa':'monitor' to value "false"
Sun May 10 16:20:00 2020: Listening for D-Bus messages
Sun May 10 16:20:10 2020: Starting jack server...
Sun May 10 16:20:10 2020: ERROR: `default' server already active
Sun May 10 16:20:10 2020: ERROR: Failed to open server

Edit: in pavucontrol, nothing loads ("Establishing connection to PulseAudio. Please wait..") and even when I quit cadence, I cannot play any sound...

> Do you get the same quality audio when you run speaker-test -c 2?
Yes and now I hear clearer what is actually happening. It sounds like it's rapidly altering between volume 100% and volume 0% (perhaps at 10 Hz).

Last edited by Ploppz (2020-05-10 14:24:47)

Offline

#4 2020-05-10 17:26:09

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

Was ALSA is working properly before you installed Pulse and JACK?
What is the output of

aplay -lL
speaker-test -c 2
amixer
pacmd list-cards
pacmd list-sinks

with both JACK and Pulse disabled?
Also delete whatever asoundrc you have configured in your home directory. (You can save it somewhere if you wish).

Last edited by d_fajardo (2020-05-10 17:28:07)

Offline

#5 2020-05-10 17:47:44

Ploppz
Member
Registered: 2013-09-14
Posts: 311

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

I have not been using ALSA alone, only ALSA + Pulseaudio, and this setup worked fine, and still works fine now after I rebooted.
Do you still want me to try with ALSA alone? Haven't been able to turn off Pulseaudio. `.pulse/client.conf` has `autospawn = no`, but after I run `pulseaudio --kill`, it does autospawn (I can see that in e.g. pavucontrol - it briefly waits for connection then it's back to normal.

Offline

#6 2020-05-10 21:50:27

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

It's good idea to see what output you get with speaker test using ALSA alone just to make sure your ALSA is using the default  card you intend to use, and that the sound is OK.
You should be able to kill pulse and restart as you wish. Try killall pulseaudio. You might need to find out what's spawning it automatically.

Offline

#7 2020-05-11 19:56:35

Ploppz
Member
Registered: 2013-09-14
Posts: 311

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

Ok, I killed pulseaudio (had to 'mask' pulseaudio.socket via systemctl)

~  $ aplay -lL
surround21
    2.1 Surround output to Front and Subwoofer speakers
surround40
    4.0 Surround output to Front and Rear speakers
surround41
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50
    5.0 Surround output to Front, Center and Rear speakers
surround51
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
null
    Discard all samples (playback) or generate zero samples (capture)
samplerate
    Rate Converter Plugin Using Samplerate Library
speexrate
    Rate Converter Plugin Using Speex Resampler
jack
    JACK Audio Connection Kit
oss
    Open Sound System
pulse
    PulseAudio Sound Server
speex
    Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
default
    Default ALSA Output (currently PulseAudio Sound Server)
hdmi:CARD=HDMI,DEV=0
    HDA ATI HDMI, HDMI 0
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=1
    HDA ATI HDMI, HDMI 1
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=2
    HDA ATI HDMI, HDMI 2
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=3
    HDA ATI HDMI, HDMI 3
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=4
    HDA ATI HDMI, HDMI 4
    HDMI Audio Output
hdmi:CARD=HDMI,DEV=5
    HDA ATI HDMI, HDMI 5
    HDMI Audio Output
usbstream:CARD=HDMI
    HDA ATI HDMI
    USB Stream Output
sysdefault:CARD=Generic
    HD-Audio Generic, ALC892 Analog
    Default Audio Device
front:CARD=Generic,DEV=0
    HD-Audio Generic, ALC892 Analog
    Front speakers
surround21:CARD=Generic,DEV=0
    HD-Audio Generic, ALC892 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic,DEV=0
    HD-Audio Generic, ALC892 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic,DEV=0
    HD-Audio Generic, ALC892 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic,DEV=0
    HD-Audio Generic, ALC892 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic,DEV=0
    HD-Audio Generic, ALC892 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic,DEV=0
    HD-Audio Generic, ALC892 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Generic,DEV=0
    HD-Audio Generic, ALC892 Digital
    IEC958 (S/PDIF) Digital Audio Output
usbstream:CARD=Generic
    HD-Audio Generic
    USB Stream Output
usbstream:CARD=Snowball
    Blue Snowball
    USB Stream Output
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: HDMI [HDA ATI HDMI], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
~  $ speaker-test -c 2

speaker-test 1.2.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory
~  $ amixer
Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',1
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',2
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',3
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',4
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',5
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
~  $ pacmd list-cards
No PulseAudio daemon running, or not running as session daemon.

~ $ pacmd list-sinks
No PulseAudio daemon running, or not running as session daemon.

(why the last two if pulseaudio is off?)

Offline

#8 2020-05-11 22:28:35

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

(why the last two if pulseaudio is off?)

No those commands don't work without pulse.
But it is clear your ALSA is not working properly:

ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
Playback open error: -2,No such file or directory

Try to get a clear output from ALSA first before adding pulse and JACK. The speaker test should work cleanly on ALSA alone.
Try a different card:

speaker-test -D default:PCH -c 8
aplay -L | grep :CARD

And have a look at the ALSA wiki.

EDIT: Do you have an asoundrc? It's either in /etc/asoundrc or ~/.asoundrc. Temporarily delete them (copy somewhere safe) while testing ALSA.

Last edited by d_fajardo (2020-05-11 22:33:05)

Offline

#9 2020-05-12 07:37:51

Ploppz
Member
Registered: 2013-09-14
Posts: 311

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

Alright, I had deleted .asoundrc, but now I deleted /etc/asound.conf.

$ aplay -L | grep :CARD
hdmi:CARD=HDMI,DEV=0
hdmi:CARD=HDMI,DEV=1
hdmi:CARD=HDMI,DEV=2
hdmi:CARD=HDMI,DEV=3
hdmi:CARD=HDMI,DEV=4
hdmi:CARD=HDMI,DEV=5
usbstream:CARD=HDMI
default:CARD=Generic
sysdefault:CARD=Generic
front:CARD=Generic,DEV=0
surround21:CARD=Generic,DEV=0
surround40:CARD=Generic,DEV=0
surround41:CARD=Generic,DEV=0
surround50:CARD=Generic,DEV=0
surround51:CARD=Generic,DEV=0
surround71:CARD=Generic,DEV=0
iec958:CARD=Generic,DEV=0
usbstream:CARD=Generic
usbstream:CARD=Snowball

So I tried

$ speaker-test -c 2 -D default:Generic

Which worked!

From `aplay -l` it seems like Generic is card number 1. Why does aplay -L say "default:CARD=Generic" though? If it was default why would I have to specify it on speaker-test?
How can I find which card ALSA uses now (which does not work)?

Offline

#10 2020-05-12 08:03:07

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,747

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

The default card with the pulseaudio-alsa config tries to invoke a pulse server.  but reads weird that it tries to invoke a dmix. FWIW, what is your end goal here? The mentioned applications so far don't really benefit from jack and you are introducing a lot of complexity for potentially little gain. Generic is also often a strange default codec to have what do you get for

sudo fuser -v /dev/snd/*
systool -vm snd_hda_intel #Needs sysfsutils

Last edited by V1del (2020-05-12 08:06:02)

Online

#11 2020-05-12 11:09:04

Ploppz
Member
Registered: 2013-09-14
Posts: 311

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

I'm installing JACK so that I can use Ardour and produce sounds and music. I want it to play well with other apps like Firefox, Spotify and Discord, so that's what I'm testing first, and that's why I need Pulseaudio as well.

$ sudo fuser -v /dev/snd/*
$ systool -vm snd_hda_intel
Module = "snd_hda_intel"

  Attributes:
    coresize            = "57344"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "0"
    srcversion          = "A1E50883834174BF30093EF"
    taint               = ""
    uevent              = <store method only>

  Parameters:
    align_buffer_size   = "-1"
    bdl_pos_adj         = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
    beep_mode           = "Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y"
    dmic_detect         = "Y"
    enable_msi          = "-1"
    enable              = "Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y,Y"
    id                  = "(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)"
    index               = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
    jackpoll_ms         = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
    model               = "(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)"
    patch               = "(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null),(null)"
    pm_blacklist        = "Y"
    position_fix        = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
    power_save          = "0"
    power_save_controller= "Y"
    probe_mask          = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
    probe_only          = "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"
    single_cmd          = "-1"
    snoop               = "-1"

  Sections:

(the first command had no output)

Edit:

I tried to follow this and then reboot, but it had no effect.

~  $ cat /etc/modprobe.d/alsa-base.conf
options snd_hda_intel index=0
options snd_usb_audio index=1
~  $ cat /proc/asound/modules
 0 snd_hda_intel
 1 snd_hda_intel

`snd_usb_audio` was in the second output at index 0 previously and now it's gone. Blue snowball is gone from `aplay -l`. I guess I'll revert what I did here.

Last edited by Ploppz (2020-05-12 11:18:36)

Offline

#12 2020-05-12 11:47:41

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

I'm installing JACK so that I can use Ardour and produce sounds and music.

In that case it's probably best to concentrate in having ALSA and JACK working together first then adding Pulse later.
I won't worry about your snowball for now. It's important you get ALSA right with the correct sound card. When your JACK is setup properly later on, it will be easy to add devices, including the snowball.
Now that snd_hda_intel is set to index 0, that should be the default card. What is the output of the simple speaker test?
I have no idea how to read the systool output V1del suggested by the way.

Offline

#13 2020-05-12 12:01:12

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,747

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

If you want to ensure the index loading order specify all indices explicitly, or rather define negative indices so that the devices you don't want at first position get a later position for example

#This shifts the analog card to position 0 and the HDMI card to 1
options snd_hda_intel index=1,0 
#This tells the snd_usb_audio to take whatever index up to 2 -(index+1) but if 2 isn't free it's also free to take position 3 
options snd_usb_audio index=-3 

but all of that is just skirting around the underlying issue. If you now start jack, therefore without the pulseaudio bridge/support, do you still get warnings/xruns? For the realtime permissions to be properly set up it should probably be sufficient to install the realtime-privileges package (and rebooting/relogging at the least)

Online

#14 2020-05-12 17:47:55

Ploppz
Member
Registered: 2013-09-14
Posts: 311

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

Thanks! Your modprobe conf made it selectc the right default card!

Now in Cadence, I selected "ALSA -> JACK (Plugin)" bridge and started Jack - it seems successful and after 10 minutes (with some playback from e.g. Firefox) there are only 2 Xruns.

I was also able to run Ardour. So I suppose that ALSA + JACK is now just fine, thanks!

Next, I try to add pulseaudio.

I copied back my /etc/asound.conf which I think makes it work with pulseaudio:

pcm.!default {
  type pulse
  fallback "sysdefault"
  hint {
    show on
    description "Default ALSA Output (currently PulseAudio Sound Server)"
  }
}

ctl.!default {
  type pulse
  fallback "sysdefault"
}

I noticed that (probably cadence) generated a new ~/.asoundrc that seems specific to JACK, so I use my old ~/.asoundrc from when I had ALSA + Pulseaudio:

pcm.!default {
    type plug
    slave { pcm "pulse" }
}

pcm.pulse {
    type pulse
}

ctl.mixer0 {
    type hw
    card 0
}

ALSA + Pulseaudio thus works together now (at some point it didn't, before I copied back the old asound.conf and .asoundrc). And when I try to start JACK through Cadence with the pulseaudio bridge, then it all seems fine: no Xruns, and I can see volume bars moving in pavucontrol. However, I don't hear any sound.

Two screenshots showing pavucontrol: https://imgur.com/a/jzUFwC5 (while a video plays in firefox in the background).

Then, under the Playback tab, I tried to change the output device(?) of Firefox from "Jack sink ..." to "Family 17h ..." which is what normally outputs sound I think. But then Firefox cannot output sound anymore (video stops playing).
I'm not sure how I'm supposed to do this.
Here is a screenshot from Catia if it helps:  https://i.imgur.com/L3XV3R9.png

Offline

#15 2020-05-12 21:50:30

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

It's the Family Output Device. Again that's the analog one. Pulse is not finding the right output device,

Offline

#16 2020-05-12 22:16:37

Ploppz
Member
Registered: 2013-09-14
Posts: 311

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

Is it really wrong? Because when using ALSA+Pulseaudio, the analog Family output device is used: https://i.imgur.com/xtyIRy6.png
And this works well, I hear sound.

Offline

#17 2020-05-12 22:49:53

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

And this works well, I hear sound.

Well if it works well and your happy with your device, then your problem is solved.

Offline

#18 2020-05-13 08:39:15

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,747

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

@d_fajardo the problem isn't solved as the pulseaudio -> jack bridge doesn't seem to work yet.

Double check in cadence that the pulse sink that's connecting to your jack daemon is being routed to the correct card (ah wait apparently you did that, does refreshing the firefox tab after doing that help?). I'd completely expect that switching the sink to the "usual sound producing family sink" will not produce sound anymore, because jack is now handling that device. Maybe post during that situation

sudo fuser -v /dev/snd/*
pacmd list-sinks
pacmd list-sink-inputs

again.

Last edited by V1del (2020-05-13 08:42:23)

Online

#19 2020-05-13 17:54:55

Ploppz
Member
Registered: 2013-09-14
Posts: 311

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

The screenshot from Catia shows the default configuration (I didn't touch anything). I don't know how to ensure that it's routed to the correct card but if you think the routing in Catia looks good would that be sufficient?

Refreshing tab or restarting Firefox does not help.
(inadverently) restarting pulseaudio has _some_ effect: in pavucontrol there is now only the "Jack sink" output device, not the Family one.
(what really happened was: In Cadence I pressed "force restart", after which pulseaudio stopped working so I had to kill it and restart it, after which I could "Start" JACK in Cadence)

Output of commands in this situation:

~  $ sudo fuser -v /dev/snd/*
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  ploppz     6323 F.... jackdbus
/dev/snd/controlC1:  ploppz     6868 F.... pulseaudio
/dev/snd/pcmC0D1p:   ploppz     6323 F...m jackdbus
/dev/snd/pcmC2D0c:   ploppz     6323 F...m jackdbus
~  $ pacmd list-sinks
1 sink(s) available.
  * index: 0
	name: <jack_out>
	driver: <module-jack-sink.c>
	flags: DECIBEL_VOLUME LATENCY FLAT_VOLUME
	state: RUNNING
	suspend cause: (none)
	priority: 0
	volume: front-left: 63819 /  97% / -0.69 dB,   front-right: 63819 /  97% / -0.69 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 122.39 ms
	max request: 16 KiB
	max rewind: 0 KiB
	monitor source: 0
	sample spec: float32le 2ch 48000Hz
	channel map: front-left,front-right
	             Stereo
	used by: 1
	linked by: 3
	fixed latency: 85.33 ms
	module: 8
	properties:
		device.api = "jack"
		device.description = "Jack sink (PulseAudio JACK Sink)"
		jack.client_name = "PulseAudio JACK Sink"
		device.icon_name = "audio-card"
~  $ pacmd list-sink-inputs
1 sink input(s) available.
    index: 3
	driver: <protocol-native.c>
	flags: START_CORKED
	state: RUNNING
	sink: 0 <jack_out>
	volume: front-left: 63819 /  97% / -0.69 dB,   front-right: 63819 /  97% / -0.69 dB
	        balance 0.00
	muted: no
	current latency: 135.33 ms
	requested latency: 85.33 ms
	sample spec: float32le 2ch 48000Hz
	channel map: front-left,front-right
	             Stereo
	resample method: (null)
	module: 11
	client: 6 <Firefox>
	properties:
		media.name = "AudioStream"
		application.name = "Firefox"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "33"
		application.process.id = "6965"
		application.process.user = "ploppz"
		application.process.host = "nadir"
		application.process.binary = "firefox"
		application.language = "en_GB.UTF-8"
		window.x11.display = ":0"
		application.process.machine_id = "8290e485e41347598fcf908607e83ca0"
		application.process.session_id = "1"
		application.icon_name = "firefox"
		module-stream-restore.id = "sink-input-by-application-name:Firefox"

Edit: as it is a less common situation where I have to force restart pulseaudio, this is the output after I reboot, start firefox, play a song, start JACK through Cadence, and set the output sink of Firefox to the Jack sink. Quite a lot more verbose, as it usually has 2 sinks:

~  $ sudo fuser -v /dev/snd/*
                     USER        PID ACCESS COMMAND
/dev/snd/controlC0:  ploppz     1038 F.... pulseaudio
                     ploppz     5040 F.... jackdbus
/dev/snd/controlC1:  ploppz     1038 F.... pulseaudio
/dev/snd/controlC2:  ploppz     1038 F.... pulseaudio
/dev/snd/pcmC0D1p:   ploppz     5040 F...m jackdbus
/dev/snd/pcmC2D0c:   ploppz     5040 F...m jackdbus
~  $ pacmd list-sinks
2 sink(s) available.
    index: 0
	name: <alsa_output.pci-0000_22_00.3.analog-surround-21>
	driver: <module-alsa-card.c>
	flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY FLAT_VOLUME
	state: SUSPENDED
	suspend cause: APPLICATION
	priority: 9039
	volume: front-left: 34442 /  53% / -16.76 dB,   front-right: 34442 /  53% / -16.76 dB,   lfe: 34442 /  53% / -16.76 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max request: 0 KiB
	max rewind: 0 KiB
	monitor source: 1
	sample spec: s32le 3ch 44100Hz
	channel map: front-left,front-right,lfe
	used by: 0
	linked by: 1
	fixed latency: 100.14 ms
	card: 2 <alsa_card.pci-0000_22_00.3>
	module: 8
	properties:
		alsa.resolution_bits = "32"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC892 Analog"
		alsa.id = "ALC892 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HD-Audio Generic"
		alsa.long_card_name = "HD-Audio Generic at 0xfe800000 irq 51"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:22:00.3"
		sysfs.path = "/devices/pci0000:00/0000:00:08.1/0000:22:00.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "1022"
		device.vendor.name = "Advanced Micro Devices, Inc. [AMD]"
		device.product.id = "1457"
		device.product.name = "Family 17h (Models 00h-0fh) HD Audio Controller"
		device.string = "surround21:0"
		device.buffering.buffer_size = "52992"
		device.buffering.fragment_size = "13248"
		device.access_mode = "mmap"
		device.profile.name = "analog-surround-21"
		device.profile.description = "Analog Surround 2.1"
		device.description = "Family 17h (Models 00h-0fh) HD Audio Controller Analog Surround 2.1"
		alsa.mixer_name = "Realtek ALC892"
		alsa.components = "HDA:10ec0892,1462fa37,00100302"
		module-udev-detect.discovered = "1"
		device.icon_name = "audio-card-pci"
	ports:
		analog-output-lineout: Line Out (priority 9000, latency offset 0 usec, available: yes)
			properties:
				
	active port: <analog-output-lineout>
  * index: 1
	name: <jack_out>
	driver: <module-jack-sink.c>
	flags: DECIBEL_VOLUME LATENCY FLAT_VOLUME
	state: RUNNING
	suspend cause: (none)
	priority: 0
	volume: front-left: 65942 / 101% / 0.16 dB,   front-right: 65942 / 101% / 0.16 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 104.38 ms
	max request: 16 KiB
	max rewind: 0 KiB
	monitor source: 2
	sample spec: float32le 2ch 48000Hz
	channel map: front-left,front-right
	             Stereo
	used by: 1
	linked by: 3
	fixed latency: 85.33 ms
	module: 25
	properties:
		device.api = "jack"
		device.description = "Jack sink (PulseAudio JACK Sink)"
		jack.client_name = "PulseAudio JACK Sink"
		device.icon_name = "audio-card"
~  $ pacmd list-sink-inputs
1 sink input(s) available.
    index: 3
	driver: <protocol-native.c>
	flags: START_CORKED
	state: RUNNING
	sink: 1 <jack_out>
	volume: front-left: 30768 /  47% / -19.70 dB,   front-right: 30768 /  47% / -19.70 dB
	        balance 0.00
	muted: no
	current latency: 110.00 ms
	requested latency: 85.33 ms
	sample spec: float32le 2ch 48000Hz
	channel map: front-left,front-right
	             Stereo
	resample method: (null)
	module: 11
	client: 9 <Firefox>
	properties:
		media.name = "AudioStream"
		application.name = "Firefox"
		native-protocol.peer = "UNIX socket client"
		native-protocol.version = "33"
		application.process.id = "3774"
		application.process.user = "ploppz"
		application.process.host = "nadir"
		application.process.binary = "firefox"
		application.language = "en_GB.UTF-8"
		window.x11.display = ":0"
		application.process.machine_id = "8290e485e41347598fcf908607e83ca0"
		application.process.session_id = "1"
		application.icon_name = "firefox"
		module-stream-restore.id = "sink-input-by-application-name:Firefox"

Last edited by Ploppz (2020-05-13 18:07:40)

Offline

#20 2020-05-13 20:30:21

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

In pavu control, what is in the Configuration tab for the built-in audio?

Offline

#21 2020-05-13 22:32:52

Ploppz
Member
Registered: 2013-09-14
Posts: 311

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

Configuration menu: https://i.imgur.com/96G0g51.png

Family device options: https://i.imgur.com/IMmYI3R.png

Offline

#22 2020-05-13 23:19:03

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,747

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

I think pulse is fine, jack is currently not routing properly, but I'm not entirely familiar with jack (yet) so I'm unsure by what metric you need to connect the jacks.

Online

#23 2020-05-14 08:09:51

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,568

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

Can you post a snapshot of your Cadence and Catia settings again?

Offline

#24 2020-05-14 11:34:57

Ploppz
Member
Registered: 2013-09-14
Posts: 311

Re: [SOLVED] Can't set up PulseAudio + Jack with Cadence (no sound, xruns)

Looking at Cadence settings I found that it was using Digital output so I tried Analog and now ALSA+PA+JACK works!
Thank you both very much!

Offline

Board footer

Powered by FluxBB