- Timestamp:
- 09/06/09 05:27:13 (14 years ago)
- Files:
-
- trunk/libffado/src/rme/fireface_def.h (modified) (2 diffs)
- trunk/libffado/src/rme/rme_avdevice.cpp (modified) (2 diffs)
- trunk/libffado/src/rme/rme_avdevice.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/rme/fireface_def.h
r1616 r1657 388 388 #define FF_DEV_FLASH_SPDIF_OUTPUT_PRO_ON 0x00000001 389 389 #define FF_DEV_FLASH_SPDIF_OUTPUT_NONAUDIO_ON 0x00000001 390 #define FF_DEV_FLASH_BWLIMIT_SEND_ALL_CHANNELS 0x00000001 391 #define FF_DEV_FLASH_BWLIMIT_NO_ADAT2 0x00000002 // FF800 only 392 #define FF_DEV_FLASH_BWLIMIT_ANALOG_SPDIF_ONLY 0x00000003 393 #define FF_DEV_FLASH_BWLIMIT_ANALOG_ONLY 0x00000004 390 394 #define FF_DEV_FLASH_CLOCK_MODE_MASTER 0x00000002 391 395 #define FF_DEV_FLASH_CLOCK_MODE_AUTOSYNC 0x00000001 … … 454 458 #define FF_SWPARAM_SPDIF_OUTPUT_PRO_ON FF_DEV_FLASH_SPDIF_OUTPUT_PRO_ON 455 459 #define FF_SWPARAM_SPDIF_OUTPUT_NONAUDIO_ON FF_DEV_FLASH_SPDIF_OUTPUT_NONAUDIO_ON 460 #define FF_SWPARAM_BWLIMIT_SEND_ALL_CHANNELS FF_DEV_FLASH_BWLIMIT_SEND_ALL_CHANNELS 461 #define FF_SWPARAM_BWLIMIT_NO_ADAT2 FF_DEV_FLASH_BWLIMIT_NO_ADAT2 462 #define FF_SWPARAM_BWLIMIT_ANALOG_SPDIF_ONLY FF_DEV_FLASH_BWLIMIT_ANALOG_SPDIF_ONLY 463 #define FF_SWPARAM_BWLIMIT_ANALOG_ONLY FF_DEV_FLASH_BWLIMIT_ANALOG_ONLY 456 464 #define FF_SWPARAM_CLOCK_MODE_MASTER FF_DEV_FLASH_CLOCK_MODE_MASTER 457 465 #define FF_SWPARAM_CLOCK_MODE_AUTOSYNC FF_DEV_FLASH_CLOCK_MODE_AUTOSYNC trunk/libffado/src/rme/rme_avdevice.cpp
r1629 r1657 83 83 , m_rme_model( RME_MODEL_NONE ) 84 84 , num_channels( 0 ) 85 , samples_per_packet( 0 )85 , frames_per_packet( 0 ) 86 86 , speed800( 0 ) 87 87 , m_MixerContainer( NULL ) … … 506 506 Device::prepare() { 507 507 508 debugOutput(DEBUG_LEVEL_NORMAL, "Preparing Device...\n" ); 509 510 return true; 508 signed int mult; 509 510 debugOutput(DEBUG_LEVEL_NORMAL, "Preparing Device...\n" ); 511 512 // The number of frames transmitted in a single packet is solely 513 // determined by the sample rate. 514 mult = multiplier_of_freq(getSamplingFrequency()); 515 switch (mult) { 516 case 2: frames_per_packet = 15; break; 517 case 4: frames_per_packet = 25; break; 518 default: 519 frames_per_packet = 7; 520 } 521 522 // The number of active channels depends on sample rate and whether 523 // bandwidth limitation is active. First set up the number of analog 524 // channels (which differs between devices), then add SPDIF channels if 525 // relevant. Finally, the number of channels available from each ADAT 526 // interface depends on sample rate: 0 at 4x, 4 at 2x and 8 at 1x. 527 if (m_rme_model == RME_MODEL_FIREFACE800) 528 num_channels = 10; 529 else 530 num_channels = 8; 531 if (settings->limit_bandwidth != FF_SWPARAM_BWLIMIT_ANALOG_ONLY) 532 num_channels += 2; 533 if (settings->limit_bandwidth==FF_SWPARAM_BWLIMIT_NO_ADAT2 || 534 settings->limit_bandwidth==FF_SWPARAM_BWLIMIT_SEND_ALL_CHANNELS) 535 num_channels += (mult==4?0:(mult==2?4:8)); 536 if (settings->limit_bandwidth==FF_SWPARAM_BWLIMIT_SEND_ALL_CHANNELS) 537 num_channels += (mult==4?0:(mult==2?4:8)); 538 539 // TODO: We always must allocate a tx iso channel. An rx iso channel is 540 // also allocated for the FF400. For the FF800, the device itself will 541 // supply the iso channel we should listen on in zero-based byte 2 of 542 // the hardware status return. 543 544 return true; 511 545 } 512 546 trunk/libffado/src/rme/rme_avdevice.h
r1629 r1657 123 123 124 124 signed int num_channels; 125 signed int samples_per_packet;125 signed int frames_per_packet; // 1 frame includes 1 sample from each channel 126 126 signed int speed800; 127 127