Jack Audio Connection Kit

August 18th, 2012 - 05:42 pm ET by GuitarPick | Report spam
Using kde4 on opensuse 12.1 (64)


I'm trying to get JACK to work because it's a Rosegarden requisite


The only way I can get the control kit to start only JACK
is if the "driver" in setup is set to "dummy".

What "is" a dummy driver, no fdriver at all?

If I set it to OSS I get this short fail list

21:17:57.429 Patchbay deactivated.
21:17:57.430 Statistics reset.
21:17:57.431 ALSA connection change.
Cannot connect to server socket err = Connection refused
Cannot connect to server socket
jack server is not running or cannot be started
21:17:57.435 ALSA connection graph change.
21:17:59.644 JACK is starting...
21:17:59.644 /usr/bin/jackd -v -m -doss -r48000 -p1024 -n2 -w16
Cannot connect to server socket err = Connection refused
Cannot connect to server socket
jack server is not running or cannot be started


..and this loooong one if I try ALSA


21:19:46.543 Patchbay deactivated.
21:19:46.545 Statistics reset.
21:19:46.546 ALSA connection change.
Cannot connect to server socket err = Connection refused
Cannot connect to server socket
jack server is not running or cannot be started
21:19:46.549 ALSA connection graph change.
21:19:48.740 JACK is starting...
21:19:48.740 /usr/bin/jackd -v -m -dalsa -dhw:0 -r48000 -p1024 -n2
Cannot connect to server socket err = Connection refused
Cannot connect to server socket
jack server is not running or cannot be started
21:19:48.746 JACK was started with PID160.

. a long seq. of the next few lines followed by the rest of it

Jack: JackRequest::Notification
Jack: JackEngine::NotifyClient: no callback for event = 3
Jack: JackEngine::NotifyClient: no callback for event = 3
Jack: fPollTable i = 1 fd = 11
Jack: JackRequest::Notification
Jack: ALSA XRun wait_status = 0
Jack: fPollTable i = 1 fd = 11
Jack: JackRequest::ConnectPorts
Jack: ALSA XRun wait_status = 0
Jack: JackEngine::PortConnect src = 32 dst = -1
Jack: JackGraphManager::AssertPort port_index = 4294967295
jackd: ../common/JackGraphManager.cpp:45: void
Jack::JackGraphManager::AssertPort(jack_port_id_t): Assertion
`port_index < fPortMax' failed.


If I start Rosegarden 1st and then just open the controller it shows
JACK already "Active" & "Stopped" & Rosegarden is still silent

What does "Stopped" mean? Isn't JACK a daemon that's always 'on watch'
as it were?


21:29:54.575 Patchbay deactivated.
21:29:54.577 Statistics reset.
21:29:54.578 ALSA connection change.
21:29:54.624 JACK connection change.
21:29:54.641 Client activated.
Cannot lock down memory area (Cannot allocate memory)
Jack: JackClient::SetupDriverSync driver sem in flush mode
Jack: JackPosixSemaphore::Connect jack_sem.1003_default_qjackctl
Jack: Already connected name = qjackctl
Jack: Clock source : system clock via clock_gettime
Jack: JackLibClient::Open name = qjackctl refnum = 3
Jack: jack_set_graph_order_callback ext_client 8dcf10 client 8dcf10
Jack: WaitGraphChange...
Jack: JackClient::Activate
Jack: JackClient::kActivateClient name = qjackctl ref = 3
Jack: JackClient::kGraphOrderCallback


Is there a better application then this rosegarden thing?

I just want to compose/play simple midi files for backtracks and print
sheet music, maybe what I need is one that uses the KDE sound instead of
all these contorsions that go nowhere.


Thanks
email Follow the discussionReplies 6 repliesReplies Make a reply

Similar topics

Replies

#1 J G Miller
August 19th, 2012 - 08:23 am ET | Report spam
On Saturday, August 18th, 2012, at 21:42:01h +0000,
GuitarPick explained:

If I set it to OSS I get this short fail list



Do not try to use OSS except as a last resort.

Assuming a standard installation from your distribution,
you will be using ALSA kernel modules to provide sound,
and if you choose OSS you are using the OSS compatibility
feature of ALSA.

..and this loooong one if I try ALSA



What is your default ALSA sound card device?

If you fire up alsamixer, look at the top left of the window
and check for "Card:"

If alsamixer fails to start, it is inevitable that your
default card is set to pulseaudio and you do not have
pulseaudio running for that user, which *may* also be
the problem you are having with jackd of "failed to connect",
but at the moment that is speculation.

You should also check the output of

pactl list sources short

pactl list sinks short

to see what pulseaudio is trying to use.
Replies Reply to this message
#2 GuitarPick
August 19th, 2012 - 11:09 am ET | Report spam
On 08/19/2012 12:23 PM, J G Miller wrote:

Do not try to use OSS except as a last resort.

Assuming a standard installation from your distribution,
you will be using ALSA kernel modules to provide sound,
and if you choose OSS you are using the OSS compatibility
feature of ALSA.



The only place I see OSS is in the ZynAddSubFX "Settings"
dialog

OSS Wave Out Device (?dev/...)
"/dev/dsp"


Thanks for the reply, I have two machines I'm trying this on and the
symptoms are not the same so I'm getting screwed up on a hyperbolic
curve! I think I posted from the desktop so I'll just cover that
first I hope I have all this right, wouldn't wanna complicate the
issue any further ;-)




DESKTOP


..and this loooong one if I try ALSA



What is your default ALSA sound card device?



cat /proc/asound/cards:

0 [SB ]: HDA-Intel - HDA ATI SB
HDA ATI SB at 0xfccf8000 irq 16

1 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xfe97c000 irq 25

I 'presume' this means that 0/SB is the card used by alsa

If you fire up alsamixer, look at the top left of the window
and check for "Card:"



Alsamixer says "Card:PulseAudio"

If alsamixer fails to start, it is inevitable that your
default card is set to pulseaudio and you do not have
pulseaudio running for that user, which *may* also be
the problem you are having with jackd of "failed to connect",
but at the moment that is speculation.



You should also check the output of

pactl list sources short



0 alsa_output.pci-0000_05_00.1.hdmi-stereo.monitor
module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
1 alsa_output.pci-0000_00_14.2.analog-stereo.monitor
module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
2 alsa_input.pci-0000_00_14.2.analog-stereo
module-alsa-card.c s16le 2ch 44100Hz SUSPENDED

pactl list sinks short



0 alsa_output.pci-0000_05_00.1.hdmi-stereo
module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
1 alsa_output.pci-0000_00_14.2.analog-stereo
module-alsa-card.c s16le 2ch 44100Hz SUSPENDED


Launching only Rosegarden seems to start JACK


-
14:04:08.963 Patchbay deactivated.
14:04:08.964 Statistics reset.
14:04:08.965 ALSA connection change.
14:04:09.006 JACK connection change.
14:04:09.022 Client activated.
Cannot lock down memory area (Cannot allocate memory)
Jack: JackClient::SetupDriverSync driver sem in flush mode
Jack: JackPosixSemaphore::Connect jack_sem.1003_default_qjackctl
Jack: Already connected name = qjackctl
Jack: Clock source : system clock via clock_gettime
Jack: JackLibClient::Open name = qjackctl refnum = 3
Jack: jack_set_graph_order_callback ext_client 902d20 client 902d20
Jack: WaitGraphChange...
Jack: JackClient::Activate
Jack: JackClient::kActivateClient name = qjackctl ref = 3
Jack: JackClient::kGraphOrderCallback
-

Rosegarden under General>Behavior>SequencerStatus> I get "MIDI OK, audio
OK" and under 'Details'


-
Rosegarden 11.02 - AlsaDriver [ALSA library version 1.0.24.1, module
version 1.0.24, kernel version 3.1.10-1.16-desktop]

JackDriver::initialiseAudio - JACK sample rate = 48000Hz, buffer size = 1023
JackDriver::initialiseAudio - creating disk thread
JackDriver::initialiseAudio - found 2 JACK physical outputs
JackDriver::initialiseAudio - connecting from "rosegarden:master out L"
to "system:playback_1"
JackDriver::initialiseAudio - connecting from "rosegarden:master out R"
to "system:playback_2"
JackDriver::initialiseAudio - found 2 JACK physical inputs
JackDriver::initialiseAudio - connecting from "system:capture_1" to
"rosegarden:record in 1 L"
JackDriver::initialiseAudio - connecting from "system:capture_2" to
"rosegarden:record in 1 R"
JackDriver::initialiseAudio - initialised JACK audio subsystem

ALSA Client information:

14,0 - (Midi Through, Midi Through Port-0) (DUPLEX) [ctype 2,
ptype 655362, cap 99]

Current timer set to "system timer" with timer checks
AlsaDriver::initialiseMidi - initialised MIDI subsystem

Current timer set to "system timer" with timer checks
AlsaDriver::setPlausibleConnection: connection like "" requested for
device 0
AlsaDriver::setPlausibleConnection: nothing suitable available
AlsaDriver::setPlausibleConnection: connection like "" requested for
device 1
AlsaDriver::setPlausibleConnection: nothing suitable available

ALSA Client information:

14,0 - (Midi Through, Midi Through Port-0) (DUPLEX) [ctype 2,
ptype 655362, cap 99]
-









PORTABLE

#cat /proc/asound/cards

0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0xf6a00000 irq 47
1 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xf4080000 irq 17

Alsamixer says "Card:PulseAudio"


#cat /proc/asound/cards

0 alsa_output.pci-0000_01_00.1.hdmi-stereo.monitor
module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
1 alsa_output.pci-0000_00_1b.0.analog-stereo.monitor
module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
2 alsa_input.pci-0000_00_1b.0.analog-stereo
module-alsa-card.c s16le 2ch 44100Hz SUSPENDED

#pactl list sources short
0 alsa_output.pci-0000_01_00.1.hdmi-stereo
module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
1 alsa_output.pci-0000_00_1b.0.analog-stereo
module-alsa-card.c s16le 2ch 44100Hz SUSPENDED


On this one I can start jack with "Driver:alsa" but regardless of
whether I start it first Rosegarden General>Behavior>SequencerStatus>
gives "MIDI OK, audio OK" but under 'Details'

-
Rosegarden 11.02 - AlsaDriver [ALSA library version 1.0.24.1, module
version 1.0.24, kernel version 3.1.10-1.16-desktop]

JackDriver::initialiseAudio - JACK server not running

ALSA Client information:

14,0 - (Midi Through, Midi Through Port-0) (DUPLEX) [ctype 2,
ptype 655362, cap 99]

Current timer set to "system timer"
AlsaDriver::initialiseMidi - initialised MIDI subsystem

Current timer set to "system timer"
AlsaDriver::setPlausibleConnection: connection like "" requested for
device 0
AlsaDriver::setPlausibleConnection: nothing suitable available
AlsaDriver::setPlausibleConnection: connection like "" requested for
device 1
AlsaDriver::setPlausibleConnection: nothing suitable available

ALSA Client information:

14,0 - (Midi Through, Midi Through Port-0) (DUPLEX) [ctype 2,
ptype 655362, cap 99]
-



and qjackctl message keeps repeating the last lines of


10:53:45.097 ALSA connection graph change.
10:53:45.235 ALSA connection change.
Jack: fPollTable i = 1 fd = 11
Jack: fPollTable i = 2 fd = 12
Jack: fPollTable i = 1 fd = 11
Jack: fPollTable i = 2 fd = 12
...





But if I started Rosegarden without first starting jack then the
qjackctl gui it shows jack just dead


09:14:52.182 Patchbay deactivated.
09:14:52.183 Statistics reset.
09:14:52.184 ALSA connection change.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
09:14:52.188 ALSA connection graph change.
10:08:47.877 ALSA connection graph change.
10:08:47.903 ALSA connection change.
10:11:46.131 ALSA connection graph change.
10:11:46.190 ALSA connection change.



In all cases trying to play an imported midi file in Rosegarden I get no
sound at all. Maybe my problem is in Rosegarden setup or qjackctl
'Connection' setup, or... ?
Replies Reply to this message
#3 J G Miller
August 19th, 2012 - 03:16 pm ET | Report spam
On Sun, 19 Aug 2012 15:09:44 +0000, GuitarPick wrote:

The only place I see OSS is in the ZynAddSubFX "Settings"
dialog

OSS Wave Out Device (?dev/...)
"/dev/dsp"



Yes but /dev/dsp is an OSS device file interface which is created
when the ALSA kernel modules for OSS compatibility are loaded, eg

snd_pcm_oss 36181 0
snd_mixer_oss 17668 1 snd_pcm_oss

Use lsmod | egrep oss to see which one you have autoloaded
(from /etc/modprobe.d/alsa-base.conf or openSuse equivalent).

> What is your default ALSA sound card device?

cat /proc/asound/cards:

0 [SB ]: HDA-Intel - HDA ATI SB
HDA ATI SB at 0xfccf8000 irq 16

1 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xfe97c000 irq 25

I 'presume' this means that 0/SB is the card used by alsa



No it means that the first sound card on your system is
HDA Intel. It does not mean taht ALSA uses is directly.

This is because on most major distributions ALSA is configured
to use pulseaudio as the default device (and pulseaudio of
course then sends the sound back to the ALSA layer).

Alsamixer says "Card:PulseAudio"



Which proves the point above that the default ALSA device
(virtual device in fact) is not that ALSA hardware sound
card but PulseAudio.

To get to the actual sound card for adjusting levels,
either hit F6 within alsamixer to change to sound card 0,
or to get there directly alsamixer -D hw:0

> pactl list sources short

0 alsa_output.pci-0000_05_00.1.hdmi-stereo.monitor
module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
1 alsa_output.pci-0000_00_14.2.analog-stereo.monitor
module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
2 alsa_input.pci-0000_00_14.2.analog-stereo
module-alsa-card.c s16le 2ch 44100Hz SUSPENDED

> pactl list sinks short

0 alsa_output.pci-0000_05_00.1.hdmi-stereo
module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
1 alsa_output.pci-0000_00_14.2.analog-stereo
module-alsa-card.c s16le 2ch 44100Hz SUSPENDED



Okay thanks for the detailed information which provides full
details about your sound configuration (PulseAudio on top
of ALSA, with ALSA directed to PulseAudio as default)

The above looks fine and to be expected except you may think
for the word SUSPENDED. That just means that the sink or
source is not currently in use.

If you try

paplay some_wav_file

I presume paplay does run and do you get some sound?

If you were to run the pactl list sinks short when paplay
was running, you would not see the word SUSPENDED.

I think the problem that you are having with jack is as follows.

Unless an ALSA virtual device is created from a hardware device
with dmix (for output devices) or dsnoop (for input devices)
you can only have one application at a time trying to access
the specfied hardware device.

So because PulseAudio is running and is locked on to
sound card 0, then trying to run jackd to use sound card 0
is not going to work which is the reason I think why you are
getting connection refused messages.

There are a number of solutions around this which are listed
at

<http://jackaudio.ORG/pulseaudio_and_jack>

In terms of audio quality, probably the best solution is
to use pasuspender to "suspend the running" of pulseaudio
whilst you are running jackd for rosegarden.

The other software alternative as mentioned on the page
above is to re-route pulseaudio to use jackd rather than
ALSA sound card directly but this will require some configuration

<http://trac.jackaudio.ORG/wiki/Walk...OnJack>

Note that you do not need to implement the first section
"Redirecting ALSA to PulseAudio" because ALSA is already being
redirected system wide to PulseAudio (probably in /usr/share/alsa
configuration directory) but having the entry in /etc/asound.conf
or your own ${HOME}/.asoundrc is not going to hurt and also
reminds one of the default.

So in the first instance I would just try pasuspender to
ascertain if the cause of the problem is pulseaudio locking
out jackd from access to the sound card ...
Replies Reply to this message
#4 GuitarPick
August 19th, 2012 - 10:55 pm ET | Report spam
On 08/19/2012 07:16 PM, J G Miller wrote:
On Sun, 19 Aug 2012 15:09:44 +0000, GuitarPick wrote:



I wrote up a nice long reply with lots of pastes and then promptly lost
it in a failed post, so here goes a simplified replacement ;-)

The only place I see OSS is in the ZynAddSubFX "Settings"
dialog

OSS Wave Out Device (?dev/...)
"/dev/dsp"



Yes but /dev/dsp is an OSS device file interface which is created
when the ALSA kernel modules for OSS compatibility are loaded, eg

snd_pcm_oss 36181 0
snd_mixer_oss 17668 1 snd_pcm_oss

Use lsmod | egrep oss to see which one you have autoloaded
(from /etc/modprobe.d/alsa-base.conf or openSuse equivalent).



This doesn't return anything

lsmod lists only the following with 'snd'

snd_hrtimer 12744 0
snd_seq_dummy 12798 0
snd_hda_codec_hdmi 36348 4
snd_hda_codec_via 51441 1
snd_hda_intel 33441 2
snd_hda_codec 119003 3
snd_hda_codec_hdmi,snd_hda_codec_via,snd_hda_intel
snd_hwdep 13613 1 snd_hda_codec
snd_seq 70123 1 snd_seq_dummy
snd_seq_device 14540 2 snd_seq_dummy,snd_seq
snd_pcm 109553 3
snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_timer 34086 3 snd_hrtimer,snd_seq,snd_pcm
snd 86602 15
snd_hrtimer,snd_seq_dummy,snd_hda_codec_hdmi,
snd_hda_codec_via,snd_hda_intel,snd_hda_codec,
snd_hwdep,snd_seq,snd_seq_device,snd_pcm,snd_timer
soundcore 15091 1 snd
snd_page_alloc 18572 2 snd_hda_intel,snd_pcm


The above looks fine and to be expected except you may think
for the word SUSPENDED. That just means that the sink or
source is not currently in use.

If you try

paplay some_wav_file

I presume paplay does run and do you get some sound?

If you were to run the pactl list sinks short when paplay
was running, you would not see the word SUSPENDED.



# paplay /0/sa14/DrummerBoy-GarryHoey_guitar.wav

# pactl list sources short
0 alsa_output.pci-0000_05_00.1.hdmi-stereo.monitor
module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
1 alsa_output.pci-0000_00_14.2.analog-stereo.monitor
module-alsa-card.c s16le 2ch 44100Hz IDLE
2 alsa_input.pci-0000_00_14.2.analog-stereo
module-alsa-card.c s16le 2ch 44100Hz SUSPENDED

# pactl list sinks short
0 alsa_output.pci-0000_05_00.1.hdmi-stereo
module-alsa-card.c s16le 2ch 44100Hz SUSPENDED
1 alsa_output.pci-0000_00_14.2.analog-stereo
module-alsa-card.c s16le 2ch 44100Hz RUNNING

In terms of audio quality, probably the best solution is
to use pasuspender to "suspend the running" of pulseaudio
whilst you are running jackd for rosegarden.



This doesn't work for some reason?

<http://trac.jackaudio.ORG/wiki/Walk...OnJack>



I did the second part of this one and Qjackctl but am not sure if it
took hold (the suse file tree is quite different from most)

This is what I get if I just try to launch jackd with its Start button

02:40:30.310 Patchbay deactivated.
02:40:30.312 Statistics reset.
02:40:30.313 ALSA connection change.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
02:40:30.317 ALSA connection graph change.
02:40:54.387 JACK is starting...
02:40:54.387 /usr/bin/pasuspender --jackd -v -dalsa -dhw:0 -r48000
-p1024 -n2 -H
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
/usr/bin/pasuspender: unrecognized option '--jackd'
02:40:54.394 JACK was started with PIDQ57.
02:40:54.403 JACK was stopped with exit status=1.
02:40:56.574 Could not connect to JACK server as client. - Overall
operation failed. - Unable to connect to server. Please check the
messages window for more info.
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started




And this is what I get if jackd is auto-started by rosegarden and I
then launch qjackctl and just check the Message window

02:43:31.566 Patchbay deactivated.
02:43:31.568 Statistics reset.
02:43:31.569 ALSA connection change.
02:43:31.602 JACK connection change.
02:43:31.619 Client activated.
Cannot lock down memory area (Cannot allocate memory)
Jack: JackClient::SetupDriverSync driver sem in flush mode
Jack: JackPosixSemaphore::Connect jack_sem.1003_default_qjackctl
Jack: Already connected name = qjackctl
Jack: Clock source : system clock via clock_gettime
Jack: JackLibClient::Open name = qjackctl refnum = 3
Jack: jack_set_graph_order_callback ext_client 8b0af0 client 8b0af0
Jack: WaitGraphChange...
Jack: JackClient::Activate
Jack: JackClient::kActivateClient name = qjackctl ref = 3
Jack: JackClient::kGraphOrderCallback


So now both qjackctl AND rosegarden show JACK up, running and used but
there's still no sound when I try to play an imported midi file in
rosegaden. All other sound seems to work.

How can I test to see if PulseAudio is in fact passing through jack?

Has ANYONE been able to make rosegarden work on suse 12.1?
Replies Reply to this message
#5 GuitarPick
August 20th, 2012 - 01:10 am ET | Report spam
I spoke a little too soon, after a reboot all sound was gone so I moved
the 2 workaround files from ~/.pulse, unchecked the qjackctl setup box
for the afterstart script, and rebooted again. Now the system is back
where it was yesterday except that now everytime I so much as invoke
qjackctl it shows jack already started. If I shut it down it complains
about a client stil needing it but I can shut it down and then restart
it and so can rosegarden which remains silent though.


Those files are

~/.pulse/default.pa
-
load-module module-native-protocol-unix
load-module module-jack-sink channels=2
load-module module-jack-source channels=2
load-module module-null-sink
load-module module-stream-restore
load-module module-rescue-streams
load-module module-always-sink
load-module module-suspend-on-idle
set-default-sink jack_out
set-default-source jack_in
-

and ~/.pulse/daemon.conf
-
default-sample-format = float32le
default-sample-rate = 48000
realtime-scheduling = yes
exit-idle-time = -1
-

the poststart script file remains in place but the setup box for it was
unchecked (seems to make no difference checked or not)

~/jack-post-start.txt
-
pactl load-module module-jack-sink channels=2;
pactl load-module module-jack-source channels=2;
pacmd set-default-sink jack_out
-

just for a looksee I tried it from CLI and got varying results

# pactl load-module module-jack-sink channels=2; pactl load-module
module-jack-source channels=2;pacmd set-default-sink jack_out
27
28
No PulseAudio daemon running, or not running as session daemon.

# pactl load-module module-jack-sink channels=2; pactl load-module
module-jack-source channels=2;pacmd set-default-sink jack_out
Failure: Module initalization failed
Failure: Module initalization failed
No PulseAudio daemon running, or not running as session daemon.
Replies Reply to this message
Help Create a new topicNext page Replies Make a reply
Search Make your own search