Changeset 1417

Show
Ignore:
Timestamp:
11/03/08 14:37:03 (12 years ago)
Author:
jwoithe
Message:

MOTU: streaming initialisation changes which might make the Ultralite work better. Could users of other models please test to ensure I haven't broken things for them. This code has been tested with the Traveler.

Files:

Legend:

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

    r1385 r1417  
    980980        } 
    981981 
    982         // In other OSes bit 26 of MOTU_REG_CLK_CTRL always seems 
    983         // to be set when this register is written to although the 
    984         // reason isn't currently known.  When we set it, it appears 
    985         // to prevent output being produced so we'll leave it unset 
    986         // until we work out what's going on.  Other systems write 
    987         // to MOTU_REG_CLK_CTRL multiple times, so that may be 
    988         // part of the mystery. 
    989         //   value |= 0x04000000; 
     982        // Bits 24-26 of MOTU_REG_CLK_CTRL behave a little differently 
     983        // depending on the model.  In addition, different bit patterns are 
     984        // written depending on whether streaming is enabled, disabled or is 
     985        // changing state.  For now we go with the combination used when 
     986        // streaming is enabled since it seems to work for the other states 
     987        // as well.  Since device muting can be effected by these bits, we 
     988        // may utilise this in future during streaming startup to prevent 
     989        // noises during stabilisation. 
     990        // 
     991        // For most models (possibly all except the Ultralite) all 3 bits 
     992        // can be zero and audio is still output. 
     993        // 
     994        // For the Traveler, if bit 26 is set (as it is under other OSes), 
     995        // bit 25 functions as a device mute bit: if set, audio is output 
     996        // while if 0 the entire device is muted.  If bit 26 is unset, 
     997        // setting bit 25 doesn't appear to be detrimental. 
     998        // 
     999        // For the Ultralite, other OSes leave bit 26 unset.  However, unlike 
     1000        // other devices bit 25 seems to function as a mute bit in this case. 
     1001        // 
     1002        // The function of bit 24 is currently unknown.  Other OSes set it 
     1003        // for all devices so we will too. 
     1004        reg &= 0xf8ffffff; 
     1005        if (m_motu_model == MOTU_MODEL_TRAVELER) 
     1006            reg |= 0x04000000; 
     1007        reg |= 0x03000000; 
    9901008        if (WriteRegister(MOTU_REG_CLK_CTRL, reg) == 0) { 
    9911009            supported=true;