Changeset 451
- Timestamp:
- 04/08/07 08:56:32 (16 years ago)
- Files:
-
- trunk/libffado/src/bebob/bebob_avdevice.cpp (modified) (4 diffs)
- trunk/libffado/src/bebob/bebob_avdevice.h (modified) (3 diffs)
- trunk/libffado/src/bebob/bebob_avdevice_subunit.cpp (modified) (4 diffs)
- trunk/libffado/src/bebob/bebob_avdevice_subunit.h (modified) (1 diff)
- trunk/libffado/src/bebob/bebob_functionblock.cpp (modified) (1 diff)
- trunk/libffado/src/bebob/bebob_functionblock.h (modified) (2 diffs)
- trunk/libffado/src/bebob/GenericMixer.cpp (added)
- trunk/libffado/src/bebob/GenericMixer.h (added)
- trunk/libffado/src/Makefile.am (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/src/bebob/bebob_avdevice.cpp
r445 r451 24 24 #include "bebob/bebob_avdevice.h" 25 25 #include "bebob/bebob_avdevice_subunit.h" 26 #include "bebob/GenericMixer.h" 26 27 27 28 #include "libieee1394/configrom.h" … … 72 73 , m_activeSyncInfo( 0 ) 73 74 , m_model ( NULL ) 75 , m_Mixer ( NULL ) 74 76 { 75 77 debugOutput( DEBUG_LEVEL_VERBOSE, "Created BeBoB::AvDevice (NodeID %d)\n", … … 80 82 AvDevice::~AvDevice() 81 83 { 84 if(m_Mixer != NULL) { 85 if (!removeChildOscNode(m_Mixer)) { 86 debugWarning("failed to unregister mixer from OSC namespace\n"); 87 } 88 delete m_Mixer; 89 } 82 90 83 91 for ( AvDeviceSubunitVector::iterator it = m_subunits.begin(); … … 184 192 } 185 193 194 // create a GenericMixer and add it as an OSC child node 195 // remove if already there 196 if(m_Mixer != NULL) { 197 if (!removeChildOscNode(m_Mixer)) { 198 debugWarning("failed to unregister mixer from OSC namespace\n"); 199 } 200 delete m_Mixer; 201 } 202 203 // create the mixer & register it 204 if(getAudioSubunit(0) == NULL) { 205 debugWarning("Could not find audio subunit, mixer not available.\n"); 206 m_Mixer = NULL; 207 } else { 208 m_Mixer = new GenericMixer(*m_p1394Service , *this); 209 if (!addChildOscNode(m_Mixer)) { 210 debugWarning("failed to register mixer in OSC namespace\n"); 211 } 212 } 186 213 return true; 187 214 } trunk/libffado/src/bebob/bebob_avdevice.h
r445 r451 33 33 #include "bebob/bebob_avplug.h" 34 34 #include "bebob/bebob_avdevice_subunit.h" 35 #include "bebob/GenericMixer.h" 35 36 36 37 #include "libstreaming/AmdtpStreamProcessor.h" … … 120 121 Util::IODeserialize& deser, 121 122 Ieee1394Service& ieee1394Service ); 123 AvDeviceSubunitAudio* getAudioSubunit( subunit_id_t subunitId ) 124 { return dynamic_cast<AvDeviceSubunitAudio*>( 125 getSubunit( AVC1394_SUBUNIT_AUDIO , subunitId ));}; 126 122 127 protected: 123 128 … … 177 182 SyncInfo* m_activeSyncInfo; 178 183 struct VendorModelEntry* m_model; 184 GenericMixer* m_Mixer; 179 185 180 186 // streaming stuff trunk/libffado/src/bebob/bebob_avdevice_subunit.cpp
r445 r451 270 270 BeBoB::AvDeviceSubunitAudio::discover() 271 271 { 272 debugOutput(DEBUG_LEVEL_NORMAL, "Discovering Audio Subunit...\n"); 273 272 274 if ( !AvDeviceSubunit::discover() ) { 273 275 return false; … … 285 287 BeBoB::AvDeviceSubunitAudio::discoverConnections() 286 288 { 289 debugOutput(DEBUG_LEVEL_NORMAL, "Discovering connections...\n"); 287 290 if ( !AvDeviceSubunit::discoverConnections() ) { 288 291 return false; … … 313 316 BeBoB::AvDeviceSubunitAudio::discoverFunctionBlocks() 314 317 { 318 debugOutput( DEBUG_LEVEL_NORMAL, 319 "Discovering function blocks...\n"); 320 315 321 if ( !discoverFunctionBlocksDo( 316 322 ExtendedSubunitInfoCmd::eFBT_AudioSubunitSelector) ) … … 337 343 return false; 338 344 } 345 346 // print a function block list 347 #ifdef DEBUG 348 if (getDebugLevel() >= DEBUG_LEVEL_NORMAL) { 349 350 for ( FunctionBlockVector::iterator it = m_functions.begin(); 351 it != m_functions.end(); 352 ++it ) 353 { 354 debugOutput(DEBUG_LEVEL_NORMAL, "%20s FB, type 0x%X, id=%d\n", 355 (*it)->getName(), 356 (*it)->getType(), 357 (*it)->getId()); 358 } 359 } 360 #endif 339 361 340 362 return true; trunk/libffado/src/bebob/bebob_avdevice_subunit.h
r445 r451 112 112 virtual const char* getName(); 113 113 114 114 FunctionBlockVector getFunctionBlocks() { return m_functions; }; 115 115 116 protected: 116 117 bool discoverFunctionBlocks(); trunk/libffado/src/bebob/bebob_functionblock.cpp
r445 r451 80 80 BeBoB::FunctionBlock::discover() 81 81 { 82 debugOutput( DEBUG_LEVEL_ VERBOSE,82 debugOutput( DEBUG_LEVEL_NORMAL, 83 83 "discover function block %s (nr of input plugs = %d, " 84 84 "nr of output plugs = %d)\n", trunk/libffado/src/bebob/bebob_functionblock.h
r445 r451 37 37 public: 38 38 enum EFunctionBlockType { 39 eFBT_AllFuncti nBlockType= 0xff,39 eFBT_AllFunctionBlockType = 0xff, 40 40 eFBT_AudioSubunitSelector = 0x80, 41 41 eFBT_AudioSubunitFeature = 0x81, … … 66 66 67 67 virtual const char* getName() = 0; 68 69 function_block_type_t getType() {return m_type;}; 70 function_block_type_t getSubtype() {return m_subtype;}; 71 function_block_id_t getId() {return m_id;}; 68 72 69 73 bool serialize( Glib::ustring basePath, Util::IOSerialize& ser ) const; trunk/libffado/src/Makefile.am
r445 r451 52 52 bebob/bebob_avdevice_subunit.h bebob/bebob_avplug.h bebob/bebob_dl_bcd.h bebob/bebob_dl_codes.h \ 53 53 bebob/bebob_dl_mgr.h bebob/bebob_functionblock.h bounce/bounce_avdevice.h bounce/bounce_slave_avdevice.h \ 54 bebob/GenericMixer.h \ 54 55 maudio/maudio_avdevice.h motu/motu_avdevice.h rme/rme_avdevice.h \ 55 56 metrichalo/mh_avdevice.h dice/dice_avdevice.h \ … … 133 134 bebob/bebob_dl_mgr.cpp \ 134 135 bebob/bebob_functionblock.cpp \ 136 bebob/GenericMixer.cpp \ 135 137 maudio/maudio_avdevice.cpp 136 138