reduce verbosity of -D mackie in the presence of continued handshaking/keepalive...
authorPaul Davis <paul@linuxaudiosystems.com>
Sun, 12 Jun 2016 12:18:01 +0000 (08:18 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Sun, 12 Jun 2016 12:18:01 +0000 (08:18 -0400)
libs/surfaces/mackie/mackie_control_protocol.cc
libs/surfaces/mackie/surface.cc

index 40897761df6b55429d64dc62c20174abda34c36f..40fe07b8ffbaac668eeb030d637d5cc5020c6501 100644 (file)
@@ -1630,7 +1630,7 @@ MackieControlProtocol::midi_input_handler (IOCondition ioc, MIDI::Port* port)
 
        if (ioc & IO_IN) {
 
-               DEBUG_TRACE (DEBUG::MackieControl, string_compose ("something happend on  %1\n", port->name()));
+               // DEBUG_TRACE (DEBUG::MackieControl, string_compose ("something happend on  %1\n", port->name()));
 
                /* Devices using regular JACK MIDI ports will need to have
                   the x-thread FIFO drained to avoid burning endless CPU.
@@ -1647,7 +1647,7 @@ MackieControlProtocol::midi_input_handler (IOCondition ioc, MIDI::Port* port)
                        }
                }
 
-               DEBUG_TRACE (DEBUG::MackieControl, string_compose ("data available on %1\n", port->name()));
+               // DEBUG_TRACE (DEBUG::MackieControl, string_compose ("data available on %1\n", port->name()));
                framepos_t now = session->engine().sample_time();
                port->parse (now);
        }
index 400dad85abd85c1ff2500e969c4bac5a0871f2dc..494418a0909cfcad23c26c255b772c2eb4eb3fab 100644 (file)
@@ -675,8 +675,6 @@ Surface::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count
 {
        MidiByteArray bytes (count, raw_bytes);
 
-       DEBUG_TRACE (DEBUG::MackieControl, string_compose ("handle_midi_sysex: %1\n", bytes));
-
        if (_mcp.device_info().no_handshake()) {
                turn_it_on ();
        }
@@ -693,6 +691,9 @@ Surface::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count
 
        switch (bytes[5]) {
        case 0x01:
+               if (!_active) {
+                       DEBUG_TRACE (DEBUG::MackieControl, string_compose ("handle_midi_sysex: %1\n", bytes));
+               }
                /* MCP: Device Ready
                   LCP: Connection Challenge
                */
@@ -700,12 +701,17 @@ Surface::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count
                        DEBUG_TRACE (DEBUG::MackieControl, "Logic Control Device connection challenge\n");
                        write_sysex (host_connection_query (bytes));
                } else {
-                       DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Mackie Control Device ready, current status = %1\n", _active));
+                       if (!_active) {
+                               DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Mackie Control Device ready, current status = %1\n", _active));
+                       }
                        turn_it_on ();
                }
                break;
 
        case 0x06:
+               if (!_active) {
+                       DEBUG_TRACE (DEBUG::MackieControl, string_compose ("handle_midi_sysex: %1\n", bytes));
+               }
                /* Behringer X-Touch Compact: Device Ready
                */
                DEBUG_TRACE (DEBUG::MackieControl, string_compose ("Behringer X-Touch Compact ready, current status = %1\n", _active));
@@ -713,6 +719,7 @@ Surface::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count
                break;
 
        case 0x03: /* LCP Connection Confirmation */
+               DEBUG_TRACE (DEBUG::MackieControl, string_compose ("handle_midi_sysex: %1\n", bytes));
                DEBUG_TRACE (DEBUG::MackieControl, "Logic Control Device confirms connection, ardour replies\n");
                if (bytes[4] == 0x10 || bytes[4] == 0x11) {
                        write_sysex (host_connection_confirmation (bytes));
@@ -721,11 +728,13 @@ Surface::handle_midi_sysex (MIDI::Parser &, MIDI::byte * raw_bytes, size_t count
                break;
 
        case 0x04: /* LCP: Confirmation Denied */
+               DEBUG_TRACE (DEBUG::MackieControl, string_compose ("handle_midi_sysex: %1\n", bytes));
                DEBUG_TRACE (DEBUG::MackieControl, "Logic Control Device denies connection\n");
                _active = false;
                break;
 
        default:
+               DEBUG_TRACE (DEBUG::MackieControl, string_compose ("handle_midi_sysex: %1\n", bytes));
                DEBUG_TRACE (DEBUG::MackieControl, string_compose ("unknown device ID byte %1", (int) bytes[5]));
                error << "MCP: unknown sysex: " << bytes << endmsg;
        }