JACK not working for alsaequal: failed to jack_connect()

Questions about software.
MatthewLM
Posts: 42
Joined: 19 Apr 2014 12:05

JACK not working for alsaequal: failed to jack_connect()

Postby MatthewLM » 14 Sep 2014 20:05

Hello, I installed jackd2, libasound2-dev, libasound2-plugin-equal, lib64asound2-plugins and libasound2-plugin-equal. I changed my ~/.asoundrc to:

Code: Select all

ctl.equal {
	type equal;
}

pcm.plugequal {
	type equal;
	slave.pcm "plughw:2";
}

pcm.!default {
	type plug;
	slave.pcm plugequal;
}
And /etc/modprobe.d/alsa-base.conf to:

Code: Select all

# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7
# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe --ignore-install snd && { /sbin/modprobe --quiet snd-ioctl32 ; /sbin/modprobe --quiet snd-seq ; : ; }
install snd-rawmidi /sbin/modprobe --ignore-install snd-rawmidi && { /sbin/modprobe --quiet snd-seq-midi ; : ; }
install snd-emu10k1 /sbin/modprobe --ignore-install snd-emu10k1 && { /sbin/modprobe --quiet snd-emu10k1-synth ; : ; }
# Keep snd-pcsp from beeing loaded as first soundcard
options snd-pcsp index=-2
# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
options snd-hda-intel model=auto
options snd-usb-audio ignore_ctl_error=1
options snd-hda-intel id=U7 index=0
options snd-hda-intel id=PCH index=1
However, when I try to test alsaequal I get an error with JACK:

Code: Select all

$ mpg123 -a hw:equal ~/Music/Orders\ From\ Mordor\ \(LOTR\ Remix\).mp3 
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jackdmp 1.9.10
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2014 Grame.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
no message buffer overruns
no message buffer overruns
no message buffer overruns
JACK server starting in realtime mode with priority 10
self-connect-mode is "Don't restrict self connect requests"
audio_reservation_init
Acquire audio card Audio2
creating alsa driver ... hw:U7|hw:U7|1024|2|48000|0|0|nomon|swmeter|-|32bit
ALSA: Cannot open PCM device alsa_pcm for capture. Falling back to playback-only mode
configuring for 48000Hz, period = 1024 frames (21.3 ms), buffer = 2 periods
ALSA: final selected sample format for playback: 24bit little-endian
ALSA: use 2 periods for playback
Registered as JACK client mpg123-22514.
Unknown destination port in attempted (dis)connection src_name [mpg123-22514:left] dst_name [hw:equal]

[jack.c:127] error: connect_jack_ports(): failed to jack_connect() ports: -1
[jack.c:58] warning: FIXME: One needs to wait or write some silence here to prevent the last bits of audio to vanish out of the ringbuffer.
JackTemporaryException : now quits...
Jack main caught signal 2
Segmentation fault

User avatar
Snap
Posts: 1244
Joined: 25 Aug 2013 20:01
Location: Spain

Re: JACK not working for alsaequal: failed to jack_connect()

Postby Snap » 15 Sep 2014 04:22

64 bit system? alsaequal doesn't support multilib. 32 bit apps won't play if enabled. This might help.
This likely means that your installation is broken. -Mr Pixbuf.

Image

MatthewLM
Posts: 42
Joined: 19 Apr 2014 12:05

Re: JACK not working for alsaequal: failed to jack_connect()

Postby MatthewLM » 17 Sep 2014 09:22

Thanks, though the problem I have appears to be unrelated. It appears to be a problem with the connection to the JACK server.

User avatar
Snap
Posts: 1244
Joined: 25 Aug 2013 20:01
Location: Spain

Re: JACK not working for alsaequal: failed to jack_connect()

Postby Snap » 17 Sep 2014 09:50

The problem seems to be here:

Code: Select all

Unknown destination port in attempted (dis)connection src_name [mpg123-22514:left] dst_name [hw:equal]

[jack.c:127] error: connect_jack_ports(): failed to jack_connect() ports: -1
What's the output of:

Code: Select all

jack_lsp
This likely means that your installation is broken. -Mr Pixbuf.

Image

User avatar
Snap
Posts: 1244
Joined: 25 Aug 2013 20:01
Location: Spain

Re: JACK not working for alsaequal: failed to jack_connect()

Postby Snap » 17 Sep 2014 10:52

Hey wait. How many soundcards do you have onboard? Three?

Code: Select all

slave.pcm "plughw:2";
What's the otput of

Code: Select all

aplay -l
This likely means that your installation is broken. -Mr Pixbuf.

Image

MatthewLM
Posts: 42
Joined: 19 Apr 2014 12:05

Re: JACK not working for alsaequal: failed to jack_connect()

Postby MatthewLM » 17 Sep 2014 11:22

Code: Select all

$ jack_lsp
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JACK server not running

Code: Select all

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH_1 [HDA Intel PCH], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH_1 [HDA Intel PCH], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel HDMI], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: PCH [HDA Intel HDMI], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: U7 [Xonar U7], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 2: U7 [Xonar U7], device 1: USB Audio [USB Audio #1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: U7 [Xonar U7], device 2: USB Audio [USB Audio #2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

User avatar
Snap
Posts: 1244
Joined: 25 Aug 2013 20:01
Location: Spain

Re: JACK not working for alsaequal: failed to jack_connect()

Postby Snap » 17 Sep 2014 12:30

I'm not sure if for cards with more than one device using the card ID number alone will work without specifying the device ID. It works fine for single device cards. Try to specify a device and check if it works.

Code: Select all

slave.pcm "plughw:2,0";
Or 2,1 or 2,2

Or try the driver name instead
card 2: U7 [Xonar U7], device 0: USB Audio [USB Audio]
Like this:

Code: Select all

slave.pcm "plughw:U7";
This likely means that your installation is broken. -Mr Pixbuf.

Image

MatthewLM
Posts: 42
Joined: 19 Apr 2014 12:05

Re: JACK not working for alsaequal: failed to jack_connect()

Postby MatthewLM » 17 Sep 2014 15:37

I tried all of those things to no avail. I used "sudo alsa force-reload" after changing the file.

Edit:

I found several lines of this in the logs:

Code: Select all

Sep 17 10:18:56 matts-pc pulseaudio[4021]: [pulseaudio] alsa-mixer.c: Volume element Speaker has 8 channels. That's too much! I can't handle that!
The time of this message is about 2-3 minutes after I booted the machine.

User avatar
Snap
Posts: 1244
Joined: 25 Aug 2013 20:01
Location: Spain

Re: JACK not working for alsaequal: failed to jack_connect()

Postby Snap » 17 Sep 2014 16:05

Aaaaah... the old "good" pulseaudio strikes again with a new issue... I thought you were using ALSA alone.

Can you try to stop the pulseaudio service and try again just through ALSA?

Code: Select all

$ pulseaudio -k
To start it again (if you want that)

Code: Select all

$ pulseaudio --start
This likely means that your installation is broken. -Mr Pixbuf.

Image

MatthewLM
Posts: 42
Joined: 19 Apr 2014 12:05

Re: JACK not working for alsaequal: failed to jack_connect()

Postby MatthewLM » 17 Sep 2014 16:19

I couldn't get it to work. The only thing disabling pulseaudio did is completely remove sound from the system, and after starting it again the sound is still not working, so I guess I'll have to restart.

User avatar
Snap
Posts: 1244
Joined: 25 Aug 2013 20:01
Location: Spain

Re: JACK not working for alsaequal: failed to jack_connect()

Postby Snap » 17 Sep 2014 16:25

That's the idea. Getting pulse out of the way leaving ALSA alone. You may need to configure pulse without automatic respawn in order to start it or stop it manually without loosing audio

https://wiki.archlinux.org/index.php/Pu ... dio_server

PS, notice that a huuuge part of that guide is dedicated to troubleshooting pulse... Pulse is a hard pony to ride. ALSA is way more stable and easier to make it work properly.
This likely means that your installation is broken. -Mr Pixbuf.

Image

MatthewLM
Posts: 42
Joined: 19 Apr 2014 12:05

Re: JACK not working for alsaequal: failed to jack_connect()

Postby MatthewLM » 17 Sep 2014 17:16

OK. I managed to get into a situation where I have the alsaequal driver active in KDE, and the equaliser works. I set the correct master channel as the "Speaker" one on the U7, but the volume does not adjust nicely, most of the volume is concentrated at the top end of the volume level. It's like it's gone from linear to logarithmic in scale. Also flash is giving no audio output.

User avatar
Snap
Posts: 1244
Joined: 25 Aug 2013 20:01
Location: Spain

Re: JACK not working for alsaequal: failed to jack_connect()

Postby Snap » 17 Sep 2014 17:27

Still in pulse?
most of the volume is concentrated at the top end of the volume level
It seems the controller is linear.

PS, Haven't fully configured my sound system yet (lazy me). At this point I'm using pulse through jack and then to FFADO for my RME FF800 card. I have no issues other than sometimes pulse starts too early after jack and jack complaints, so chopping off pulseaudio altogether and setting the other two cards properly with ALSA is always delayed in my never ending to do list. I'd should do it soon and making a tutorial.
This likely means that your installation is broken. -Mr Pixbuf.

Image

MatthewLM
Posts: 42
Joined: 19 Apr 2014 12:05

Re: JACK not working for alsaequal: failed to jack_connect()

Postby MatthewLM » 17 Sep 2014 18:10

Thanks for your help. I'm sure others will stumble upon this and find it helpful.

I think I'm going to keep pulseaudio running as everything works properly when it is. In regards to alsaequal I realised that I probably can't use it to solve my speaker sound problem. It's not just that the bass is boomy sounding but there is a particular problem with resonance around 150Hz. Merely reducing bass frequencies doesn't help, and alsaequal does not appear to allow for high precision adjustments.

I'm going to have to fix the hardware I reckon. There is little use for software.

User avatar
Snap
Posts: 1244
Joined: 25 Aug 2013 20:01
Location: Spain

Re: JACK not working for alsaequal: failed to jack_connect()

Postby Snap » 17 Sep 2014 18:57

You can use an eq in pulse instead of ALSA. Perhaps it behaves better. I should have the tutorial somewhere. I'll try to find it.

Or, if you use jackctl (with patchage) or even better, Cadence... do you? You can add and patch whatever plugins you want. A rather complex thing for basic daily use, indeed. But soundcards and converters aside, you cannot beat that setup in terms of quality.

PS, In other hand, i don't like to use graph Eqs. You can tweak problematic spots much better and precisely with parametrics. Graphics are fine for live sound. A dirty fast solution for PA and monitors. But for home or studio? No way. Unless they are of proportional curve type, but they are not for corrective equalization, and that's a completely different story.
This likely means that your installation is broken. -Mr Pixbuf.

Image

User avatar
Snap
Posts: 1244
Joined: 25 Aug 2013 20:01
Location: Spain

Re: JACK not working for alsaequal: failed to jack_connect()

Postby Snap » 17 Sep 2014 19:10

Well, this was faster than diving into my documents. 8-)

https://wiki.archlinux.org/index.php/Pu ... #Equalizer
This likely means that your installation is broken. -Mr Pixbuf.

Image

MatthewLM
Posts: 42
Joined: 19 Apr 2014 12:05

Re: JACK not working for alsaequal: failed to jack_connect()

Postby MatthewLM » 17 Sep 2014 19:14

The resonance I'm talking about happens in a range of maybe 5 Hz. I would indeed need something with high fine tuning. I can lower nearby frequencies but at the cost of sound quality.

Clearly there is a problem with my sound system, most likely the speakers, and I ought to sort that out (to my unfortunate expense no doubt). I find that my headphones give good sound. There's no problem at 150Hz or otherwise with them.

User avatar
Snap
Posts: 1244
Joined: 25 Aug 2013 20:01
Location: Spain

Re: JACK not working for alsaequal: failed to jack_connect()

Postby Snap » 17 Sep 2014 19:21

Clearly there is a problem with my sound system, most likely the speakers
Or the room, or the speakers placement...

I've never used the pulse eq. No idea about how it works. But with alsaequal, though intended for the CAPS LADSPA equalizer at first instance, you can replace that Eq with any other LADSPA plugin you like. As I told you before, a parametric Eq is the ideal dirty solution for your problem.
This likely means that your installation is broken. -Mr Pixbuf.

Image


Return to “Software”

Who is online

Users browsing this forum: No registered users and 4 guests