Changeset 1320

Show
Ignore:
Timestamp:
09/19/08 09:53:09 (12 years ago)
Author:
jwoithe
Message:

MOTU: optical port configuration fixes:

  • fix an error in setOpticalMode() so there's a hope of it doing the right thing now.
  • ensure a particular register is explicitly initialised before enabling streaming (required for the Ultralite). Take 1 - needs testing with an ultralite.

MOTU: fix some incidental typos.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/libffado-2.0/src/motu/motu_avdevice.cpp

    r1315 r1320  
    10761076    debugOutput(DEBUG_LEVEL_NORMAL, "Preparing MotuDevice...\n" ); 
    10771077 
     1078    // Explicitly set the optical mode, primarily to ensure that the 
     1079    // MOTU_REG_OPTICAL_CTRL register is initialised.  We need to do this to 
     1080    // because some interfaces (the Ultralite for example) appear to power 
     1081    // up without this set to anything sensible.  In this case, writes to 
     1082    // MOTU_REG_ISOCTRL fail more often than not, which is bad. 
     1083    setOpticalMode(MOTU_DIR_IN, optical_in_mode); 
     1084    setOpticalMode(MOTU_DIR_OUT, optical_out_mode); 
     1085 
    10781086    // Allocate bandwidth if not previously done. 
    10791087    // FIXME: The bandwidth allocation calculation can probably be 
     
    11431151    std::string id=std::string("dev?"); 
    11441152    if(!getOption("id", id)) { 
    1145         debugWarning("Could not retrieve id parameter, defauling to 'dev?'\n"); 
     1153        debugWarning("Could not retrieve id parameter, defaulting to 'dev?'\n"); 
    11461154    } 
    11471155 
     
    13781386        opt_ctrl |= 0x00000040; 
    13791387 
    1380     if (mode & MOTU_DIR_IN) { 
     1388    if (dir & MOTU_DIR_IN) { 
    13811389        reg &= ~MOTU_OPTICAL_IN_MODE_MASK; 
    13821390        reg |= (mode << 8) & MOTU_OPTICAL_IN_MODE_MASK; 
     
    13861394            opt_ctrl &= ~0x00000080; 
    13871395    } 
    1388     if (mode & MOTU_DIR_OUT) { 
     1396    if (dir & MOTU_DIR_OUT) { 
    13891397        reg &= ~MOTU_OPTICAL_OUT_MODE_MASK; 
    13901398        reg |= (mode <<10) & MOTU_OPTICAL_OUT_MODE_MASK;