Dear developers,
some weeks ago I added a pull request on GitHub to jackaudio/tools. (A small change on transport.c to implement the toggle command which toggles between top and run state).
Is this the right way to submit patches or should I send a patch to this list?
Holger
jackd on FreeBSD calls pthread_setschedparam(thread, SCHED_FIFO,
&rtparam) with rtparam.sched_priority = 10.
I am wondering where does 10 come from? The range for SCHED_FIFO is 0 ..
31, as returned by sched_get_priority_min() and
sched_get_priority_max(). The value 10 seems wrong, since the fastest
priority is 0, the slowest is 31.
In controlapi.c sched_get_priority_min()/sched_get_priority_max() are
called for OpenBSD. For this purpose FreeBSD should be the same. So it
should be #ifndef __OpenBSD__ && defined(__FreeBSD__).
Another problem is that FreeBSD doesn't allow to set thread priorities
for non-root users, but jackd is supposed to run by the regular user. At
least that's what libs expect it to be (/tmp/jack-{userid}). I have a
suggestion: if the process is run with realtime priority, jackd
shouldn't attempt to call pthread_setschedparam at all, because the
process realtime priority should be sufficient.
This code:
struct rtprio rtp;
res = rtprio(RTP_LOOKUP, getpid(), &rtp);
if (rtp.type != RTP_PRIO_REALTIME) {
// call pthread_setschedparam
}
allows to read priority of the process on FreeBSD.
The process can be run with realtime priority with this command: rtprio
0 jackd ...
Yuri
Branch: refs/heads/master
Home: https://github.com/jackaudio/jack1
Commit: 17dc27f8842b795b823cf2a4340173e7f13f3ad2
https://github.com/jackaudio/jack1/commit/17dc27f8842b795b823cf2a4340173e7f…
Author: James Cowgill <james410(a)cowgill.org.uk>
Date: 2016-12-03 (Sat, 03 Dec 2016)
Changed paths:
M libjack/client.c
M libjack/time.c
Log Message:
-----------
Remove unused sysdeps/cycles.h includes
Commit: b67a6cbbbf3cb35938dd8fe6f4510dcb457c3f4f
https://github.com/jackaudio/jack1/commit/b67a6cbbbf3cb35938dd8fe6f4510dcb4…
Author: James Cowgill <james410(a)cowgill.org.uk>
Date: 2016-12-03 (Sat, 03 Dec 2016)
Changed paths:
M config/cpu/Makefile.am
R config/cpu/alpha/Makefile.am
R config/cpu/alpha/atomicity.h
R config/cpu/alpha/cycles.h
R config/cpu/cris/Makefile.am
R config/cpu/cris/atomicity.h
M config/cpu/generic/Makefile.am
R config/cpu/generic/cycles.h
M config/cpu/i386/Makefile.am
R config/cpu/i386/cycles.h
R config/cpu/i486/Makefile.am
R config/cpu/i486/cycles.h
R config/cpu/ia64/Makefile.am
R config/cpu/ia64/atomicity.h
R config/cpu/ia64/cycles.h
R config/cpu/ia64/ia64intrin.h
R config/cpu/m68k/Makefile.am
R config/cpu/m68k/atomicity.h
R config/cpu/mips/Makefile.am
R config/cpu/mips/atomicity.h
M config/cpu/powerpc/Makefile.am
R config/cpu/powerpc/cycles.h
R config/cpu/s390/Makefile.am
R config/cpu/s390/atomicity.h
M config/sysdeps/Makefile.am
R config/sysdeps/cycles.h
M configure.ac
Log Message:
-----------
Remove unused cruft from config/cpu
Commit: d355c7d28cc8ad424f6bf4bda2c85b13d5968e73
https://github.com/jackaudio/jack1/commit/d355c7d28cc8ad424f6bf4bda2c85b13d…
Author: Adrian Knoth <adi(a)drcomp.erfurt.thur.de>
Date: 2017-01-10 (Tue, 10 Jan 2017)
Changed paths:
M config/cpu/Makefile.am
R config/cpu/alpha/Makefile.am
R config/cpu/alpha/atomicity.h
R config/cpu/alpha/cycles.h
R config/cpu/cris/Makefile.am
R config/cpu/cris/atomicity.h
M config/cpu/generic/Makefile.am
R config/cpu/generic/cycles.h
M config/cpu/i386/Makefile.am
R config/cpu/i386/cycles.h
R config/cpu/i486/Makefile.am
R config/cpu/i486/cycles.h
R config/cpu/ia64/Makefile.am
R config/cpu/ia64/atomicity.h
R config/cpu/ia64/cycles.h
R config/cpu/ia64/ia64intrin.h
R config/cpu/m68k/Makefile.am
R config/cpu/m68k/atomicity.h
R config/cpu/mips/Makefile.am
R config/cpu/mips/atomicity.h
M config/cpu/powerpc/Makefile.am
R config/cpu/powerpc/cycles.h
R config/cpu/s390/Makefile.am
R config/cpu/s390/atomicity.h
M config/sysdeps/Makefile.am
R config/sysdeps/cycles.h
M configure.ac
M libjack/client.c
M libjack/time.c
Log Message:
-----------
Merge pull request #58 from jcowgill/config-cpu-cleanup
config/cpu cleanup
Compare: https://github.com/jackaudio/jack1/compare/d1482a649718...d355c7d28cc8
Jack runs on FreeBSD 11 with this command line: jackd -r -doss -r48000
-p1024 -n3 -w16 --capture /dev/dsp6 --playback /dev/dsp2
Sound recorded with this command 'jack_rec -f x.wav system:capture_1' is
too high pitched compared to the original.
Recording using the 'sweep' app produces the correct pitch.
What is wrong? How to fix?
jack-0.124.1 installed from the FreeBSD port.
Yuri
Hi Jack-devel,
This time it's not an impossible-to-reproduce bug, but a feature request!
Let me know it there's a better place to post this. I think similar things
have been suggested before, but this idea for a 'loopback' client hasn't as
far as I'm aware.
A loopback Jack client to intercept streams to and from partially
Jack-aware programs such as SMPlayer and Firefox would be useful. Both of
these programs output audio to Jack, but only to the system ports, which
makes routing the audio inconvinient. My setup includes a Jack client for
pre-speaker processing (called "Apps Out"), which reduces the audio by 35
dB and applies EQing, so any unexpected connetions directly to the system
ports are inconveniently loud and muddy. Even if these programs gain
support for changing their default output ports, there may be other
programs that won't.
The ALSA loopback device effectively pretends to be hardware, so most
ALSA-aware programs will be connected by default to Apps Out (and its
counterpart "Apps In"), as there is a persistent connection between these
clients and the ALSA-Jack bridge. Some way of configuring a Jack session so
that programs would think that Jack's hypothetical loopback client is the
system capture/plackback - with the real system capture/playback appearing
to be a non-system client - would solve everything. Like adding a monitor
strip for use between the apps and the hardware.
Failing that, is there a way I can force partially Jack-aware programs to
use the ALSA loopback device instead of Jack, maybe by hiding Jack's
existence?
- Tom