[linux-audio-dev] [PATCH] jack.plumbing should not die

Martin Habets errandir_news at mph.eclipse.co.uk
Fri Feb 25 07:47:23 UTC 2005


Sometimes jack fails to make a connection. jack.plumbing dies when this
happens. Quite inconvenient as I usually don't notice for a while, have
to figure out what happened and restart jack.plumbing.

There is no reason for jack.plumbing to die because of this. It can try
to connect again later, when hopefully it is allowed.
Patch #1 attached fixes this issue.

While I'm at it: I was getting sick and tired of seeing
Rule file not modified: '/etc/jack.plumbing'.
Rule file not modified: '/home/mhabets/.jack.plumbing'.
all the time in my logging window. So patch #2 removes this info.
It seems totally useless info to me anyway.

Hopefully you find these usefull. Below is some before and after data.

Thanks,
Martin Habets

---------------------------------------------------------------------------
Before:

Rule file not modified: '/etc/jack.plumbing'.
Rule file not modified: '/home/mhabets/.jack.plumbing'.
Rule file not modified: '/etc/jack.plumbing'.
Rule file not modified: '/home/mhabets/.jack.plumbing'.
Rule file not modified: '/etc/jack.plumbing'.
Rule file not modified: '/home/mhabets/.jack.plumbing'.

Rule file not modified: '/etc/jack.plumbing'.
Rule file not modified: '/home/mhabets/.jack.plumbing'.
Connect: 'sooperlooper_1:loop0_out_1' -> 'alsa_pcm:playback_1'.
cannot connect ports owned by inactive clients; "sooperlooper_1" is not active
jack_connect() failed: 'sooperlooper_1:loop0_out_1' -> 'alsa_pcm:playback_1'

jack.plumbing dies

After:

cannot connect ports owned by inactive clients; "jack_rack_5735" is not active
cannot connect ports owned by inactive clients; "jack_rack_5735" is not active
cannot connect ports owned by inactive clients; "jack_rack_5735" is not active
Connect: 'jack_rack_5735:out_1' -> 'alsa_pcm:playback_1'.
cannot connect ports owned by inactive clients; "jack_rack_5735" is not active
jack_connect() failed: 'jack_rack_5735:out_1' -> 'alsa_pcm:playback_1'
Connect: 'jack_rack_5735:out_2' -> 'alsa_pcm:playback_2'.
cannot connect ports owned by inactive clients; "jack_rack_5735" is not active
jack_connect() failed: 'jack_rack_5735:out_2' -> 'alsa_pcm:playback_2'

**** alsa_pcm: xrun of at least 18.475 msecs

**** alsa_pcm: xrun of at least 0.257 msecs

Connect: 'jack_rack_5735:out_1' -> 'alsa_pcm:playback_1'.
Connect: 'jack_rack_5735:out_2' -> 'alsa_pcm:playback_2'.

-------------- next part --------------
Index: sw-04/jack.c
===================================================================
--- sw-04.orig/jack.c	2004-03-14 13:04:59.000000000 +0000
+++ sw-04/jack.c	2005-02-25 06:58:18.402635800 +0000
@@ -25,7 +25,6 @@
   int err = jack_disconnect ( client , src , dst ) ;
   if ( err ) {
     fprintf ( stderr , "jack_disconnect() failed: '%s' -> '%s'\n" , src , dst ) ;
-    FAILURE ;
   }
   return err ;
 }
@@ -36,7 +35,6 @@
   int err = jack_connect ( client , src , dst ) ;
   if ( err ) {
     fprintf ( stderr , "jack_connect() failed: '%s' -> '%s'\n" , src , dst ) ;
-    FAILURE ;
   }
   return err ;
 }
-------------- next part --------------
Index: sw-04/jack.plumbing.c
===================================================================
--- sw-04.orig/jack.plumbing.c	2004-03-14 13:03:50.000000000 +0000
+++ sw-04/jack.plumbing.c	2005-02-25 07:07:55.748865832 +0000
@@ -137,7 +137,7 @@
   }
   time_t mtime = stat_mtime ( f ) ;
   if ( mtime <= *m ) {
-    inform ( "Rule file not modified: '%s'." , f ) ;
+    /* inform ( "Rule file not modified: '%s'." , f ) ; */
     return 0 ;
   }
   *m = mtime ;


More information about the Linux-audio-dev mailing list