diff options
author | Robin Gareus <robin@gareus.org> | 2015-10-05 16:17:49 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-10-05 16:17:49 +0200 |
commit | 22b07e0233a29d9633ffa825a79503befaf2e16e (patch) | |
tree | 1d8b06056f8e12197158f5d906319767d3dedda5 /libs/surfaces/frontier | |
parent | e11ba7b79d68bc1070b170236c22123966d7bcc3 (diff) |
NOOP, remove trailing tabs/whitespace.
Diffstat (limited to 'libs/surfaces/frontier')
7 files changed, 39 insertions, 39 deletions
diff --git a/libs/surfaces/frontier/kernel_drivers/tests/tranzport.c b/libs/surfaces/frontier/kernel_drivers/tests/tranzport.c index 96bc3f95ef..480c49c7b6 100644 --- a/libs/surfaces/frontier/kernel_drivers/tests/tranzport.c +++ b/libs/surfaces/frontier/kernel_drivers/tests/tranzport.c @@ -110,7 +110,7 @@ tranzport_t *open_tranzport_core() tranzport_t *open_tranzport() { -return open_tranzport_core(); +return open_tranzport_core(); } void close_tranzport(tranzport_t *z) @@ -191,7 +191,7 @@ int tranzport_read(tranzport_t *z, uint8_t *status, uint32_t *buttons, uint8_t * { uint8_t buf[8]; int val; - + memset(buf, 0xff, 8); val = read(z->udev, buf, 8); if (val < 0) { diff --git a/libs/surfaces/frontier/kernel_drivers/tests/tranzport_lights.c b/libs/surfaces/frontier/kernel_drivers/tests/tranzport_lights.c index 4096ee680d..f116c50a74 100644 --- a/libs/surfaces/frontier/kernel_drivers/tests/tranzport_lights.c +++ b/libs/surfaces/frontier/kernel_drivers/tests/tranzport_lights.c @@ -109,7 +109,7 @@ tranzport_t *open_tranzport_core() tranzport_t *open_tranzport() { -return open_tranzport_core(); +return open_tranzport_core(); } void close_tranzport(tranzport_t *z) @@ -190,7 +190,7 @@ int tranzport_read(tranzport_t *z, uint8_t *status, uint32_t *buttons, uint8_t * { uint8_t buf[8]; int val; - + memset(buf, 0xff, 8); val = read(z->udev, buf, 8); if (val < 0) { diff --git a/libs/surfaces/frontier/kernel_drivers/tranzport.c b/libs/surfaces/frontier/kernel_drivers/tranzport.c index 951be979d0..e7377cc65b 100644 --- a/libs/surfaces/frontier/kernel_drivers/tranzport.c +++ b/libs/surfaces/frontier/kernel_drivers/tranzport.c @@ -235,7 +235,7 @@ struct usb_tranzport { unsigned char LightPunch; unsigned char last_cmd[8]; unsigned char screen[40]; // We'll also have cells - + }; /* prevent races between open() and disconnect() */ @@ -405,12 +405,12 @@ static void usb_tranzport_interrupt_in_callback(struct urb *urb) /* Always pass one offline event up the stack */ if(dev->offline > 0 && dev->interrupt_in_buffer[1] != 0xff) { dev->offline = 0; } if(dev->offline == 0 && dev->interrupt_in_buffer[1] == 0xff) { dev->offline = 1; } - + #endif dbg_info(&dev->intf->dev, "%s: head, tail are %x, %x\n", __FUNCTION__,dev->ring_head,dev->ring_tail); next_ring_head = (dev->ring_head+1) % ring_buffer_size; - + if (next_ring_head != dev->ring_tail) { memcpy(&((*dev->ring_buffer)[dev->ring_head]), dev->interrupt_in_buffer, urb->actual_length); dev->ring_head = next_ring_head; @@ -687,7 +687,7 @@ static ssize_t usb_tranzport_read(struct file *file, char __user *buffer, size_t dbg_info(&dev->intf->dev, "%s: trying to compress: %02x%02x%02x%02x%02x %02x %02x %02x\n", __FUNCTION__, (*dev->ring_buffer)[dev->ring_tail].cmd[0],(*dev->ring_buffer)[dev->ring_tail].cmd[1],(*dev->ring_buffer)[dev->ring_tail].cmd[2],(*dev->ring_buffer)[dev->ring_tail].cmd[3],(*dev->ring_buffer)[dev->ring_tail].cmd[4],(*dev->ring_buffer)[dev->ring_tail].cmd[5],(*dev->ring_buffer)[dev->ring_tail].cmd[6],(*dev->ring_buffer)[dev->ring_tail].cmd[7]); - + if(((*dev->ring_buffer)[dev->ring_tail].cmd[6] != 0 && (*dev->ring_buffer)[next_tail].cmd[6] != 0 ) && ((newwheel > 0 && oldwheel > 0) || @@ -723,13 +723,13 @@ static ssize_t usb_tranzport_read(struct file *file, char __user *buffer, size_t retval = -EFAULT; goto unlock_exit; } - + dev->ring_tail = (dev->ring_tail+1) % ring_buffer_size; c+=8; dbg_info(&dev->intf->dev, "%s: head, tail are %x, %x\n", __FUNCTION__,dev->ring_head,dev->ring_tail); } retval = c; - + #else if (copy_to_user(buffer, &(*dev->ring_buffer)[dev->ring_tail], 8)) { retval = -EFAULT; diff --git a/libs/surfaces/frontier/tests/tranzport_lights.c b/libs/surfaces/frontier/tests/tranzport_lights.c index 28a8462d84..07867d6dd0 100644 --- a/libs/surfaces/frontier/tests/tranzport_lights.c +++ b/libs/surfaces/frontier/tests/tranzport_lights.c @@ -109,7 +109,7 @@ tranzport_t *open_tranzport_core() tranzport_t *open_tranzport() { -return open_tranzport_core(); +return open_tranzport_core(); } void close_tranzport(tranzport_t *z) @@ -190,7 +190,7 @@ int tranzport_read(tranzport_t *z, uint8_t *status, uint32_t *buttons, uint8_t * { uint8_t buf[8]; int val; - + memset(buf, 0xff, 8); val = read(z->udev, buf, 8); if (val < 0) { diff --git a/libs/surfaces/frontier/tranzport/interface.cc b/libs/surfaces/frontier/tranzport/interface.cc index e60524d24c..f019c02f45 100644 --- a/libs/surfaces/frontier/tranzport/interface.cc +++ b/libs/surfaces/frontier/tranzport/interface.cc @@ -33,7 +33,7 @@ new_tranzport_protocol (ControlProtocolDescriptor* descriptor, Session* s) } return tcp; - + } void @@ -59,7 +59,7 @@ static ControlProtocolDescriptor tranzport_descriptor = { initialize : new_tranzport_protocol, destroy : delete_tranzport_protocol }; - + extern "C" { ControlProtocolDescriptor* diff --git a/libs/surfaces/frontier/tranzport/tranzport_control_protocol.cc b/libs/surfaces/frontier/tranzport/tranzport_control_protocol.cc index 773ac2d5a1..f093287f50 100644 --- a/libs/surfaces/frontier/tranzport/tranzport_control_protocol.cc +++ b/libs/surfaces/frontier/tranzport/tranzport_control_protocol.cc @@ -273,7 +273,7 @@ TranzportControlProtocol::screen_flush () printf("usb screen update failed for some reason... why? \ncmd and data were %02x %02x %02x %02x %02x %02x %02x %02x\n", cmd[0],cmd[1],cmd[2], cmd[3], cmd[4], cmd[5],cmd[6],cmd[7]); #endif - pending += 1; + pending += 1; // Shouldn't need to do this // screen_invalid[row][col_base] = screen_invalid[row][col_base+1] = // screen_invalid[row][col_base+2] = screen_invalid[row][col_base+3] = true; @@ -592,7 +592,7 @@ void TranzportControlProtocol::show_transport_time () { show_bbt (session->transport_frame ()); -} +} void TranzportControlProtocol::show_smpte (framepos_t where) @@ -689,7 +689,7 @@ TranzportControlProtocol::open_core (struct usb_device* dev) error << _("Tranzport: cannot open USB transport") << endmsg; return -1; } - + if (usb_claim_interface (udev, 0) < 0) { error << _("Tranzport: cannot claim USB interface") << endmsg; usb_close (udev); @@ -737,7 +737,7 @@ int TranzportControlProtocol::read(uint8_t *buf, uint32_t timeout_override) return val; } - + int TranzportControlProtocol::write_noretry (uint8_t* cmd, uint32_t timeout_override) { @@ -762,7 +762,7 @@ TranzportControlProtocol::write_noretry (uint8_t* cmd, uint32_t timeout_override return 0; -} +} int TranzportControlProtocol::write (uint8_t* cmd, uint32_t timeout_override) @@ -771,7 +771,7 @@ TranzportControlProtocol::write (uint8_t* cmd, uint32_t timeout_override) int val; int retry = 0; if(inflight > MAX_TRANZPORT_INFLIGHT) { return (-1); } - + while((val = usb_interrupt_write (udev, WRITE_ENDPOINT, (char*) cmd, 8, timeout_override ? timeout_override : timeout))!=8 && retry++ < MAX_RETRY) { printf("usb_interrupt_write failed, retrying: %d\n", val); } @@ -794,7 +794,7 @@ TranzportControlProtocol::write (uint8_t* cmd, uint32_t timeout_override) return (write_noretry(cmd,timeout_override)); #endif -} +} #else #error Kernel API not defined yet for Tranzport @@ -863,7 +863,7 @@ bool TranzportControlProtocol::lcd_isdamaged () for(int r = 0; r < 2; r++) { for(int c = 0; c < 20; c++) { if(screen_invalid[r][c]) { -#if DEBUG_TRANZPORT > 5 +#if DEBUG_TRANZPORT > 5 printf("row: %d,col: %d is damaged, should redraw it\n", r,c); #endif return true; @@ -881,7 +881,7 @@ bool TranzportControlProtocol::lcd_isdamaged (int row, int col, int length) if((row >= 0 && row < 2) && (col >=0 && col < 20)) { for(int c = col; c < endcol; c++) { if(screen_invalid[row][c]) { -#if DEBUG_TRANZPORT > 5 +#if DEBUG_TRANZPORT > 5 printf("row: %d,col: %d is damaged, should redraw it\n", row,c); #endif return true; @@ -1007,7 +1007,7 @@ int TranzportControlProtocol::rtpriority_unset(int priority) struct sched_param rtparam; int err; memset (&rtparam, 0, sizeof (rtparam)); - rtparam.sched_priority = priority; + rtparam.sched_priority = priority; if ((err = pthread_setschedparam (pthread_self(), SCHED_FIFO, &rtparam)) != 0) { PBD::info << string_compose (_("%1: can't stop realtime scheduling (%2)"), name(), strerror (errno)) << endmsg; return 1; @@ -1731,7 +1731,7 @@ TranzportControlProtocol::step_gain_up () if (gain_fraction > 2.0) { gain_fraction = 2.0; } - + route_set_gain (0, slider_position_to_gain (gain_fraction)); } @@ -1747,7 +1747,7 @@ TranzportControlProtocol::step_gain_down () if (gain_fraction < 0.0) { gain_fraction = 0.0; } - + route_set_gain (0, slider_position_to_gain (gain_fraction)); } @@ -1866,7 +1866,7 @@ TranzportControlProtocol::print_noretry (int row, int col, const char *text) uint32_t left = strlen (text); char tmp[5]; int base_col; - + if (row < 0 || row > 1) { return; } @@ -1899,24 +1899,24 @@ TranzportControlProtocol::print_noretry (int row, int col, const char *text) int offset = col % 4; /* copy current cell contents into tmp */ - + memcpy (tmp, &screen_pending[row][base_col], 4); - + /* overwrite with new text */ - + uint32_t tocopy = min ((4U - offset), left); - + memcpy (tmp+offset, text, tocopy); - + /* copy it back to pending */ - + memcpy (&screen_pending[row][base_col], tmp, 4); - + text += tocopy; left -= tocopy; col += tocopy; } -} +} XMLNode& TranzportControlProtocol::get_state () diff --git a/libs/surfaces/frontier/tranzport/tranzport_control_protocol.h b/libs/surfaces/frontier/tranzport/tranzport_control_protocol.h index 39addbbaca..13df6915a2 100644 --- a/libs/surfaces/frontier/tranzport/tranzport_control_protocol.h +++ b/libs/surfaces/frontier/tranzport/tranzport_control_protocol.h @@ -76,7 +76,7 @@ class TranzportControlProtocol : public ARDOUR::ControlProtocol WheelShiftMaster, WheelShiftMarker }; - + enum WheelMode { WheelTimeline, WheelScrub, @@ -94,7 +94,7 @@ class TranzportControlProtocol : public ARDOUR::ControlProtocol WheelIncrSecond, WheelIncrMinute }; - + enum DisplayMode { DisplayNormal, DisplayRecording, @@ -113,7 +113,7 @@ class TranzportControlProtocol : public ARDOUR::ControlProtocol BlingRows, BlingFlashAll }; - + pthread_t thread; uint32_t buttonmask; uint32_t timeout; @@ -246,7 +246,7 @@ class TranzportControlProtocol : public ARDOUR::ControlProtocol void show_current_track (); void show_track_gain (); void show_transport_time (); - void show_bbt (framepos_t where); + void show_bbt (framepos_t where); void show_smpte (framepos_t where); void show_wheel_mode (); void show_gain (); |