Changeset 2062

Show
Ignore:
Timestamp:
03/04/12 17:20:37 (9 years ago)
Author:
jwoithe
Message:

rme: fix misconfiguration of packet layout data caused by offsets which didn't adapt as the number of inputs changed (the fixed offsets were applicable to the FF400 only). Not compile-tested yet.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libffado/src/rme/rme_avdevice.cpp

    r2061 r2062  
    957957      snprintf(name, sizeof(name), "%s_%s_phones-%c", id.c_str(), mode_str,  
    958958        i==0?'L':'R'); 
    959       /* The headphone channels start at offset 24 */ 
    960       addPort(s_processor, name, direction, 24+i*4, 0); 
     959      /* The headphone channels follow the straight analog lines */ 
     960      addPort(s_processor, name, direction, n_analog*4+i*4, 0); 
    961961    } 
    962962    for (i=0; i<n_spdif; i++) { 
    963963      snprintf(name, sizeof(name), "%s_%s_SPDIF-%d", id.c_str(), mode_str, i+1); 
    964       /* The SPDIF channels start at offset 32 */ 
    965       addPort(s_processor, name, direction, 32+i*4, 0); 
     964      /* The SPDIF channels start after all analog lines */ 
     965      addPort(s_processor, name, direction, (n_analog+n_phones)*4+i*4, 0); 
    966966    } 
    967967    for (i=0; i<n_adat; i++) { 
    968968      snprintf(name, sizeof(name), "%s_%s_adat-%d", id.c_str(), mode_str, i+1); 
    969       /* ADAT ports start at offset 40 */ 
    970       addPort(s_processor, name, direction, 40+i*4, 0); 
     969      /* ADAT ports follow all other ports */ 
     970      addPort(s_processor, name, direction, (n_analog+n_phones+n_spdif)*4+i*4, 0); 
    971971    } 
    972972