Xavier Mendez | 22 Jun 18:33 2016
Gravatar

[patch] Fix bug with alsa_in/alsa_out latency

Hello,

Here's a quick fix for alsa_in and alsa_out, which currently set the 
playback latency of their ports to the target delay, but forget to 
convert this delay to JACK frames. See PR for more info.

https://github.com/jackaudio/jack2/pull/215
https://github.com/jackaudio/tools/pull/8

Also convert the result of jack_frames_since_cycle_start() into ALSA 
frames, before subtracting it from the delay for the controller.

Note that this change only has effect if ALSA and JACK sample rates 
differ, otherwise the behavior stays the same.

Xavi
_______________________________________________
Jack-Devel mailing list
Jack-Devel <at> lists.jackaudio.org
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Xavier Mendez | 19 Jun 19:29 2016
Gravatar

Suggestion for two new tools

I'd like to suggest two new tools. I find myself using them frequently 
whenever I'm dealing with sets of outputs / inputs of different 
latencies, or sometimes when I'm using software that adds noticeable 
(i.e. >= 15ms) latency.

I think it would be best to add them as standard JACK tools because:

- They perform a very basic task.
- JACK has almost no latency-related tools AFAIK.
- They demonstrate the power of JACK's latency API and could serve
as [non-trivial] examples for devs trying to understand it.

What do you think? I've attached a patch with both tools. If they get 
included, I'll write documentation about its usage and the latency API 
in general. Below is a summary of what they do:

## jack_lsync

Synchronizes a set of ports for playback or capture, by inserting 
appropriate delays to compensate for latency. Example:

Suppose you have one output `playback_1` with 20ms output latency, and 
another output `playback_2` with 50ms output latency:

     jack_lsync -a2 &
     jack_connect lsync:output_1 playback_1
     jack_connect lsync:output_2 playback_2

lsync will insert a 30ms delay on the first output, giving you two 
outputs of 50ms latency. Instead of connecting to the original outputs, 
(Continue reading)

Markus Grabner | 13 Jun 00:04 2016
Picon

fractional frame rates for alsa_in and alsa_out

	Hi!

A while ago I initiated work on a Linux driver for Line6 devices (now under sound/usb/line6 in the Linux
kernel tree). Some of these devices have weird sample rates (39062.5Hz, derived from the 10MHz USB clock
divided by 256). The alsa_in and alsa_out jack clients are convenient tools to use such Line6 devices
together with more standardized hardware operating at, e.g., 48kHz. However, alsa_in only supports
integer sample rates, and even after a couple of minutes, alsa_in doesn't detect the correct resampling
factor 1.2288 (48000/39062.5), but still reports the initial approximated value 1.228816
(48000/39062). Admittedly, the error isn't too big, but is larger than the error of high-quality crystal
oscillators. And, after all, why use an approximation if we know better?

I modified alsa_in and alsa_out such that they accept a sample rate in floating point format (command line
option "-r") and query the fractional sample rate from the ALSA driver to compute the initial estimation
of the resampling factor (see attached patch).

What do you think about this patch?

        Kind regards,
                Markus
_______________________________________________
Jack-Devel mailing list
Jack-Devel <at> lists.jackaudio.org
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
marcin@saepia.net | 9 Jun 12:02 2016
Picon
Gravatar

shm registry full errors

Hello,

at some point I am getting the following errors from JACK

Jun  9 11:57:19 001-can1-plumber jackd[21110]: shm registry full
Jun  9 11:57:19 001-can1-plumber jackd[21110]: Cannot create shared memory segment of size = 422
Jun  9 11:57:19 001-can1-plumber jackd[21110]: JackShmMem::new bad alloc
Jun  9 11:57:19 001-can1-plumber jackd[21110]: Cannot open client
Jun  9 11:57:19 001-can1-plumber jackd[21110]: Cannot create new client

Max locked memory for this process is set to 134217728 while launching JACK via systemd.

It effectively causes JACK to hang.

I am using 1.9.10 (commit 1ed50c92) on ubuntu 16.04.

The configure flags are --clients=500 --ports-per-application=4 (I am not reaching 500 clients limit when that occurs, they are around 250).

JACK is started with dummy driver, and --port-max set to 2000.

What is the reason for hitting SHM limit? Can I overcome this in any way?

m.
_______________________________________________
Jack-Devel mailing list
Jack-Devel <at> lists.jackaudio.org
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
xan | 29 May 18:07 2016
Picon

netJACK2 with two nodes

Hello JACK community,

I’m planning my new audio editing setup (both hard- and software) and before investing in hardware,
I’d like to ask for advice.

Here’s what I want to do:
– Both computers run Linux.
– On Computer A, I can browse the web and see Youtube videos, I can listen to MP3 files with Totem and I can do
DAW stuff with Ardour.
– Computer B does nothing more than getting all the sound output from A and feed it to the speaker through
it’s soundcard.

Here’s my theoretical approach:
– Both computers run JACK.
– A runs PulseAudio in top of JACK.
– A runs with the net backend using netJACK2.
– B has the Net Manager loaded which gets the audio from A and pipes it to the soundcard.
– Every time I boot the two computers, they are ready to work. No daemons I have to launch manually, etc. I
want the configuration to be done one time for all.

I got my understanding of JACK through the network from here:
https://github.com/jackaudio/jackaudio.github.com/wiki/WalkThrough_User_NetJack2 And this
site would also be my guide for setting up the thing.
But I’m not a JACK expert at all. It’s the first time I’m doing something like this. So I want to make
shure I got the basics right. And, maybe you now even a better step-by-step tutorial which does exactly
what I want.

So, I appreciate any comments on this.

Bye,
xan
_______________________________________________
Jack-Devel mailing list
Jack-Devel <at> lists.jackaudio.org
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Joshua Olson | 28 May 01:12 2016
Picon
Gravatar

Updating wiki/Q_difference_jack1_jack2

Jack1 had a release candidate in February, and right now the official comparison has been untouched since 2014. It (https://github.com/jackaudio/jackaudio.github.com/wiki/Q_difference_jack1_jack2) claims for example that Jack2 doesn't support Linux midi, the metadata api, or ">1 soundcard on Linux",  Has either Jack tree made progress that someone knows of?

Good day,
Josh
_______________________________________________
Jack-Devel mailing list
Jack-Devel <at> lists.jackaudio.org
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Orm Finnendahl | 23 May 18:20 2016
Picon

jack_midi_event_write abs or rel time?

Hi,

 I'm writing a jack midi port for incudine, a common lisp based
realtime audio system. Midi in is already working, but for midi out I
couldn't find information about what kind of time should be supplied
to jack_midi_event_write. Is it in absolute or relative frames?

If it is relative to the current frame/block boundary:

I tested the received time values (using jack_midi_event_get) with
randomly generated midievents sent from pd over a2jmidi and got time
values between 0 and 42 with a jackd setting of 1024 frames/period and
2 periods. I would expect values between 0 and 1023, or is there some
misunderstanding on my side? Could this be due to a2jmidid?

--
Orm
_______________________________________________
Jack-Devel mailing list
Jack-Devel <at> lists.jackaudio.org
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
marcin@saepia.net | 16 May 14:07 2016
Picon
Gravatar

Setting rpath while building JACK

Hello,

I need to make custom build of JACK that will reside in /opt/myjack

Now I have to use LD_LIBRARY_PATH because without one I get errors like this

/opt/myjack/bin/jack_lsp: error while loading shared libraries: libjack.so.0: cannot open shared object file: No such file or directory

I would like to use -rpath linker flag, but I found no clean way to use it. I tried to set LDFLAGS and other env vars but waf keeps ignoring it.

Any advice?

Marcin
_______________________________________________
Jack-Devel mailing list
Jack-Devel <at> lists.jackaudio.org
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
marcin@saepia.net | 16 May 13:54 2016
Picon
Gravatar

Segfaults if setting --clients=512

Hello,

I am compiling JACK2 from commit 7de15e7a (the same as shipped with Ubuntu 14.04). I need to set --clients to quite high value, and I have found out that setting --clients=512 causes jackd to segfault while --clients=500 is fine.

Is that a bug or limitation by design?

Marcin
_______________________________________________
Jack-Devel mailing list
Jack-Devel <at> lists.jackaudio.org
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Joakim Hernberg | 15 May 14:30 2016
Picon

formatting of xrun messages

Anyone have an idea why jack1 displays xruns like this on my system
(for a long time already, not a recent issue)?

**** alsa_pcm: xrun of at least -1386461.056 msecs

The system is Archlinux with jack 0.124.1.

--

-- 

   Joakim
_______________________________________________
Jack-Devel mailing list
Jack-Devel <at> lists.jackaudio.org
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org
Chuckk Hubbard | 14 May 01:12 2016
Picon

Implement a driver as a writable client?

Hi.
I've been sinking lots of time in trying to get ALSA to work with a SGTL5000 (Teensy Audio Adapter) in Raspbian on a Raspberry Pi 3. I have the complete documentation for how to manually set up the audio chip, and sufficient documentation on how to manually set up the Pi's ARM I2S peripheral. The ALSA solution is generalized for any kind of hardware you could want, is something I don't really want to know, at all, in my life, and seems just far too complex when I have detailed guides for both the audio chip and the CPU. The one combination of ALSA platform, machine and codec drivers that I've managed to get sound from plays more than 2x too fast and will not open with JACK.

So, I'm reading about the JACK API, wondering about simply writing a C program to configure and write to the Pi's built-in I2S FIFOs, without even telling ALSA that I'm doing it; but I see that all JACK clients should use callback functions. Still, audio input from JACK into a program using the API is a regular thing, right? So how complicated might it be to set up such a client that gets audio input from JACK and writes that to the chip's I2S FIFO? My timing will be controlled by the audio chip, the Pi chip will be a slave to it. So as long as my program writes to the transmit FIFO fast enough, and waits if the FIFO is full, I think I don't need to worry about synchronizing JACK exactly to the audio chip's clock... right?

I'm just a little fuzzy on this timing part.
Thanks for any clarification.

-Chuckk
_______________________________________________
Jack-Devel mailing list
Jack-Devel <at> lists.jackaudio.org
http://lists.jackaudio.org/listinfo.cgi/jack-devel-jackaudio.org

Gmane