Changeset 405
- Timestamp:
- 02/19/07 00:02:47 (17 years ago)
- Files:
-
- branches/streaming-rework/src/bounce/bounce_avdevice.cpp (modified) (6 diffs)
- branches/streaming-rework/src/bounce/bounce_avdevice.h (modified) (2 diffs)
- branches/streaming-rework/src/configrom.cpp (modified) (3 diffs)
- branches/streaming-rework/src/devicemanager.cpp (modified) (1 diff)
- branches/streaming-rework/src/libfreebobavc/ieee1394service.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/streaming-rework/src/bounce/bounce_avdevice.cpp
r404 r405 44 44 namespace Bounce { 45 45 46 // to define the supported devices 47 static VendorModelEntry supportedDeviceList[] = 48 { 49 {0x0B0001, 0x0B0001, 0x0B0001, "FreeBoB", "Bounce"}, 50 }; 51 46 52 IMPL_DEBUG_MODULE( BounceDevice, BounceDevice, DEBUG_LEVEL_VERBOSE ); 47 53 … … 56 62 , m_verboseLevel( verboseLevel ) 57 63 , m_samplerate (44100) 64 , m_model( NULL ) 58 65 , m_id(0) 59 66 , m_receiveProcessor ( 0 ) … … 79 86 } 80 87 81 struct VendorModelEntry {82 unsigned int vendor_id;83 unsigned int model_id;84 };85 86 static VendorModelEntry supportedDeviceList[] =87 {88 // {0x0000, 0x000000},89 };90 91 88 bool 92 89 BounceDevice::probe( ConfigRom& configRom ) 93 90 { 94 unsigned int vendorId = configRom.getNodeVendorId();91 // unsigned int vendorId = configRom.getNodeVendorId(); 95 92 unsigned int modelId = configRom.getModelId(); 93 unsigned int unitSpecifierId = configRom.getUnitSpecifierId(); 96 94 97 95 for ( unsigned int i = 0; … … 99 97 ++i ) 100 98 { 101 if ( ( supportedDeviceList[i].vendor_id == vendorId ) 102 && ( supportedDeviceList[i].model_id == modelId ) 99 if ( 100 // ( supportedDeviceList[i].vendor_id == vendorId ) 101 ( supportedDeviceList[i].model_id == modelId ) 102 && ( supportedDeviceList[i].unit_specifier_id == unitSpecifierId ) 103 103 ) 104 104 { … … 117 117 // quadlet_t *resp; 118 118 119 // unsigned int vendorId = m_configRom->getNodeVendorId(); 120 unsigned int modelId = m_configRom->getModelId(); 121 unsigned int unitSpecifierId = m_configRom->getUnitSpecifierId(); 122 123 for ( unsigned int i = 0; 124 i < ( sizeof( supportedDeviceList )/sizeof( VendorModelEntry ) ); 125 ++i ) 126 { 127 if ( //( supportedDeviceList[i].vendor_id == vendorId ) 128 ( supportedDeviceList[i].model_id == modelId ) 129 && ( supportedDeviceList[i].unit_specifier_id == unitSpecifierId ) 130 ) 131 { 132 m_model = &(supportedDeviceList[i]); 133 } 134 } 135 136 if (m_model != NULL) { 137 debugOutput( DEBUG_LEVEL_VERBOSE, "found %s %s\n", 138 m_model->vendor_name, m_model->model_name); 139 return true; 140 } 141 119 142 debugOutput( DEBUG_LEVEL_VERBOSE, "Discovering...\n" ); 120 143 … … 171 194 debugOutput(DEBUG_LEVEL_NORMAL, "Vendor : %s\n", m_configRom->getVendorName().c_str()); 172 195 debugOutput(DEBUG_LEVEL_NORMAL, "Model : %s\n", m_configRom->getModelName().c_str()); 196 debugOutput(DEBUG_LEVEL_NORMAL, "Vendor Name : %s\n", m_model->vendor_name); 197 debugOutput(DEBUG_LEVEL_NORMAL, "Model Name : %s\n", m_model->model_name); 173 198 debugOutput(DEBUG_LEVEL_NORMAL, "Node : %d\n", m_nodeId); 174 199 debugOutput(DEBUG_LEVEL_NORMAL, "GUID : 0x%016llX\n", m_configRom->getGuid()); branches/streaming-rework/src/bounce/bounce_avdevice.h
r404 r405 42 42 namespace Bounce { 43 43 44 // struct to define the supported devices 45 struct VendorModelEntry { 46 unsigned int vendor_id; 47 unsigned int model_id; 48 unsigned int unit_specifier_id; 49 char *vendor_name; 50 char *model_name; 51 }; 52 44 53 class BounceDevice : public IAvDevice { 45 54 public: … … 82 91 83 92 unsigned int m_samplerate; 93 struct VendorModelEntry* m_model; 84 94 unsigned int m_id; 85 95 branches/streaming-rework/src/configrom.cpp
r368 r405 128 128 &csr_info ); 129 129 if (!m_csr || csr1212_parse_csr( m_csr ) != CSR1212_SUCCESS) { 130 debugError( "Could not parse config rom of node %d on port %d ", m_nodeId, m_1394Service->getPort() );130 debugError( "Could not parse config rom of node %d on port %d\n", m_nodeId, m_1394Service->getPort() ); 131 131 if (m_csr) { 132 132 csr1212_destroy_csr(m_csr); … … 215 215 { 216 216 struct config_csr_info* csr_info = (struct config_csr_info*) private_data; 217 217 218 218 if ( !csr_info->service->read( csr_info->nodeId, 219 219 addr, 220 length/4,220 (size_t)length/4, 221 221 ( quadlet_t* )buffer) ) 222 222 { … … 486 486 printf( "\tNode Vendor ID:\t\t0x%06x\n", getNodeVendorId() ); 487 487 printf( "\tModel Id:\t\t0x%08x\n", getModelId() ); 488 printf( "\tUnit Specifier ID:\t0x%06x\n", getUnitSpecifierId() ); 489 printf( "\tUnit version:\t\t0x%08x\n", getUnitVersion() ); 488 490 printf( "\tISO resource manager:\t%d\n", isIsoResourseManager() ); 489 491 printf( "\tCycle master capable:\t%d\n", isSupportsIsoOperations() ); 490 492 printf( "\tBus manager capable:\t%d\n", isBusManagerCapable() ); 491 printf( "\tCycle clock accura ncy:\t%d\n", getCycleClockAccurancy() );493 printf( "\tCycle clock accuracy:\t%d\n", getCycleClockAccurancy() ); 492 494 printf( "\tMax rec:\t\t%d (max asy payload: %d bytes)\n", 493 495 getMaxRec(), getAsyMaxPayload() ); branches/streaming-rework/src/devicemanager.cpp
r404 r405 372 372 } 373 373 374 free(result);375 374 } 376 375 branches/streaming-rework/src/libfreebobavc/ieee1394service.cpp
r377 r405 33 33 34 34 Ieee1394Service::Ieee1394Service() 35 : m_handle( 0 ) 35 : m_handle( 0 ), m_resetHandle( 0 ) 36 36 , m_port( -1 ) 37 37 , m_threadRunning( false ) … … 109 109 #ifdef DEBUG 110 110 debugOutput(DEBUG_LEVEL_VERY_VERBOSE, 111 "read: node 0x%X, addr = 0x%016 X, length = %d\n",111 "read: node 0x%X, addr = 0x%016llX, length = %u\n", 112 112 nodeId, addr, length); 113 113 printBuffer( length, buffer ); … … 117 117 } else { 118 118 #ifdef DEBUG 119 debugError("raw1394_read failed: node 0x%X, addr = 0x%016 X, length = %d\n",119 debugError("raw1394_read failed: node 0x%X, addr = 0x%016llX, length = %u\n", 120 120 nodeId, addr, length); 121 121 #endif