jack tangent - rpmbuild of jack error

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

jack tangent - rpmbuild of jack error

thewade
Hello all,
Lee helped me to see that optimize is no good if jack wont compile at
all, but now I cannot get it to build.
Well... I can get it to build by ./configure;make;make install but I am
trying to get this rpm stuff down.
Can anyone tell me why I get this error (from rpmbuild -ba jack.spec):

jack-audio-connection-kit 0.100.0 :

| Build with ALSA support............................... : true
| Build with OSS support................................ : true
| Build with CoreAudio support.......................... : false
| Build with PortAudio support.......................... : true
|
| Default driver backend................................ : "alsa"
| Shared memory interface............................... : "System V"

+ --with-default-tmpdir=/dev/shm --enable-preemption-check
--enable-stripped-jackd
/var/tmp/rpm-tmp.76500: line 51: --with-default-tmpdir=/dev/shm: No such
file or directory
error: Bad exit status from /var/tmp/rpm-tmp.76500 (%build)

if the /dev/shm directory is REALLY THERE (I swear it is)!
ls -ld /dev/shm
drwxrwxrwt  2 root root 40 Oct 19 08:27 /dev/shm

I even tried to make the directory that was in the default jack.spec.in
file - /var/lib/jack/tmp I think - but it said that was not there either.
Now either I have lost all grasp of reality (which is not entirely
impossible) or some bit of code needs tweaking.
I am hesitent to run rpmbuild as root (incase its some permissions
problem, but ANYONE can write to /dev/shm) becasue rpmbuild would use a
different build directory.

Any sugguestions from the rpm-gurus out there?
Thanks!
-thewade


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: jack tangent - rpmbuild of jack error

Florian Paul Schmidt-2
On Wed, 19 Oct 2005 09:47:48 -0700
thewade <[hidden email]> wrote:

> + --with-default-tmpdir=/dev/shm --enable-preemption-check
> --enable-stripped-jackd


Are you sure you want to enable the preemption check? It will make apps
that do not behave RT safe abort (in the case that they are not
explicitly setup to handle SIGUSR2 (which pretty much none does)).

Although it definetly makes sense if you want to test the apps you run
for RT safeness it is not meant for an rpm that is distributed to "mere
users".

Flo

--
Palimm Palimm!
http://tapas.affenbande.org


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: jack tangent - rpmbuild of jack error

Florian Paul Schmidt-2
Sorry thewade for the duplicate, this was meant to go to jackit-devel, too.

On Wed, 19 Oct 2005 10:56:21 -0700
thewade <[hidden email]> wrote:

> >Are you sure you want to enable the preemption check? It will make apps
> >that do not behave RT safe abort (in the case that they are not
> >explicitly setup to handle SIGUSR2 (which pretty much none does)).
> >
> >Although it definetly makes sense if you want to test the apps you run
> >for RT safeness it is not meant for an rpm that is distributed to "mere
> >users".

> I realized this flag was enabled by default and did not remove it
> because I assumed it would not hurt anything.

Well, the fact that the flag is names "enable--preemption-check" implies
it is off by default.

> I came to this conclusion
> as I am not using Ingo's Rlimits patched kernel anymore

The relevant patchset is called realtime-preemption. Every recent 2.6.x
kernel has the rlimits change afaik.

> (because its
> easier to use rpm kernels plus I get to use livna's ati kernel module -
> I want to see what freeing up the graphics card does to latency as PD
> wsa "popping" when I moved the mouse unless latency was set to around
> 10ms) and I assume that my kernel doesnt spinlock (too) badly. In truth
> though I dont really understand what preemption is checked when this
> flag is enabled.
> Regardless, does this flag being set or not have any bearing on my the
> problem of rpmbuild not finding /dev/shm?
> I would be interested in anexplination of what "RT safeness" eally means.
>

Well, basically it means that the process() callback of a jack meets
certain criteria. The most important ones:

- it should finish in a predictable time which should be less than the
jack buffer size divided by the samplerate. And since the user is
interested in having as much apps be able to run at the same time as
possible, this time should also always be a short as possible. This
implies the second criterion:

- it must _never_ block. To block in this context means to give up the
cpu voluntarily for a not predetermined time. I.e. if the process
callback does a hd read, the OS (linux) does not guarantee any timeframe
in which the read actually finishes. Same for network IO and basically
any access to resources managed by the OS (terminal output, memory
allocation, process forking, and and and). So blocking is a bad thing in
a process callback.

So for any blocking system calls in linux, to make sure that the caller
thread does not waste any precious cpu cycles, is put to sleep by the OS
and woken up when the OS has done its thing (read data from disk, etc.).
When putting a thread to sleep the scheduler gets to run and it checks
the list of waiting threads to see which is to run next. Now this is the
point where the "preemption check" is done. Right before starting of the
process callback(), the kernel is notified to raise a signal whenever
this thread is preempted by another thread. Since the process callback
runs with SCHED_FIFO scheduling it is guaranteed that it will not be
preempted by a lower prio task as long as it doesn't directly or
implicitly puts itself to sleep (thus enabling the scheduler to run a
different task). At the end of the process callback, the kernel is again
signaled to not check for preemption anymore.

This kernel notification is enabled in jackd by the
--enable-preemption-check flag and it needs a kernel with
realtime-preemption patches to work. Also jackd must be run in the -R
(realtime) mode

A small catch is that possibly blocking system calls sometimes return
immediately, so the preemption check should usually be done on a system
with some load on it to make sure the OS actually has a reason to take
away the cpu from the task in question.

BTW: @all: wouldn't it make sense to also use a runtime flag for the
preemption-check? So that it could be compiled into jackd packages and
then simply used whenever needed at runtime (More users of jackd
packages could use it to check the apps they use without big hassle).
Recompiling jackd for it is a bit tiresome..

Flo

--
Palimm Palimm!
http://tapas.affenbande.org


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: jack tangent - rpmbuild of jack error

Rui Nuno Capela
In reply to this post by thewade
thewade wrote:

> Hello all,
> Lee helped me to see that optimize is no good if jack wont compile at
> all, but now I cannot get it to build.
> Well... I can get it to build by ./configure;make;make install but I am
> trying to get this rpm stuff down.
> Can anyone tell me why I get this error (from rpmbuild -ba jack.spec):
>
> jack-audio-connection-kit 0.100.0 :
>
> | Build with ALSA support............................... : true
> | Build with OSS support................................ : true
> | Build with CoreAudio support.......................... : false
> | Build with PortAudio support.......................... : true
> |
> | Default driver backend................................ : "alsa"
> | Shared memory interface............................... : "System V"
>
> + --with-default-tmpdir=/dev/shm --enable-preemption-check
> --enable-stripped-jackd
> /var/tmp/rpm-tmp.76500: line 51: --with-default-tmpdir=/dev/shm: No such
> file or directory
> error: Bad exit status from /var/tmp/rpm-tmp.76500 (%build)
>
> if the /dev/shm directory is REALLY THERE (I swear it is)!
> ls -ld /dev/shm
> drwxrwxrwt  2 root root 40 Oct 19 08:27 /dev/shm
>
> I even tried to make the directory that was in the default jack.spec.in
> file - /var/lib/jack/tmp I think - but it said that was not there either.
> Now either I have lost all grasp of reality (which is not entirely
> impossible) or some bit of code needs tweaking.
> I am hesitent to run rpmbuild as root (incase its some permissions
> problem, but ANYONE can write to /dev/shm) becasue rpmbuild would use a
> different build directory.
>
> Any sugguestions from the rpm-gurus out there?
> Thanks!
> -thewade
>
I'm no rpm-guru, but this patch is what's on my pipe for building jack
rpms for opensuse 10.0. I'm considering to make it to cvs, eventually.

Hope it helps you too.
--
rncbc aka Rui Nuno Capela
[hidden email]

diff -dupPNr jack.0/configure.ac jack.1/configure.ac
--- jack.0/configure.ac 2005-09-11 00:58:43.000000000 +0100
+++ jack.1/configure.ac 2005-10-15 03:10:00.000000000 +0100
@@ -254,7 +254,7 @@ if test "x$enable_mmx" = xyes; then
   fi
 
   AC_DEFINE(x86, 1, "Nope it's intel")
-  COMMON_X86_OPT_FLAGS="-DREENTRANT -O3 -fomit-frame-pointer -ffast-math -funroll-loops -fmove-all-movables"
+  COMMON_X86_OPT_FLAGS="-DREENTRANT -O3 -fomit-frame-pointer -ffast-math -funroll-loops"
 
   if test "$target_cpu" = "i586"; then
       JACK_OPT_CFLAGS="-march=i586 "
@@ -267,7 +267,7 @@ if test "x$enable_mmx" = xyes; then
   JACK_OPT_CFLAGS="$COMMON_X86_OPT_FLAGS $JACK_OPT_CFLAGS $MMX_FLAGS $SSE_FLAGS"
 
 elif test "$target_cpu" = "x86_64"; then
-      JACK_OPT_CFLAGS="-DREENTRANT -O3 -march=k8 -fomit-frame-pointer -ffast-math -funroll-loops -fmove-all-movables"
+      JACK_OPT_CFLAGS="-DREENTRANT -O3 -march=k8 -fomit-frame-pointer -ffast-math -funroll-loops"
 fi
 
 AC_ARG_ENABLE(dynsimd,
diff -dupPNr jack.0/jack/Makefile.am jack.1/jack/Makefile.am
--- jack.0/jack/Makefile.am 2005-01-03 00:15:31.000000000 +0000
+++ jack.1/jack/Makefile.am 2005-10-15 03:01:45.000000000 +0100
@@ -21,6 +21,7 @@ noinst_HEADERS = \
  engine.h \
  hardware.h \
  internal.h \
+ intsimd.h \
  jslist.h \
  memops.h \
  messagebuffer.h \
diff -dupPNr jack.0/jack.spec.in jack.1/jack.spec.in
--- jack.0/jack.spec.in 2005-01-16 21:28:42.000000000 +0000
+++ jack.1/jack.spec.in 2005-10-15 03:09:28.000000000 +0100
@@ -1,8 +1,10 @@
 # $Id: jack.spec.in,v 1.8 2005/01/16 21:28:42 rncbc Exp $
 # set to 0 to build rpms without capabilities support
-%define enable_capabilities 1
-# set to 1 to enable alternate jack temporary directory
-# mounted as tmpfs
+%define enable_capabilities 0
+# strip binaries
+%define strip_jackd 0
+# set to 1 to enable alternate jack temporary
+# directory mounted as tmpfs
 %define enable_tmpdir 1
 %if %{enable_tmpdir}
 %define jack_tmpdir /var/lib/jack/tmp
@@ -11,21 +13,19 @@
 %define port_audio 0
 # use oss
 %define oss 1
-# strip binaries
-%define strip_jackd 1
-# use premmption check
-%define preemption_check 1
+# use preemption check
+%define preemption_check 0
 
 
 Summary: the Jack Audio Connection Kit
 Name: @PACKAGE@
 Version: @VERSION@
-Release: 1
+Release: 2
 License: GPL
 Group: System Environment/Daemons
 Source0: %{name}-%{version}.tar.gz
 URL: http://jackit.sourceforge.net
-BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(id -u -n)
+BuildRoot: %{_tmppath}/%{name}-%{version}-root-%(id -u -n)
 
 BuildRequires: automake >= 1.6 libsndfile-devel >= 1.0.0
 
@@ -66,25 +66,26 @@ Small example clients that use the Jack
 %setup -q
 
 %build
-%configure      --enable-optimize \
-%if %{enable_tmpdir}
-                --with-default-tmpdir=%{jack_tmpdir} \
-%endif
+%configure \
 %if %{enable_capabilities}
-                 --enable-capabilities \
+ --enable-capabilities \
+%if %{strip_jackd}
+ --enable-stripped-jackd \
 %endif
-%if %{preemption_check}
-                 --enable-preemption-check \
+%endif
+%if %{enable_tmpdir}
+ --with-default-tmpdir=%{jack_tmpdir} \
 %endif
 %if ! %{port_audio}
- --disable-portaudio \
+ --disable-portaudio \
 %endif
 %if ! %{oss}
- --disable-oss \
+ --disable-oss \
 %endif
-%if %{strip_jackd}
-                 --enable-stripped-jackd
+%if %{preemption_check}
+ --enable-preemption-check \
 %endif
+ --enable-optimize
 make
 
 
@@ -241,6 +242,10 @@ fi
 
 %changelog
 
+* Thu Oct 14 2005 Rui Nuno Capela <[hidden email]> - 0.100.6-2
+- omitted enable capabilities, stripped binaries and preemption
+  check as default.
+
 * Thu Jan  3 2005 Rui Nuno Capela <[hidden email]> - 0.99.44-1
 - add jack/statistics.h to devel package
 
Reply | Threaded
Open this post in threaded view
|

Re: jack tangent - rpmbuild of jack error

Jack O'Quin-2
In reply to this post by Florian Paul Schmidt-2
Florian Schmidt <[hidden email]> writes:

> BTW: @all: wouldn't it make sense to also use a runtime flag for the
> preemption-check? So that it could be compiled into jackd packages and
> then simply used whenever needed at runtime (More users of jackd
> packages could use it to check the apps they use without big hassle).
> Recompiling jackd for it is a bit tiresome..

IIUC, the kernel implementation uses undefined encodings of the
gettimeofday() address parameter.  I believe these calls are ignored
by kernels lacking that feature.

So, it /should/ be OK to build them into a binary package.  
(I would test that assertion before actually doing it, however.)
--
  joq


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: jack tangent - rpmbuild of jack error

Florian Paul Schmidt-2
On Wed, 19 Oct 2005 20:13:28 -0500
"Jack O'Quin" <[hidden email]> wrote:

> Florian Schmidt <[hidden email]> writes:
>
> > BTW: @all: wouldn't it make sense to also use a runtime flag for the
> > preemption-check? So that it could be compiled into jackd packages and
> > then simply used whenever needed at runtime (More users of jackd
> > packages could use it to check the apps they use without big hassle).
> > Recompiling jackd for it is a bit tiresome..
>
> IIUC, the kernel implementation uses undefined encodings of the
> gettimeofday() address parameter.  I believe these calls are ignored
> by kernels lacking that feature.
>
> So, it /should/ be OK to build them into a binary package.  
> (I would test that assertion before actually doing it, however.)

you are right about the gettimeofday thing, but having the preemption
check compiled in means that when using a RP kernel every app that gets
preempted gets aborted.

Oh i forgot that for this user triggered tracing needs to be ebabled,
too. Once there was an extra /proc/sys control for this (which could be
used to enable/disable the feature at runtime). Will check if it's still
there.

Flo

--
Palimm Palimm!
http://tapas.affenbande.org


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: jack tangent - rpmbuild of jack error

Florian Paul Schmidt-2
On Thu, 20 Oct 2005 11:52:15 +0200
Florian Schmidt <[hidden email]> wrote:

> > IIUC, the kernel implementation uses undefined encodings of the
> > gettimeofday() address parameter.  I believe these calls are ignored
> > by kernels lacking that feature.
> >
> > So, it /should/ be OK to build them into a binary package.  
> > (I would test that assertion before actually doing it, however.)
>
> you are right about the gettimeofday thing, but having the preemption
> check compiled in means that when using a RP kernel every app that gets
> preempted gets aborted.
>
> Oh i forgot that for this user triggered tracing needs to be ebabled,
> too. Once there was an extra /proc/sys control for this (which could be
> used to enable/disable the feature at runtime). Will check if it's still
> there.

Right,

there's

/proc/sys/kernel/trace_user_triggered

which i think is the relevant control.

Flo


--
Palimm Palimm!
http://tapas.affenbande.org


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: jack tangent - rpmbuild of jack error

Jack O'Quin-2
Florian Schmidt <[hidden email]> writes:

> Right,
>
> there's
>
> /proc/sys/kernel/trace_user_triggered
>
> which i think is the relevant control.

Sounds good.  

I would still recommend a solid regression test cycle before actually
releasing binary packages compiled with this feature.  Maybe Nando
could try it with his CCRMA tests.  Many of those apps will probably
fail with trace_user_triggered enabled, but they /should/ work with it
disabled.  This would be an excellent step towards cleaning up the
"RT-safeness" of our clients.
--
  joq


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: jack tangent - rpmbuild of jack error (now rt msg buf)

Dave Cunningham
On Thu, Oct 20, 2005 at 10:58:05AM -0500, Jack O'Quin wrote:

>Florian Schmidt <[hidden email]> writes:
>
>> Right,
>>
>> there's
>>
>> /proc/sys/kernel/trace_user_triggered
>>
>> which i think is the relevant control.
>
>Sounds good.  
>
>I would still recommend a solid regression test cycle before actually
>releasing binary packages compiled with this feature.  Maybe Nando
>could try it with his CCRMA tests.  Many of those apps will probably
>fail with trace_user_triggered enabled, but they /should/ work with it
>disabled.  This would be an excellent step towards cleaning up the
>"RT-safeness" of our clients.

On a semi-related note, I made a realtime message buffer whereby                                                                                                                                                    
you do                                                                                                                                                                                                              
                                                                                                                                                                                                                   
rt_msg_buf_printf(RTMsgBuf *buf, char *format_string, ...);                                                                                                                                                        
                                                                                                                                                                                                                   
from the realtime thread, and poll from another thread to dump                                                                                                                                                      
the recorded messages to stdout or whatever.  Thus this could be                                                                                                                                                    
a drop-in replacement for code that prints errors from process()                                                                                                                                                    
callbacks.  (feedback on the sanity of using polling is welcome)                                                                                                                                                    

A warning is printed when polling occurs, if messages were lost                                                                                                                                                    
due to the buffer being full at the time of writing from the
realtime thread.                                                                                                                                                                                                    
                                                                                                                                                                                                                   
The difference between this and the internal jackd system that
does something similar, is that this uses the jack_ringbuffer,                                                                                                                                                      
and obviously it is polled instead of synchronising with                                                                                                                                                            
condition variables.                                                                                                                                                                                                
                                                                                                                                                                                                                   
One annoying thing I've come accross is that you have to exit                                                                                                                                                      
cleanly from a failing process, i.e. no standard assert() or
abort(), otherwise you dont see the last few messages on stdout!                                                                                                                                                    
If anyone knows how to implement some kind of "finalizer"                                                                                                                                                          
function, it would be appreciated. :)                                                                                                                                                                              
                                                                                                                                                                                                                   
The code for this is very small (the .c file is 117 lines), and                                                                                                                                                    
currently exists in one of my projects as just a .c and .h file,                                                                                                                                                    
but if anyone else is interested I can put it up somewhere.                                                                                                                                                        



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: jack tangent - rpmbuild of jack error

Florian Paul Schmidt-2
In reply to this post by Jack O'Quin-2
On Thu, 20 Oct 2005 10:58:05 -0500
"Jack O'Quin" <[hidden email]> wrote:

> > /proc/sys/kernel/trace_user_triggered
> >
> > which i think is the relevant control.
>
> Sounds good.  
>
> I would still recommend a solid regression test cycle before actually
> releasing binary packages compiled with this feature.  Maybe Nando
> could try it with his CCRMA tests.  Many of those apps will probably
> fail with trace_user_triggered enabled, but they /should/ work with it
> disabled.  This would be an excellent step towards cleaning up the
> "RT-safeness" of our clients.

Well,

i tried to disable the user triggered tracing and it doesn't seem to
have any effect. Anyways, even if it did the right thing, imho it would
be suboptimal to have a function call in the binary that has undefined
behaviour on non RP kernels. So the 'clean' approach would be to make
the preemption check have a command line option, so we can compile the
check into all binaries but be able to use it only when needed.

As the switching on/off of the preemption check (before and after the
process callback() (and one or two other callbacks that need to be RT
safe)) is actually done by libjack in the clients process, i wonder
what's the best way to communicate the commandline option.

I suppose via shm, but i haven't looked at those parts of jack yet. Any
hint where to start looking to hack this in?

Flo

--
Palimm Palimm!
http://tapas.affenbande.org


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: jack tangent - rpmbuild of jack error

Jack O'Quin-2
Florian Schmidt <[hidden email]> writes:

> As the switching on/off of the preemption check (before and after the
> process callback() (and one or two other callbacks that need to be RT
> safe)) is actually done by libjack in the clients process, i wonder
> what's the best way to communicate the commandline option.
>
> I suppose via shm, but i haven't looked at those parts of jack yet. Any
> hint where to start looking to hack this in?

It's not complicated, but some of the details are messy.  

Here's a rough (untested) patch, not including any man page update for
the -C (--realtime-check) option.  Note that JACK_PROTOCOL_VERSION
changed due to updating the shared memory mapping.

Index: configure.ac
===================================================================
RCS file: /cvsroot/jackit/jack/configure.ac,v
retrieving revision 1.68
diff -u -r1.68 configure.ac
--- configure.ac 10 Sep 2005 23:58:43 -0000 1.68
+++ configure.ac 24 Oct 2005 16:19:46 -0000
@@ -25,7 +25,7 @@
 dnl that would break applications linked with an older
 dnl version of libjack.
 dnl ---
-JACK_PROTOCOL_VERSION=15
+JACK_PROTOCOL_VERSION=16
 
 dnl ---
 dnl HOWTO: updating the libjack interface version
Index: jack/engine.h
===================================================================
RCS file: /cvsroot/jackit/jack/jack/engine.h,v
retrieving revision 1.50
diff -u -r1.50 engine.h
--- jack/engine.h 19 Dec 2004 18:41:28 -0000 1.50
+++ jack/engine.h 24 Oct 2005 16:19:47 -0000
@@ -150,7 +150,7 @@
 /* public functions */
 
 jack_engine_t  *jack_engine_new (int real_time, int real_time_priority,
- int do_mlock, int do_unlock,
+ int rt_check, int do_mlock, int do_unlock,
  const char *server_name, int temporary,
  int verbose, int client_timeout,
  unsigned int port_max,
Index: jack/internal.h
===================================================================
RCS file: /cvsroot/jackit/jack/jack/internal.h,v
retrieving revision 1.82
diff -u -r1.82 internal.h
--- jack/internal.h 22 Aug 2005 20:48:24 -0000 1.82
+++ jack/internal.h 24 Oct 2005 16:19:47 -0000
@@ -133,6 +133,7 @@
     pid_t                 engine_pid;
     jack_nframes_t  buffer_size;
     int8_t  real_time;
+    int8_t  rt_check;
     int8_t  do_mlock;
     int8_t  do_munlock;
     int32_t  client_priority;
Index: jackd/engine.c
===================================================================
RCS file: /cvsroot/jackit/jack/jackd/engine.c,v
retrieving revision 1.126
diff -u -r1.126 engine.c
--- jackd/engine.c 15 Jun 2005 09:18:40 -0000 1.126
+++ jackd/engine.c 24 Oct 2005 16:19:49 -0000
@@ -1530,7 +1530,8 @@
 }
 
 jack_engine_t *
-jack_engine_new (int realtime, int rtpriority, int do_mlock, int do_unlock,
+jack_engine_new (int realtime, int rtpriority, int rt_check,
+ int do_mlock, int do_unlock,
  const char *server_name, int temporary, int verbose,
  int client_timeout, unsigned int port_max, pid_t wait_pid,
  JSList *drivers)
@@ -1670,6 +1671,7 @@
 
  engine->control->port_max = engine->port_max;
  engine->control->real_time = realtime;
+ engine->control->rt_check = rt_check;
  engine->control->client_priority = (realtime
     ? engine->rtpriority - 1
     : 0);
Index: jackd/jackd.c
===================================================================
RCS file: /cvsroot/jackit/jack/jackd/jackd.c,v
retrieving revision 1.53
diff -u -r1.53 jackd.c
--- jackd/jackd.c 15 Jun 2005 09:18:40 -0000 1.53
+++ jackd/jackd.c 24 Oct 2005 16:19:50 -0000
@@ -58,6 +58,7 @@
 static char *server_name = NULL;
 static int realtime = 0;
 static int realtime_priority = 10;
+static int rt_check = 0;
 static int do_mlock = 1;
 static int temporary = 0;
 static int verbose = 0;
@@ -141,7 +142,7 @@
 
  /* get the engine/driver started */
 
- if ((engine = jack_engine_new (realtime, realtime_priority,
+ if ((engine = jack_engine_new (realtime, realtime_priority, rt_check,
        do_mlock, do_unlock, server_name,
        temporary, verbose, client_timeout,
        port_max, getpid(), drivers)) == 0) {
@@ -359,12 +360,14 @@
 {
  copyright (file);
  fprintf (file, "\n"
-"usage: jackd [ --realtime OR -R [ --realtime-priority OR -P priority ] ]\n"
+"usage: jackd [ --realtime OR -R ]\n"
+"             [ --realtime-priority OR -P priority ]\n"
+"             [ --realtime-check OR -C ]\n"
 "             [ --name OR -n server-name ]\n"
 "             [ --no-mlock OR -m ]\n"
 "             [ --unlock OR -u ]\n"
 "             [ --timeout OR -t client-timeout-in-msecs ]\n"
-"             [ --port-max OR -p maximum-number-of-ports]\n"
+"             [ --port-max OR -p maximum-number-of-ports ]\n"
 "             [ --verbose OR -v ]\n"
 "             [ --silent OR -s ]\n"
 "             [ --version OR -V ]\n"
@@ -463,7 +466,7 @@
 
 {
  jack_driver_desc_t * desc;
- const char *options = "-ad:P:uvshVRTFl:t:mn:p:";
+ const char *options = "-ad:P:uvshVRTFl:t:mn:p:C";
  struct option long_options[] =
  {
  { "driver", 1, 0, 'd' },
@@ -475,6 +478,7 @@
  { "unlock", 0, 0, 'u' },
  { "realtime", 0, 0, 'R' },
  { "realtime-priority", 1, 0, 'P' },
+ { "realtime-check", 0, 0, 'C' },
  { "timeout", 1, 0, 't' },
  { "temporary", 0, 0, 'T' },
  { "version", 0, 0, 'V' },
@@ -570,6 +574,10 @@
  realtime = 1;
  break;
 
+ case 'C':
+ rt_check = 1;
+ break;
+
  case 'T':
  temporary = 1;
  break;
Index: libjack/client.c
===================================================================
RCS file: /cvsroot/jackit/jack/libjack/client.c,v
retrieving revision 1.124
diff -u -r1.124 client.c
--- libjack/client.c 10 Sep 2005 23:58:43 -0000 1.124
+++ libjack/client.c 24 Oct 2005 16:19:51 -0000
@@ -1427,7 +1427,8 @@
  control->state = Running;
 
  /* begin preemption checking */
- CHECK_PREEMPTION (client->engine, TRUE);
+ if (client->engine->rt_check)
+ CHECK_PREEMPTION (client->engine, TRUE);
 
  if (control->sync_cb)
  jack_call_sync_client (client);
@@ -1446,7 +1447,8 @@
  jack_call_timebase_master (client);
 
  /* end preemption checking */
- CHECK_PREEMPTION (client->engine, FALSE);
+ if (client->engine->rt_check)
+ CHECK_PREEMPTION (client->engine, FALSE);
 
  control->finished_at = jack_get_microseconds();
 

--
  joq


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: jack tangent - rpmbuild of jack error

Florian Paul Schmidt-2
On Mon, 24 Oct 2005 11:36:13 -0500
"Jack O'Quin" <[hidden email]> wrote:

> Here's a rough (untested) patch, not including any man page update for
> the -C (--realtime-check) option.  Note that JACK_PROTOCOL_VERSION
> changed due to updating the shared memory mapping.

Thanks. It applies with some fuzz to the debian package source
(0.100.0). Let's see if it works, too :) Arr, damn need to boot another
kernel..

Flo

--
Palimm Palimm!
http://tapas.affenbande.org


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: jack tangent - rpmbuild of jack error

Florian Paul Schmidt-2
On Wed, 26 Oct 2005 00:41:26 +0200
Florian Schmidt <[hidden email]> wrote:

> On Mon, 24 Oct 2005 11:36:13 -0500
> "Jack O'Quin" <[hidden email]> wrote:
>
> > Here's a rough (untested) patch, not including any man page update for
> > the -C (--realtime-check) option.  Note that JACK_PROTOCOL_VERSION
> > changed due to updating the shared memory mapping.
>
> Thanks. It applies with some fuzz to the debian package source
> (0.100.0). Let's see if it works, too :) Arr, damn need to boot another
> kernel..

It seems to work fine. There probably needs to be an extra check (the
preemption check should only be done when jack runs RT). I added that to
the patch. Maybe jackd could also bail out when --realtime-check is
specified w/o --realtime.

I will send a manpage patch these days (Should it include info's on what
kernel settings need to be done, too?).


Index: configure.ac
===================================================================
RCS file: /cvsroot/jackit/jack/configure.ac,v
retrieving revision 1.68
diff -u -r1.68 configure.ac
--- configure.ac 10 Sep 2005 23:58:43 -0000 1.68
+++ configure.ac 24 Oct 2005 16:19:46 -0000
@@ -25,7 +25,7 @@
 dnl that would break applications linked with an older
 dnl version of libjack.
 dnl ---
-JACK_PROTOCOL_VERSION=15
+JACK_PROTOCOL_VERSION=16
 
 dnl ---
 dnl HOWTO: updating the libjack interface version
Index: jack/engine.h
===================================================================
RCS file: /cvsroot/jackit/jack/jack/engine.h,v
retrieving revision 1.50
diff -u -r1.50 engine.h
--- jack/engine.h 19 Dec 2004 18:41:28 -0000 1.50
+++ jack/engine.h 24 Oct 2005 16:19:47 -0000
@@ -150,7 +150,7 @@
 /* public functions */
 
 jack_engine_t  *jack_engine_new (int real_time, int real_time_priority,
- int do_mlock, int do_unlock,
+ int rt_check, int do_mlock, int do_unlock,
  const char *server_name, int temporary,
  int verbose, int client_timeout,
  unsigned int port_max,
Index: jack/internal.h
===================================================================
RCS file: /cvsroot/jackit/jack/jack/internal.h,v
retrieving revision 1.82
diff -u -r1.82 internal.h
--- jack/internal.h 22 Aug 2005 20:48:24 -0000 1.82
+++ jack/internal.h 24 Oct 2005 16:19:47 -0000
@@ -133,6 +133,7 @@
     pid_t                 engine_pid;
     jack_nframes_t  buffer_size;
     int8_t  real_time;
+    int8_t  rt_check;
     int8_t  do_mlock;
     int8_t  do_munlock;
     int32_t  client_priority;
Index: jackd/engine.c
===================================================================
RCS file: /cvsroot/jackit/jack/jackd/engine.c,v
retrieving revision 1.126
diff -u -r1.126 engine.c
--- jackd/engine.c 15 Jun 2005 09:18:40 -0000 1.126
+++ jackd/engine.c 24 Oct 2005 16:19:49 -0000
@@ -1530,7 +1530,8 @@
 }
 
 jack_engine_t *
-jack_engine_new (int realtime, int rtpriority, int do_mlock, int do_unlock,
+jack_engine_new (int realtime, int rtpriority, int rt_check,
+ int do_mlock, int do_unlock,
  const char *server_name, int temporary, int verbose,
  int client_timeout, unsigned int port_max, pid_t wait_pid,
  JSList *drivers)
@@ -1670,6 +1671,7 @@
 
  engine->control->port_max = engine->port_max;
  engine->control->real_time = realtime;
+ engine->control->rt_check = rt_check;
  engine->control->client_priority = (realtime
     ? engine->rtpriority - 1
     : 0);
Index: jackd/jackd.c
===================================================================
RCS file: /cvsroot/jackit/jack/jackd/jackd.c,v
retrieving revision 1.53
diff -u -r1.53 jackd.c
--- jackd/jackd.c 15 Jun 2005 09:18:40 -0000 1.53
+++ jackd/jackd.c 24 Oct 2005 16:19:50 -0000
@@ -58,6 +58,7 @@
 static char *server_name = NULL;
 static int realtime = 0;
 static int realtime_priority = 10;
+static int rt_check = 0;
 static int do_mlock = 1;
 static int temporary = 0;
 static int verbose = 0;
@@ -141,7 +142,7 @@
 
  /* get the engine/driver started */
 
- if ((engine = jack_engine_new (realtime, realtime_priority,
+ if ((engine = jack_engine_new (realtime, realtime_priority, rt_check,
        do_mlock, do_unlock, server_name,
        temporary, verbose, client_timeout,
        port_max, getpid(), drivers)) == 0) {
@@ -359,12 +360,14 @@
 {
  copyright (file);
  fprintf (file, "\n"
-"usage: jackd [ --realtime OR -R [ --realtime-priority OR -P priority ] ]\n"
+"usage: jackd [ --realtime OR -R ]\n"
+"             [ --realtime-priority OR -P priority ]\n"
+"             [ --realtime-check OR -C ]\n"
 "             [ --name OR -n server-name ]\n"
 "             [ --no-mlock OR -m ]\n"
 "             [ --unlock OR -u ]\n"
 "             [ --timeout OR -t client-timeout-in-msecs ]\n"
-"             [ --port-max OR -p maximum-number-of-ports]\n"
+"             [ --port-max OR -p maximum-number-of-ports ]\n"
 "             [ --verbose OR -v ]\n"
 "             [ --silent OR -s ]\n"
 "             [ --version OR -V ]\n"
@@ -463,7 +466,7 @@
 
 {
  jack_driver_desc_t * desc;
- const char *options = "-ad:P:uvshVRTFl:t:mn:p:";
+ const char *options = "-ad:P:uvshVRTFl:t:mn:p:C";
  struct option long_options[] =
  {
  { "driver", 1, 0, 'd' },
@@ -475,6 +478,7 @@
  { "unlock", 0, 0, 'u' },
  { "realtime", 0, 0, 'R' },
  { "realtime-priority", 1, 0, 'P' },
+ { "realtime-check", 0, 0, 'C' },
  { "timeout", 1, 0, 't' },
  { "temporary", 0, 0, 'T' },
  { "version", 0, 0, 'V' },
@@ -570,6 +574,10 @@
  realtime = 1;
  break;
 
+ case 'C':
+ rt_check = 1;
+ break;
+
  case 'T':
  temporary = 1;
  break;
Index: libjack/client.c
===================================================================
RCS file: /cvsroot/jackit/jack/libjack/client.c,v
retrieving revision 1.124
diff -u -r1.124 client.c
--- libjack/client.c 10 Sep 2005 23:58:43 -0000 1.124
+++ libjack/client.c 24 Oct 2005 16:19:51 -0000
@@ -1427,7 +1427,8 @@
  control->state = Running;
 
  /* begin preemption checking */
- CHECK_PREEMPTION (client->engine, TRUE);
+ if (client->engine->rt_check && client->engine->real_time)
+ CHECK_PREEMPTION (client->engine, TRUE);
 
  if (control->sync_cb)
  jack_call_sync_client (client);
@@ -1446,6 +1447,7 @@
  jack_call_timebase_master (client);
 
  /* end preemption checking */
- CHECK_PREEMPTION (client->engine, FALSE);
+ if (client->engine->rt_check && client->engine->real_time)
+ CHECK_PREEMPTION (client->engine, FALSE);
 
  control->finished_at = jack_get_microseconds();


--
Palimm Palimm!
http://tapas.affenbande.org


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: jack tangent - rpmbuild of jack error

Jack O'Quin-2
Florian Schmidt <[hidden email]> writes:

> It seems to work fine. There probably needs to be an extra check (the
> preemption check should only be done when jack runs RT). I added that to
> the patch. Maybe jackd could also bail out when --realtime-check is
> specified w/o --realtime.

I thought about that, but ignored it for the initial prototype.

> I will send a manpage patch these days (Should it include info's on what
> kernel settings need to be done, too?).

Probably few details.  They change fairly often.  Perhaps a pointer to
where Ingo keeps his current version.
--
  joq


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel