Changeset 1690
- Timestamp:
- 10/17/09 06:15:46 (13 years ago)
- Files:
-
- trunk/libffado/doc/rme_notes/rme_config_register_map.txt (modified) (3 diffs)
- trunk/libffado/src/rme/fireface_def.h (modified) (2 diffs)
- trunk/libffado/src/rme/fireface_hw.cpp (modified) (5 diffs)
- trunk/libffado/src/rme/rme_avdevice.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/doc/rme_notes/rme_config_register_map.txt
r1616 r1690 2 2 ============================================ 3 3 4 Version: 0.1 74 Version: 0.18 5 5 Author: Jonathan Woithe 6 Date: 1 3 August20096 Date: 17 October 2009 7 7 8 8 … … 554 554 555 555 This register comprises the 3 quadlets starting at address 0x20000001c on 556 the FF800 and the CBA on the FF400. The first quadlet contains the sample 557 rate in Hz. The second quadlet is mapped as follows: 556 the FF800 and the 5 quadlets starting at the CBA on the FF400. The first 557 quadlet contains the sample rate in Hz. The second quadlet is mapped as 558 follows: 558 559 bits 31-11 = number of audio channels 559 560 bits 10-0 = iso tx channel (PC to interface) … … 567 568 (28 channels, 400 Mbps firewire bus). 568 569 570 The forth and fifth quadlets (used only by the FF400) are zero. 571 569 572 After this register is configured, 4 quadlets are read starting from 570 0x801c0000. The numbers returned don't appear to bear any relationship to 571 those written to this same location later on. 572 573 Device (streaming) start register (FF800: 0x200000028, FF400: CBA+0x1c): 573 0x801c0000. When read, these are the device status registers. 574 575 Device (streaming) start register (FF800: 0x200000028, FF400: CBA+0x0c): 574 576 575 577 The start of streaming differs between the FF400 and FF800 in more than just trunk/libffado/src/rme/fireface_def.h
r1689 r1690 46 46 #define RME_FF800_CMD_BUFFER 0xfc88f000 47 47 48 /* Offsets for registers at fixed offsets from the device's command buffer address */ 48 // Offsets for registers at fixed offsets from the device's command buffer 49 // address 49 50 #define RME_FF_DDS_SRATE_OFS (0*4) 50 51 #define RME_FF_CONF1_OFS (5*4) … … 58 59 #define RME_FF800_CONF_REG (RME_FF800_CMD_BUFFER + RME_FF_CONF1_OFS) 59 60 60 #define RME_FF400_STREAM_INIT_REG (RME_FF400_CMD_BUFFER) // 3quadlets wide61 #define RME_FF400_STREAM_INIT_SIZE 3// Size in quadlets61 #define RME_FF400_STREAM_INIT_REG (RME_FF400_CMD_BUFFER) // 5 quadlets wide 62 #define RME_FF400_STREAM_INIT_SIZE 5 // Size in quadlets 62 63 #define RME_FF400_STREAM_SRATE (RME_FF400_CMD_BUFFER) 63 64 #define RME_FF400_STREAM_CONF0 (RME_FF400_CMD_BUFFER+4) 64 65 #define RME_FF400_STREAM_CONF1 (RME_FF400_CMD_BUFFER+8) 65 #define RME_FF800_STREAM_INIT_REG 0x20000001cLL 66 #define RME_FF800_STREAM_INIT_SIZE 3 // Size in quadlets66 #define RME_FF800_STREAM_INIT_REG 0x20000001cLL // 3 quadlets wide 67 #define RME_FF800_STREAM_INIT_SIZE 3 // Size in quadlets 67 68 #define RME_FF800_STREAM_SRATE 0x20000001cLL 68 69 #define RME_FF800_STREAM_CONF0 (0x20000001cLL+4) 69 70 #define RME_FF800_STREAM_CONF1 (0x20000001cLL+8) 70 #define RME_FF400_STREAM_START_REG (RME_FF400_CMD_BUFFER + 0x00 1c) // 1 quadlet71 #define RME_FF400_STREAM_START_REG (RME_FF400_CMD_BUFFER + 0x000c) // 1 quadlet 71 72 #define RME_FF800_STREAM_START_REG 0x200000028LL // 1 quadlet 72 73 #define RME_FF400_STREAM_END_REG (RME_FF400_CMD_BUFFER + 0x0004) // 4 quadlets wide 73 74 #define RME_FF400_STREAM_END_SIZE 4 // Size in quadlets 74 #define RME_FF800_STREAM_END_REG 0x200000034LL 75 #define RME_FF800_STREAM_END_REG 0x200000034LL // 3 quadlets wide 75 76 #define RME_FF800_STREAM_END_SIZE 3 // Size in quadlets 76 77 trunk/libffado/src/rme/fireface_hw.cpp
r1688 r1690 74 74 settings->output_level = FF_SWPARAM_OLEVEL_HIGAIN; 75 75 settings->phones_level = FF_SWPARAM_PHONESLEVEL_HIGAIN; 76 settings->limit_bandwidth = FF_SWPARAM_BWLIMIT_SEND_ALL_CHANNELS; 76 77 77 78 // Set amplifier gains … … 404 405 405 406 //This is just for testing - it's a known consistent configuration 406 //data[0] = 0x0002081 1; // Phantom off407 //data[0] = 0x00020810; // Phantom off 407 408 //data[0] = 0x00020811; // Phantom on 408 409 //data[1] = 0x0000031e; … … 415 416 return -1; 416 417 417 return -0;418 return 0; 418 419 } 419 420 … … 672 673 } 673 674 675 {signed int i; 676 printf("addr %016llx\n", addr); 677 for (i=0; i<5; i++) 678 printf("0x%08x ", buf[i]); 679 printf("\n"); 680 } 681 674 682 return writeBlock(addr, buf, size); 675 683 } … … 696 704 } 697 705 706 printf("start 0x%016llx data: %08x\n", addr, data); 698 707 ret = writeRegister(addr, data); 699 708 if (ret == 0) { trunk/libffado/src/rme/rme_avdevice.cpp
r1689 r1690 553 553 if (settings->limit_bandwidth != FF_SWPARAM_BWLIMIT_ANALOG_ONLY) 554 554 num_channels += 2; 555 if (settings->limit_bandwidth==FF_SWPARAM_BWLIMIT_NO_ADAT2 || 555 if (settings->limit_bandwidth==FF_SWPARAM_BWLIMIT_SEND_ALL_CHANNELS) 556 num_channels += (mult==4?0:(mult==2?4:8)); 557 if (m_rme_model==RME_MODEL_FIREFACE800 && 556 558 settings->limit_bandwidth==FF_SWPARAM_BWLIMIT_SEND_ALL_CHANNELS) 557 num_channels += (mult==4?0:(mult==2?4:8));558 if (settings->limit_bandwidth==FF_SWPARAM_BWLIMIT_SEND_ALL_CHANNELS)559 559 num_channels += (mult==4?0:(mult==2?4:8)); 560 560 … … 593 593 break; 594 594 } 595 { 596 signed int j; 597 printf("init stat: "); 598 for (j=0;j<4;j++){ 599 printf("%08x ", stat[j]); 600 } 601 printf("\n"); 602 } 595 603 if (m_rme_model == RME_MODEL_FIREFACE400) { 596 604 iso_rx_channel = get1394Service().allocateIsoChannelGeneric(bandwidth); … … 598 606 } 599 607 // The Fireface-800 chooses its tx channel (our rx channel). 600 if (stat[2] == -1) {608 if (stat[2] == 0xffffffff) { 601 609 // Device not ready; wait 5 ms and try again 602 610 usleep(5000);