Changeset 310

Show
Ignore:
Timestamp:
09/27/06 16:16:09 (16 years ago)
Author:
jwoithe
Message:

MOTU: fix optical mode detection and clear up some associated packet sizing issues.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/libfreebob-2.0/src/libstreaming/MotuStreamProcessor.cpp

    r309 r310  
    10841084 
    10851085        m_next_cycle = -1; 
    1086          
     1086 
    10871087        return true; 
    10881088} 
  • branches/libfreebob-2.0/src/motu/motu_avdevice.cpp

    r307 r310  
    637637        unsigned int reg = ReadRegister(MOTUFW_REG_ROUTE_PORT_CONF); 
    638638 
     639debugOutput(DEBUG_LEVEL_VERBOSE, "optical mode: %x %x %x %x\n",dir, reg, reg & MOTUFW_OPTICAL_IN_MODE_MASK, 
     640reg & MOTUFW_OPTICAL_OUT_MODE_MASK); 
     641 
    639642        if (dir == MOTUFW_DIR_IN) 
    640643                return (reg & MOTUFW_OPTICAL_IN_MODE_MASK) >> 8; 
    641644        else 
    642                 return (reg & MOTUFW_OPTICAL_OUT_MODE_MASK) >> 12
     645                return (reg & MOTUFW_OPTICAL_OUT_MODE_MASK) >> 10
    643646} 
    644647 
     
    653656        if (reg & MOTUFW_OPTICAL_IN_MODE_MASK != (MOTUFW_OPTICAL_MODE_ADAT<<8)) 
    654657                opt_ctrl |= 0x00000080; 
    655         if (reg & MOTUFW_OPTICAL_OUT_MODE_MASK != (MOTUFW_OPTICAL_MODE_ADAT<<12)) 
     658        if (reg & MOTUFW_OPTICAL_OUT_MODE_MASK != (MOTUFW_OPTICAL_MODE_ADAT<<10)) 
    656659                opt_ctrl |= 0x00000040; 
    657660 
     
    666669        if (mode & MOTUFW_DIR_OUT) { 
    667670                reg &= ~MOTUFW_OPTICAL_OUT_MODE_MASK; 
    668                 reg |= (mode <<12) & MOTUFW_OPTICAL_OUT_MODE_MASK; 
     671                reg |= (mode <<10) & MOTUFW_OPTICAL_OUT_MODE_MASK; 
    669672                if (mode != MOTUFW_OPTICAL_MODE_ADAT) 
    670673                        opt_ctrl |= 0x00000040; 
  • branches/libfreebob-2.0/src/motu/motu_avdevice.h

    r308 r310  
    4545#define MOTUFW_OPTICAL_MODE_TOSLINK     0x02 
    4646#define MOTUFW_OPTICAL_IN_MODE_MASK     (0x00000300) 
    47 #define MOTUFW_OPTICAL_OUT_MODE_MASK    (0x00003000) 
     47#define MOTUFW_OPTICAL_OUT_MODE_MASK    (0x00000c00) 
    4848#define MOTUFW_OPTICAL_MODE_MASK        (MOTUFW_OPTICAL_IN_MODE_MASK|MOTUFW_OPTICAL_MODE_MASK) 
    4949