Changeset 739 for trunk/libffado/src/dice
- Timestamp:
- 11/28/07 12:02:08 (15 years ago)
- Files:
-
- trunk/libffado/src/dice/dice_avdevice.cpp (modified) (16 diffs)
- trunk/libffado/src/dice/dice_avdevice.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/dice/dice_avdevice.cpp
r734 r739 52 52 }; 53 53 54 DiceAvDevice::DiceAvDevice( Ieee1394Service& ieee1394Service, 55 std::auto_ptr<ConfigRom>( configRom )) 56 : FFADODevice( ieee1394Service, configRom ) 54 DiceAvDevice::DiceAvDevice( std::auto_ptr<ConfigRom>( configRom )) 55 : FFADODevice( configRom ) 57 56 , m_model( NULL ) 58 57 , m_global_reg_offset (0xFFFFFFFFLU) … … 108 107 109 108 FFADODevice * 110 DiceAvDevice::createDevice( Ieee1394Service& ieee1394Service, 111 std::auto_ptr<ConfigRom>( configRom )) 109 DiceAvDevice::createDevice( std::auto_ptr<ConfigRom>( configRom )) 112 110 { 113 return new DiceAvDevice( ieee1394Service,configRom );111 return new DiceAvDevice( configRom ); 114 112 } 115 113 … … 117 115 DiceAvDevice::discover() 118 116 { 119 unsigned int vendorId = m_pConfigRom->getNodeVendorId();120 unsigned int modelId = m_pConfigRom->getModelId();117 unsigned int vendorId = getConfigRom().getNodeVendorId(); 118 unsigned int modelId = getConfigRom().getModelId(); 121 119 122 120 for ( unsigned int i = 0; … … 490 488 Streaming::AmdtpReceiveStreamProcessor *p; 491 489 p=new Streaming::AmdtpReceiveStreamProcessor( 492 m_p1394Service->getPort(),490 get1394Service().getPort(), 493 491 nb_channels); 494 492 … … 576 574 Streaming::AmdtpTransmitStreamProcessor *p; 577 575 p=new Streaming::AmdtpTransmitStreamProcessor( 578 m_p1394Service->getPort(),576 get1394Service().getPort(), 579 577 nb_channels); 580 578 … … 690 688 // get a notifier to handle device notifications 691 689 nodeaddr_t notify_address; 692 notify_address = m_p1394Service->findFreeARMBlock(690 notify_address = get1394Service().findFreeARMBlock( 693 691 DICE_NOTIFIER_BASE_ADDRESS, 694 692 DICE_NOTIFIER_BLOCK_LENGTH, … … 707 705 } 708 706 709 if (! m_p1394Service->registerARMHandler(m_notifier)) {707 if (!get1394Service().registerARMHandler(m_notifier)) { 710 708 debugError("Could not register notifier\n"); 711 709 delete m_notifier; … … 726 724 } 727 725 728 fb_nodeaddr_t swap_value = ((0xFFC0) | m_p1394Service->getLocalNodeId());726 fb_nodeaddr_t swap_value = ((0xFFC0) | get1394Service().getLocalNodeId()); 729 727 swap_value = swap_value << 48; 730 728 swap_value |= m_notifier->getStart(); 731 729 732 if (! m_p1394Service->lockCompareSwap64( getNodeId() | 0xFFC0, addr, DICE_OWNER_NO_OWNER,730 if (!get1394Service().lockCompareSwap64( getNodeId() | 0xFFC0, addr, DICE_OWNER_NO_OWNER, 733 731 swap_value, &result )) { 734 732 debugWarning("Could not register ourselves as device owner\n"); … … 765 763 } 766 764 767 fb_nodeaddr_t compare_value = ((0xFFC0) | m_p1394Service->getLocalNodeId());765 fb_nodeaddr_t compare_value = ((0xFFC0) | get1394Service().getLocalNodeId()); 768 766 compare_value <<= 48; 769 767 compare_value |= m_notifier->getStart(); 770 768 771 if (! m_p1394Service->lockCompareSwap64( getNodeId() | 0xFFC0, addr, compare_value,769 if (!get1394Service().lockCompareSwap64( getNodeId() | 0xFFC0, addr, compare_value, 772 770 DICE_OWNER_NO_OWNER, &result )) { 773 771 debugWarning("Could not unregister ourselves as device owner\n"); … … 775 773 } 776 774 777 m_p1394Service->unregisterARMHandler(m_notifier);775 get1394Service().unregisterARMHandler(m_notifier); 778 776 delete m_notifier; 779 777 m_notifier=NULL; … … 984 982 unsigned int bandwidth=8+packet_size; 985 983 986 int ch= m_p1394Service->allocateIsoChannelGeneric(bandwidth);984 int ch=get1394Service().allocateIsoChannelGeneric(bandwidth); 987 985 988 986 debugOutput(DEBUG_LEVEL_VERBOSE, "allocated channel %d, bandwidth %d\n", … … 994 992 bool DiceAvDevice::deallocateIsoChannel(int channel) { 995 993 debugOutput(DEBUG_LEVEL_VERBOSE, "freeing channel %d\n",channel); 996 return m_p1394Service->freeIsoChannel(channel);994 return get1394Service().freeIsoChannel(channel); 997 995 } 998 996 … … 1227 1225 fb_nodeid_t nodeId=getNodeId() | 0xFFC0; 1228 1226 1229 if(! m_p1394Service->read_quadlet( nodeId, addr, result ) ) {1227 if(!get1394Service().read_quadlet( nodeId, addr, result ) ) { 1230 1228 debugError("Could not read from node 0x%04X addr 0x%012X\n", nodeId, addr); 1231 1229 return false; … … 1252 1250 fb_nodeid_t nodeId=getNodeId() | 0xFFC0; 1253 1251 1254 if(! m_p1394Service->write_quadlet( nodeId, addr, htonl(data) ) ) {1252 if(!get1394Service().write_quadlet( nodeId, addr, htonl(data) ) ) { 1255 1253 debugError("Could not write to node 0x%04X addr 0x%012X\n", nodeId, addr); 1256 1254 return false; … … 1272 1270 fb_nodeid_t nodeId=getNodeId() | 0xFFC0; 1273 1271 1274 if(! m_p1394Service->read( nodeId, addr, length/4, data ) ) {1272 if(!get1394Service().read( nodeId, addr, length/4, data ) ) { 1275 1273 debugError("Could not read from node 0x%04X addr 0x%012llX\n", nodeId, addr); 1276 1274 return false; … … 1303 1301 } 1304 1302 1305 if(! m_p1394Service->write( nodeId, addr, length/4, data_out ) ) {1303 if(!get1394Service().write( nodeId, addr, length/4, data_out ) ) { 1306 1304 debugError("Could not write to node 0x%04X addr 0x%012llX\n", nodeId, addr); 1307 1305 return false; trunk/libffado/src/dice/dice_avdevice.h
r734 r739 57 57 class DiceNotifier; 58 58 public: 59 DiceAvDevice( Ieee1394Service& ieee1394Service, 60 std::auto_ptr<ConfigRom>( configRom )); 59 DiceAvDevice( std::auto_ptr<ConfigRom>( configRom )); 61 60 ~DiceAvDevice(); 62 61 63 62 static bool probe( ConfigRom& configRom ); 64 static FFADODevice * createDevice( Ieee1394Service& ieee1394Service, 65 std::auto_ptr<ConfigRom>( configRom )); 63 static FFADODevice * createDevice( std::auto_ptr<ConfigRom>( configRom )); 66 64 virtual bool discover(); 67 65