Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

firewire: Move update_port_latencies() further up the file

Instead of introducing a prototype declaration, let's move the function so it
can be used by ffado_driver_attach().
  • Loading branch information...
commit b4e09a119c50e3ea5948ea5a87067a22e2dfafab 1 parent 6a7a11c
Adrian Knoth authored April 02, 2012

Showing 1 changed file with 25 additions and 25 deletions. Show diff stats Hide diff stats

  1. 50  drivers/firewire/ffado_driver.c
50  drivers/firewire/ffado_driver.c
@@ -68,6 +68,31 @@ extern int ffado_streaming_set_period_size(ffado_device_t *dev,
68 68
 // enable verbose messages
69 69
 static int g_verbose=0;
70 70
 
  71
+static void update_port_latencies(ffado_driver_t *driver)
  72
+{
  73
+	JSList *node;
  74
+	jack_latency_range_t range;
  75
+
  76
+	range.min = range.max = (driver->period_size * (driver->device_options.nb_buffers - 1));
  77
+	for (node = driver->playback_ports; node;
  78
+	     node = jack_slist_next (node)) {
  79
+		if (node->data != NULL) {
  80
+			jack_port_t *port = (jack_port_t *) node->data;
  81
+			jack_port_set_latency_range (port, JackPlaybackLatency, &range);
  82
+		}
  83
+	}
  84
+
  85
+	range.min = range.max = driver->period_size + driver->capture_frame_latency;
  86
+	for (node = driver->capture_ports; node;
  87
+	     node = jack_slist_next (node)) {
  88
+		if (node->data != NULL) {
  89
+			jack_port_t *port = (jack_port_t *) node->data;
  90
+			jack_port_set_latency_range (port, JackCaptureLatency, &range);
  91
+		}
  92
+
  93
+	}
  94
+}
  95
+
71 96
 static int
72 97
 ffado_driver_attach (ffado_driver_t *driver)
73 98
 {
@@ -684,31 +709,6 @@ ffado_driver_stop (ffado_driver_t *driver)
684 709
 	return 0;
685 710
 }
686 711
 
687  
-static void update_port_latencies(ffado_driver_t *driver)
688  
-{
689  
-	JSList *node;
690  
-	jack_latency_range_t range;
691  
-
692  
-	range.min = range.max = (driver->period_size * (driver->device_options.nb_buffers - 1));
693  
-	for (node = driver->playback_ports; node;
694  
-	     node = jack_slist_next (node)) {
695  
-		if (node->data != NULL) {
696  
-			jack_port_t *port = (jack_port_t *) node->data;
697  
-			jack_port_set_latency_range (port, JackPlaybackLatency, &range);
698  
-		}
699  
-	}
700  
-
701  
-	range.min = range.max = driver->period_size + driver->capture_frame_latency;
702  
-	for (node = driver->capture_ports; node;
703  
-	     node = jack_slist_next (node)) {
704  
-		if (node->data != NULL) {
705  
-			jack_port_t *port = (jack_port_t *) node->data;
706  
-			jack_port_set_latency_range (port, JackCaptureLatency, &range);
707  
-		}
708  
-
709  
-	}
710  
-}
711  
-
712 712
 static int
713 713
 ffado_driver_bufsize (ffado_driver_t* driver, jack_nframes_t nframes)
714 714
 {

0 notes on commit b4e09a1

Please sign in to comment.
Something went wrong with that request. Please try again.