Changeset 503
- Timestamp:
- 07/28/07 03:45:29 (16 years ago)
- Files:
-
- branches/echoaudio/src/bebob/bebob_avdevice.cpp (modified) (1 diff)
- branches/echoaudio/src/bebob/bebob_avdevice.h (modified) (3 diffs)
- branches/echoaudio/src/bebob/bebob_avdevice_subunit.cpp (modified) (1 diff)
- branches/echoaudio/src/bebob/bebob_avdevice_subunit.h (modified) (7 diffs)
- branches/echoaudio/src/bebob/bebob_avplug.cpp (modified) (1 diff)
- branches/echoaudio/src/bebob/bebob_avplug.h (modified) (12 diffs)
- branches/echoaudio/src/bebob/bebob_dl_codes.cpp (modified) (1 diff)
- branches/echoaudio/src/bebob/bebob_dl_codes.h (modified) (9 diffs)
- branches/echoaudio/src/bebob/bebob_dl_mgr.cpp (modified) (1 diff)
- branches/echoaudio/src/bebob/bebob_functionblock.cpp (modified) (1 diff)
- branches/echoaudio/src/bebob/bebob_functionblock.h (modified) (8 diffs)
- branches/echoaudio/src/bebob/GenericMixer.cpp (modified) (1 diff)
- branches/echoaudio/src/ffado.cpp (modified) (1 diff)
- branches/echoaudio/src/ffadodevice.cpp (modified) (1 diff)
- branches/echoaudio/src/ffadodevice.h (modified) (2 diffs)
- branches/echoaudio/src/libavc/audiosubunit/avc_function_block.cpp (modified) (2 diffs)
- branches/echoaudio/src/libavc/audiosubunit/avc_function_block.h (modified) (2 diffs)
- branches/echoaudio/src/libavc/avc_definitions.cpp (modified) (1 diff)
- branches/echoaudio/src/libavc/avc_definitions.h (modified) (3 diffs)
- branches/echoaudio/src/libavc/ccm/avc_signal_source.cpp (modified) (2 diffs)
- branches/echoaudio/src/libavc/ccm/avc_signal_source.h (modified) (2 diffs)
- branches/echoaudio/src/libavc/descriptors/avc_descriptor.cpp (modified) (2 diffs)
- branches/echoaudio/src/libavc/descriptors/avc_descriptor.h (modified) (2 diffs)
- branches/echoaudio/src/libavc/descriptors/avc_descriptor_cmd.cpp (modified) (2 diffs)
- branches/echoaudio/src/libavc/descriptors/avc_descriptor_cmd.h (modified) (2 diffs)
- branches/echoaudio/src/libavc/general/avc_connect.cpp (modified) (2 diffs)
- branches/echoaudio/src/libavc/general/avc_connect.h (modified) (2 diffs)
- branches/echoaudio/src/libavc/general/avc_extended_cmd_generic.cpp (modified) (2 diffs)
- branches/echoaudio/src/libavc/general/avc_extended_cmd_generic.h (modified) (2 diffs)
- branches/echoaudio/src/libavc/general/avc_extended_plug_info.cpp (modified) (2 diffs)
- branches/echoaudio/src/libavc/general/avc_extended_plug_info.h (modified) (2 diffs)
- branches/echoaudio/src/libavc/general/avc_extended_subunit_info.cpp (modified) (2 diffs)
- branches/echoaudio/src/libavc/general/avc_extended_subunit_info.h (modified) (2 diffs)
- branches/echoaudio/src/libavc/general/avc_generic.cpp (modified) (2 diffs)
- branches/echoaudio/src/libavc/general/avc_generic.h (modified) (2 diffs)
- branches/echoaudio/src/libavc/general/avc_plug_info.cpp (modified) (2 diffs)
- branches/echoaudio/src/libavc/general/avc_plug_info.h (modified) (2 diffs)
- branches/echoaudio/src/libavc/general/avc_subunit_info.cpp (modified) (2 diffs)
- branches/echoaudio/src/libavc/general/avc_subunit_info.h (modified) (2 diffs)
- branches/echoaudio/src/libavc/general/avc_unit_info.cpp (modified) (2 diffs)
- branches/echoaudio/src/libavc/general/avc_unit_info.h (modified) (2 diffs)
- branches/echoaudio/src/libavc/musicsubunit/avc_descriptor_music.cpp (modified) (2 diffs)
- branches/echoaudio/src/libavc/musicsubunit/avc_descriptor_music.h (modified) (2 diffs)
- branches/echoaudio/src/libavc/streamformat/avc_extended_stream_format.cpp (modified) (2 diffs)
- branches/echoaudio/src/libavc/streamformat/avc_extended_stream_format.h (modified) (2 diffs)
- branches/echoaudio/src/libavc/util/avc_serialize.cpp (modified) (2 diffs)
- branches/echoaudio/src/libavc/util/avc_serialize.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/echoaudio/src/bebob/bebob_avdevice.cpp
r502 r503 41 41 #include <sstream> 42 42 43 using namespace AVC; 44 43 45 namespace BeBoB { 44 46 branches/echoaudio/src/bebob/bebob_avdevice.h
r502 r503 48 48 class ConfigRom; 49 49 class Ieee1394Service; 50 class SubunitPlugSpecificDataPlugAddress;51 50 52 51 namespace BeBoB { … … 121 120 Util::IODeserialize& deser, 122 121 Ieee1394Service& ieee1394Service ); 123 AvDeviceSubunitAudio* getAudioSubunit( subunit_id_t subunitId )122 AvDeviceSubunitAudio* getAudioSubunit( AVC::subunit_id_t subunitId ) 124 123 { return dynamic_cast<AvDeviceSubunitAudio*>( 125 124 getSubunit( AVC1394_SUBUNIT_AUDIO , subunitId ));}; … … 131 130 bool discoverPlugs(); 132 131 bool discoverPlugsPCR( AvPlug::EAvPlugDirection plugDirection, 133 plug_id_t plugMaxId );132 AVC::plug_id_t plugMaxId ); 134 133 bool discoverPlugsExternal( AvPlug::EAvPlugDirection plugDirection, 135 plug_id_t plugMaxId );134 AVC::plug_id_t plugMaxId ); 136 135 bool discoverPlugConnections(); 137 136 bool discoverSyncModes(); 138 137 bool discoverSubUnitsPlugConnections(); 139 138 140 AvDeviceSubunit* getSubunit( subunit_type_t subunitType,141 subunit_id_t subunitId ) const;139 AvDeviceSubunit* getSubunit( AVC::subunit_type_t subunitType, 140 AVC::subunit_id_t subunitId ) const; 142 141 143 unsigned int getNrOfSubunits( subunit_type_t subunitType ) const;142 unsigned int getNrOfSubunits( AVC::subunit_type_t subunitType ) const; 144 143 AvPlugConnection* getPlugConnection( AvPlug& srcPlug ) const; 145 144 branches/echoaudio/src/bebob/bebob_avdevice_subunit.cpp
r502 r503 34 34 #include <sstream> 35 35 36 using namespace AVC; 37 36 38 IMPL_DEBUG_MODULE( BeBoB::AvDeviceSubunit, BeBoB::AvDeviceSubunit, DEBUG_LEVEL_VERBOSE ); 37 39 branches/echoaudio/src/bebob/bebob_avdevice_subunit.h
r502 r503 42 42 public: 43 43 AvDeviceSubunit( AvDevice& avDevice, 44 ESubunitType type,45 subunit_t id,44 AVC::ESubunitType type, 45 AVC::subunit_t id, 46 46 int verboseLevel ); 47 47 virtual ~AvDeviceSubunit(); … … 53 53 bool addPlug( AvPlug& plug ); 54 54 55 subunit_t getSubunitId()55 AVC::subunit_t getSubunitId() 56 56 { return m_sbId; } 57 ESubunitType getSubunitType()57 AVC::ESubunitType getSubunitType() 58 58 { return m_sbType; } 59 59 60 60 AvPlugVector& getPlugs() 61 61 { return m_plugs; } 62 AvPlug* getPlug(AvPlug::EAvPlugDirection direction, plug_id_t plugId);62 AvPlug* getPlug(AvPlug::EAvPlugDirection direction, AVC::plug_id_t plugId); 63 63 64 64 … … 76 76 bool discoverPlugs(); 77 77 bool discoverPlugs(AvPlug::EAvPlugDirection plugDirection, 78 plug_id_t plugMaxId );78 AVC::plug_id_t plugMaxId ); 79 79 80 80 virtual bool serializeChild( Glib::ustring basePath, … … 86 86 protected: 87 87 AvDevice* m_avDevice; 88 ESubunitType m_sbType;89 subunit_t m_sbId;88 AVC::ESubunitType m_sbType; 89 AVC::subunit_t m_sbId; 90 90 int m_verboseLevel; 91 91 … … 102 102 public: 103 103 AvDeviceSubunitAudio( AvDevice& avDevice, 104 subunit_t id,104 AVC::subunit_t id, 105 105 int verboseLevel ); 106 106 AvDeviceSubunitAudio(); … … 117 117 bool discoverFunctionBlocks(); 118 118 bool discoverFunctionBlocksDo( 119 ExtendedSubunitInfoCmd::EFunctionBlockType fbType );119 AVC::ExtendedSubunitInfoCmd::EFunctionBlockType fbType ); 120 120 bool createFunctionBlock( 121 ExtendedSubunitInfoCmd::EFunctionBlockType fbType,122 ExtendedSubunitInfoPageData& data );121 AVC::ExtendedSubunitInfoCmd::EFunctionBlockType fbType, 122 AVC::ExtendedSubunitInfoPageData& data ); 123 123 124 124 FunctionBlock::ESpecialPurpose convertSpecialPurpose( 125 function_block_special_purpose_t specialPurpose );125 AVC::function_block_special_purpose_t specialPurpose ); 126 126 127 127 virtual bool serializeChild( Glib::ustring basePath, … … 140 140 public: 141 141 AvDeviceSubunitMusic( AvDevice& avDevice, 142 subunit_t id,142 AVC::subunit_t id, 143 143 int verboseLevel ); 144 144 AvDeviceSubunitMusic(); branches/echoaudio/src/bebob/bebob_avplug.cpp
r502 r503 30 30 31 31 #include <sstream> 32 33 using namespace AVC; 32 34 33 35 namespace BeBoB { branches/echoaudio/src/bebob/bebob_avplug.h
r502 r503 37 37 38 38 #include <glibmm/ustring.h> 39 40 #warning clean up the samplerate mess 41 #include "ffadodevice.h" 39 42 40 43 class Ieee1394Service; … … 81 84 ConfigRom& configRom, 82 85 AvPlugManager& plugManager, 83 ESubunitType subunitType,84 subunit_id_t subunitId,85 function_block_type_t functionBlockType,86 function_block_type_t functionBlockId,86 AVC::ESubunitType subunitType, 87 AVC::subunit_id_t subunitId, 88 AVC::function_block_type_t functionBlockType, 89 AVC::function_block_type_t functionBlockId, 87 90 EAvPlugAddressType plugAddressType, 88 91 EAvPlugDirection plugDirection, 89 plug_id_t plugId,92 AVC::plug_id_t plugId, 90 93 int verboseLevel ); 91 94 AvPlug( const AvPlug& rhs ); … … 100 103 int getGlobalId() const 101 104 { return m_globalId; } 102 plug_id_t getPlugId() const105 AVC::plug_id_t getPlugId() const 103 106 { return m_id; } 104 ESubunitType getSubunitType() const107 AVC::ESubunitType getSubunitType() const 105 108 { return m_subunitType; } 106 subunit_id_t getSubunitId() const109 AVC::subunit_id_t getSubunitId() const 107 110 { return m_subunitId; } 108 111 const char* getName() const … … 110 113 EAvPlugDirection getPlugDirection() const 111 114 { return m_direction; } 112 sampling_frequency_t getSamplingFrequency() const115 AVC::sampling_frequency_t getSamplingFrequency() const 113 116 { return m_samplingFrequency; } 114 117 int getSampleRate() const; // 22050, 24000, 32000, ... … … 123 126 { return m_infoPlugType; } 124 127 125 function_block_type_t getFunctionBlockType() const128 AVC::function_block_type_t getFunctionBlockType() const 126 129 { return m_functionBlockType; } 127 function_block_id_t getFunctionBlockId() const130 AVC::function_block_id_t getFunctionBlockId() const 128 131 { return m_functionBlockId; } 129 132 … … 133 136 { return m_outputConnections; } 134 137 135 static PlugAddress::EPlugDirection convertPlugDirection(138 static AVC::PlugAddress::EPlugDirection convertPlugDirection( 136 139 EAvPlugDirection direction); 137 140 … … 149 152 public: 150 153 struct ChannelInfo { 151 stream_position_t m_streamPosition;152 stream_position_location_t m_location;153 Glib::ustringm_name;154 AVC::stream_position_t m_streamPosition; 155 AVC::stream_position_location_t m_location; 156 Glib::ustring m_name; 154 157 }; 155 158 typedef std::vector<ChannelInfo> ChannelInfoVector; 156 159 157 160 struct ClusterInfo { 158 int m_index;159 port_type_tm_portType;160 Glib::ustring m_name;161 162 nr_of_channels_tm_nrOfChannels;161 int m_index; 162 AVC::port_type_t m_portType; 163 Glib::ustring m_name; 164 165 AVC::nr_of_channels_t m_nrOfChannels; 163 166 ChannelInfoVector m_channelInfos; 164 stream_format_tm_streamFormat;167 AVC::stream_format_t m_streamFormat; 165 168 }; 166 169 typedef std::vector<ClusterInfo> ClusterInfoVector; … … 183 186 bool discoverConnectionsOutput(); 184 187 185 ExtendedPlugInfoCmd setPlugAddrToPlugInfoCmd();186 187 ExtendedStreamFormatCmd setPlugAddrToStreamFormatCmd(188 ExtendedStreamFormatCmd::ESubFunction subFunction);189 190 SignalSourceCmd setSrcPlugAddrToSignalCmd();188 AVC::ExtendedPlugInfoCmd setPlugAddrToPlugInfoCmd(); 189 190 AVC::ExtendedStreamFormatCmd setPlugAddrToStreamFormatCmd( 191 AVC::ExtendedStreamFormatCmd::ESubFunction subFunction); 192 193 AVC::SignalSourceCmd setSrcPlugAddrToSignalCmd(); 191 194 192 195 void setDestPlugAddrToSignalCmd( 193 SignalSourceCmd& signalSourceCmd, AvPlug& plug );196 AVC::SignalSourceCmd& signalSourceCmd, AvPlug& plug ); 194 197 195 198 void debugOutputClusterInfos( int debugLevel ); 196 199 197 bool copyClusterInfo( ExtendedPlugInfoPlugChannelPositionSpecificData&200 bool copyClusterInfo(AVC::ExtendedPlugInfoPlugChannelPositionSpecificData& 198 201 channelPositionData ); 199 202 … … 202 205 bool discoverConnectionsFromSpecificData( 203 206 EAvPlugDirection discoverDirection, 204 PlugAddressSpecificData* plugAddress,207 AVC::PlugAddressSpecificData* plugAddress, 205 208 AvPlugVector& connections ); 206 209 207 210 AvPlug* getPlugDefinedBySpecificData( 208 UnitPlugSpecificDataPlugAddress* pUnitPlugAddress,209 SubunitPlugSpecificDataPlugAddress* pSubunitPlugAddress,210 FunctionBlockPlugSpecificDataPlugAddress* pFunctionBlockPlugAddress );211 AVC::UnitPlugSpecificDataPlugAddress* pUnitPlugAddress, 212 AVC::SubunitPlugSpecificDataPlugAddress* pSubunitPlugAddress, 213 AVC::FunctionBlockPlugSpecificDataPlugAddress* pFunctionBlockPlugAddress ); 211 214 212 215 EAvPlugDirection toggleDirection( EAvPlugDirection direction ) const; … … 248 251 , m_index( 0xff ) 249 252 {} 250 sampling_frequency_t m_samplingFrequency;251 bool m_isSyncStream;252 number_of_channels_t m_audioChannels;253 number_of_channels_t m_midiChannels;254 byte_t m_index;253 AVC::sampling_frequency_t m_samplingFrequency; 254 bool m_isSyncStream; 255 AVC::number_of_channels_t m_audioChannels; 256 AVC::number_of_channels_t m_midiChannels; 257 byte_t m_index; 255 258 }; 256 259 typedef std::vector<FormatInfo> FormatInfoVector; … … 259 262 Ieee1394Service* m_p1394Service; 260 263 ConfigRom* m_pConfigRom; 261 ESubunitType m_subunitType;262 subunit_id_t m_subunitId;263 function_block_type_t m_functionBlockType;264 function_block_id_t m_functionBlockId;264 AVC::ESubunitType m_subunitType; 265 AVC::subunit_id_t m_subunitId; 266 AVC::function_block_type_t m_functionBlockType; 267 AVC::function_block_id_t m_functionBlockId; 265 268 EAvPlugAddressType m_addressType; 266 269 EAvPlugDirection m_direction; 267 plug_id_t m_id;270 AVC::plug_id_t m_id; 268 271 EAvPlugType m_infoPlugType; 269 nr_of_channels_t m_nrOfChannels;272 AVC::nr_of_channels_t m_nrOfChannels; 270 273 Glib::ustring m_name; 271 274 ClusterInfoVector m_clusterInfos; 272 sampling_frequency_t m_samplingFrequency;275 AVC::sampling_frequency_t m_samplingFrequency; 273 276 FormatInfoVector m_formatInfos; 274 277 AvPlugVector m_inputConnections; … … 298 301 void showPlugs() const; 299 302 300 AvPlug* getPlug( ESubunitType subunitType,301 subunit_id_t subunitId,302 function_block_type_t functionBlockType,303 function_block_id_t functionBlockId,303 AvPlug* getPlug( AVC::ESubunitType subunitType, 304 AVC::subunit_id_t subunitId, 305 AVC::function_block_type_t functionBlockType, 306 AVC::function_block_id_t functionBlockId, 304 307 AvPlug::EAvPlugAddressType plugAddressType, 305 308 AvPlug::EAvPlugDirection plugDirection, 306 plug_id_t plugId ) const;309 AVC::plug_id_t plugId ) const; 307 310 AvPlug* getPlug( int iGlobalId ) const; 308 AvPlugVector getPlugsByType( ESubunitType subunitType,309 subunit_id_t subunitId,310 function_block_type_t functionBlockType,311 function_block_id_t functionBlockId,311 AvPlugVector getPlugsByType( AVC::ESubunitType subunitType, 312 AVC::subunit_id_t subunitId, 313 AVC::function_block_type_t functionBlockType, 314 AVC::function_block_id_t functionBlockId, 312 315 AvPlug::EAvPlugAddressType plugAddressType, 313 316 AvPlug::EAvPlugDirection plugDirection, branches/echoaudio/src/bebob/bebob_dl_codes.cpp
r445 r503 24 24 #include "bebob/bebob_dl_codes.h" 25 25 #include "bebob/bebob_dl_bcd.h" 26 27 using namespace AVC; 26 28 27 29 unsigned short BeBoB::CommandCodes::m_gCommandId = 0; branches/echoaudio/src/bebob/bebob_dl_codes.h
r502 r503 69 69 virtual ~CommandCodes(); 70 70 71 virtual bool serialize( IOSSerialize& se );72 virtual bool deserialize( IISDeserialize& de );71 virtual bool serialize( AVC::IOSSerialize& se ); 72 virtual bool deserialize( AVC::IISDeserialize& de ); 73 73 74 74 virtual size_t getMaxSize(); … … 127 127 virtual ~CommandCodesReset(); 128 128 129 virtual bool serialize( IOSSerialize& se );130 virtual bool deserialize( IISDeserialize& de );129 virtual bool serialize( AVC::IOSSerialize& se ); 130 virtual bool deserialize( AVC::IISDeserialize& de ); 131 131 132 132 EStartMode getStartMode() const … … 147 147 virtual ~CommandCodesProgramGUID(); 148 148 149 virtual bool serialize( IOSSerialize& se );150 virtual bool deserialize( IISDeserialize& de );149 virtual bool serialize( AVC::IOSSerialize& se ); 150 virtual bool deserialize( AVC::IISDeserialize& de ); 151 151 152 152 fb_octlet_t getGUID() const … … 177 177 virtual ~CommandCodesDownloadStart(); 178 178 179 virtual bool serialize( IOSSerialize& se );180 virtual bool deserialize( IISDeserialize& de );179 virtual bool serialize( AVC::IOSSerialize& se ); 180 virtual bool deserialize( AVC::IISDeserialize& de ); 181 181 182 182 bool setDate( fb_octlet_t date ) … … 218 218 virtual ~CommandCodesDownloadBlock(); 219 219 220 virtual bool serialize( IOSSerialize& se );221 virtual bool deserialize( IISDeserialize& de );220 virtual bool serialize( AVC::IOSSerialize& se ); 221 virtual bool deserialize( AVC::IISDeserialize& de ); 222 222 223 223 bool setSeqNumber( fb_quadlet_t seqNumber ) … … 247 247 virtual ~CommandCodesDownloadEnd(); 248 248 249 virtual bool serialize( IOSSerialize& se );250 virtual bool deserialize( IISDeserialize& de );249 virtual bool serialize( AVC::IOSSerialize& se ); 250 virtual bool deserialize( AVC::IISDeserialize& de ); 251 251 252 252 fb_quadlet_t getRespCrc32() const … … 268 268 virtual ~CommandCodesInitializePersParam(); 269 269 270 virtual bool serialize( IOSSerialize& se );271 virtual bool deserialize( IISDeserialize& de );270 virtual bool serialize( AVC::IOSSerialize& se ); 271 virtual bool deserialize( AVC::IISDeserialize& de ); 272 272 }; 273 273 … … 280 280 virtual ~CommandCodesInitializeConfigToFactorySetting(); 281 281 282 virtual bool serialize( IOSSerialize& se );283 virtual bool deserialize( IISDeserialize& de );282 virtual bool serialize( AVC::IOSSerialize& se ); 283 virtual bool deserialize( AVC::IISDeserialize& de ); 284 284 }; 285 285 … … 296 296 virtual ~CommandCodesGo(); 297 297 298 virtual bool serialize( IOSSerialize& se );299 virtual bool deserialize( IISDeserialize& de );298 virtual bool serialize( AVC::IOSSerialize& se ); 299 virtual bool deserialize( AVC::IISDeserialize& de ); 300 300 301 301 EStartMode getStartMode() const branches/echoaudio/src/bebob/bebob_dl_mgr.cpp
r502 r503 34 34 35 35 #include <cstdio> 36 37 using namespace AVC; 36 38 37 39 namespace BeBoB { branches/echoaudio/src/bebob/bebob_functionblock.cpp
r451 r503 27 27 #include "libieee1394/configrom.h" 28 28 29 using namespace AVC; 30 29 31 IMPL_DEBUG_MODULE( BeBoB::FunctionBlock, BeBoB::FunctionBlock, DEBUG_LEVEL_NORMAL ); 30 32 branches/echoaudio/src/bebob/bebob_functionblock.h
r455 r503 51 51 52 52 FunctionBlock( AvDeviceSubunit& subunit, 53 function_block_type_t type,54 function_block_type_t subtype,55 function_block_id_t id,53 AVC::function_block_type_t type, 54 AVC::function_block_type_t subtype, 55 AVC::function_block_id_t id, 56 56 ESpecialPurpose purpose, 57 no_of_input_plugs_t nrOfInputPlugs,58 no_of_output_plugs_t nrOfOutputPlugs,57 AVC::no_of_input_plugs_t nrOfInputPlugs, 58 AVC::no_of_output_plugs_t nrOfOutputPlugs, 59 59 int verbose ); 60 60 FunctionBlock( const FunctionBlock& rhs ); … … 67 67 virtual const char* getName() = 0; 68 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;};69 AVC::function_block_type_t getType() {return m_type;}; 70 AVC::function_block_type_t getSubtype() {return m_subtype;}; 71 AVC::function_block_id_t getId() {return m_id;}; 72 72 73 73 bool serialize( Glib::ustring basePath, Util::IOSerialize& ser ) const; … … 78 78 protected: 79 79 bool discoverPlugs( AvPlug::EAvPlugDirection plugDirection, 80 plug_id_t plugMaxId );80 AVC::plug_id_t plugMaxId ); 81 81 82 82 protected: 83 83 AvDeviceSubunit* m_subunit; 84 function_block_type_t m_type;85 function_block_type_t m_subtype;86 function_block_id_t m_id;84 AVC::function_block_type_t m_type; 85 AVC::function_block_type_t m_subtype; 86 AVC::function_block_id_t m_id; 87 87 ESpecialPurpose m_purpose; 88 no_of_input_plugs_t m_nrOfInputPlugs;89 no_of_output_plugs_t m_nrOfOutputPlugs;88 AVC::no_of_input_plugs_t m_nrOfInputPlugs; 89 AVC::no_of_output_plugs_t m_nrOfOutputPlugs; 90 90 int m_verbose; 91 91 AvPlugVector m_plugs; … … 103 103 public: 104 104 FunctionBlockSelector(AvDeviceSubunit& subunit, 105 function_block_id_t id,105 AVC::function_block_id_t id, 106 106 ESpecialPurpose purpose, 107 no_of_input_plugs_t nrOfInputPlugs,108 no_of_output_plugs_t nrOfOutputPlugs,107 AVC::no_of_input_plugs_t nrOfInputPlugs, 108 AVC::no_of_output_plugs_t nrOfOutputPlugs, 109 109 int verbose); 110 110 FunctionBlockSelector( const FunctionBlockSelector& rhs ); … … 128 128 public: 129 129 FunctionBlockFeature(AvDeviceSubunit& subunit, 130 function_block_id_t id,130 AVC::function_block_id_t id, 131 131 ESpecialPurpose purpose, 132 no_of_input_plugs_t nrOfInputPlugs,133 no_of_output_plugs_t nrOfOutputPlugs,132 AVC::no_of_input_plugs_t nrOfInputPlugs, 133 AVC::no_of_output_plugs_t nrOfOutputPlugs, 134 134 int verbose); 135 135 FunctionBlockFeature( const FunctionBlockFeature& rhs ); … … 170 170 public: 171 171 FunctionBlockEnhancedMixer( AvDeviceSubunit& subunit, 172 function_block_id_t id,172 AVC::function_block_id_t id, 173 173 ESpecialPurpose purpose, 174 no_of_input_plugs_t nrOfInputPlugs,175 no_of_output_plugs_t nrOfOutputPlugs,174 AVC::no_of_input_plugs_t nrOfInputPlugs, 175 AVC::no_of_output_plugs_t nrOfOutputPlugs, 176 176 int verbose ); 177 177 FunctionBlockEnhancedMixer(); … … 195 195 public: 196 196 FunctionBlockProcessing( AvDeviceSubunit& subunit, 197 function_block_id_t id,197 AVC::function_block_id_t id, 198 198 ESpecialPurpose purpose, 199 no_of_input_plugs_t nrOfInputPlugs,200 no_of_output_plugs_t nrOfOutputPlugs,199 AVC::no_of_input_plugs_t nrOfInputPlugs, 200 AVC::no_of_output_plugs_t nrOfOutputPlugs, 201 201 int verbose ); 202 202 FunctionBlockProcessing( const FunctionBlockProcessing& rhs ); … … 220 220 public: 221 221 FunctionBlockCodec(AvDeviceSubunit& subunit, 222 function_block_id_t id,222 AVC::function_block_id_t id, 223 223 ESpecialPurpose purpose, 224 no_of_input_plugs_t nrOfInputPlugs,225 no_of_output_plugs_t nrOfOutputPlugs,224 AVC::no_of_input_plugs_t nrOfInputPlugs, 225 AVC::no_of_output_plugs_t nrOfOutputPlugs, 226 226 int verbose); 227 227 FunctionBlockCodec( const FunctionBlockCodec& rhs ); branches/echoaudio/src/bebob/GenericMixer.cpp
r502 r503 43 43 44 44 using namespace OSC; 45 using namespace AVC; 45 46 46 47 namespace BeBoB { branches/echoaudio/src/ffado.cpp
r502 r503 144 144 void ffado_sleep_after_avc_command( int time ) 145 145 { 146 AVC Command::setSleepAfterAVCCommand( time );146 AVC::AVCCommand::setSleepAfterAVCCommand( time ); 147 147 } branches/echoaudio/src/ffadodevice.cpp
r500 r503 94 94 return true; 95 95 } 96 97 98 int 99 convertESamplingFrequency(ESamplingFrequency freq) 100 { 101 int value = 0; 102 103 switch ( freq ) { 104 case eSF_22050Hz: 105 value = 22050; 106 break; 107 case eSF_24000Hz: 108 value = 24000; 109 break; 110 case eSF_32000Hz: 111 value = 32000; 112 break; 113 case eSF_44100Hz: 114 value = 44100; 115 break; 116 case eSF_48000Hz: 117 value = 48000; 118 break; 119 case eSF_88200Hz: 120 value = 88200; 121 break; 122 case eSF_96000Hz: 123 value = 96000; 124 break; 125 case eSF_176400Hz: 126 value = 176400; 127 break; 128 case eSF_192000Hz: 129 value = 192000; 130 break; 131 case eSF_AnyLow: 132 value = 48000; 133 break; 134 case eSF_AnyMid: 135 value = 96000; 136 break; 137 case eSF_AnyHigh: 138 value = 192000; 139 break; 140 default: 141 value = 0; 142 } 143 144 145 return value; 146 } 147 148 ESamplingFrequency 149 parseSampleRate( int sampleRate ) 150 { 151 ESamplingFrequency efreq; 152 switch ( sampleRate ) { 153 case 22050: 154 efreq = eSF_22050Hz; 155 break; 156 case 24000: 157 efreq = eSF_24000Hz; 158 break; 159 case 32000: 160 efreq = eSF_32000Hz; 161 break; 162 case 44100: 163 efreq = eSF_44100Hz; 164 break; 165 case 48000: 166 efreq = eSF_48000Hz; 167 break; 168 case 88200: 169 efreq = eSF_88200Hz; 170 break; 171 case 96000: 172 efreq = eSF_96000Hz; 173 break; 174 case 176400: 175 efreq = eSF_176400Hz; 176 break; 177 case 192000: 178 efreq = eSF_192000Hz; 179 break; 180 default: 181 efreq = eSF_DontCare; 182 } 183 184 return efreq; 185 } 186 187 std::ostream& operator<<( std::ostream& stream, ESamplingFrequency samplingFrequency ) 188 { 189 char* str; 190 switch ( samplingFrequency ) { 191 case eSF_22050Hz: 192 str = "22050"; 193 break; 194 case eSF_24000Hz: 195 str = "24000"; 196 break; 197 case eSF_32000Hz: 198 str = "32000"; 199 break; 200 case eSF_44100Hz: 201 str = "44100"; 202 break; 203 case eSF_48000Hz: 204 str = "48000"; 205 break; 206 case eSF_88200Hz: 207 str = "88200"; 208 break; 209 case eSF_96000Hz: 210 str = "96000"; 211 break; 212 case eSF_176400Hz: 213 str = "176400"; 214 break; 215 case eSF_192000Hz: 216 str = "192000"; 217 break; 218 case eSF_DontCare: 219 default: 220 str = "unknown"; 221 } 222 return stream << str; 223 }; branches/echoaudio/src/ffadodevice.h
r500 r503 26 26 #define FFADODEVICE_H 27 27 28 #include "libavc/avc_definitions.h"29 28 #include "libutil/OptionContainer.h" 30 29 #include "libosc/OscNode.h" 31 30 32 class ConfigRom; 31 // class ConfigRom; 32 #include "libieee1394/configrom.h" 33 33 class Ieee1394Service; 34 34 … … 36 36 class StreamProcessor; 37 37 } 38 39 /** 40 * \brief the possible sampling frequencies 41 */ 42 enum ESamplingFrequency { 43 eSF_22050Hz = 0x00, 44 eSF_24000Hz = 0x01, 45 eSF_32000Hz = 0x02, 46 eSF_44100Hz = 0x03, 47 eSF_48000Hz = 0x04, 48 eSF_88200Hz = 0x0A, 49 eSF_96000Hz = 0x05, 50 eSF_176400Hz = 0x06, 51 eSF_192000Hz = 0x07, 52 eSF_AnyLow = 0x0B, 53 eSF_AnyMid = 0x0C, 54 eSF_AnyHigh = 0x0D, 55 eSF_None = 0x0E, 56 eSF_DontCare = 0x0F, 57 }; 58 59 /** 60 * \brief Convert from ESamplingFrequency to an integer 61 * @param freq 62 * @return 63 */ 64 int convertESamplingFrequency(ESamplingFrequency freq); 65 /** 66 * \brief Convert from integer to ESamplingFrequency 67 * @param sampleRate 68 * @return 69 */ 70 ESamplingFrequency parseSampleRate( int sampleRate ); 71 72 std::ostream& operator<<( std::ostream& stream, ESamplingFrequency samplingFrequency ); 73 38 74 /*! 39 75 @brief Base class for device support branches/echoaudio/src/libavc/audiosubunit/avc_function_block.cpp
r502 r503 27 27 #include "libieee1394/ieee1394service.h" 28 28 29 30 namespace AVC { 31 32 29 33 ///////////////////////////////// 30 34 … … 702 706 return new FunctionBlockCmd( *this ); 703 707 } 708 709 } branches/echoaudio/src/libavc/audiosubunit/avc_function_block.h
r502 r503 31 31 #include <vector> 32 32 using namespace std; 33 34 namespace AVC { 35 33 36 34 37 class FunctionBlockFeatureVolume: public IBusData … … 273 276 }; 274 277 278 } 279 275 280 #endif branches/echoaudio/src/libavc/avc_definitions.cpp
r445 r503 25 25 26 26 27 int 28 convertESamplingFrequency(ESamplingFrequency freq) 29 { 30 int value = 0; 31 32 switch ( freq ) { 33 case eSF_22050Hz: 34 value = 22050; 35 break; 36 case eSF_24000Hz: 37 value = 24000; 38 break; 39 case eSF_32000Hz: 40 value = 32000; 41 break; 42 case eSF_44100Hz: 43 value = 44100; 44 break; 45 case eSF_48000Hz: 46 value = 48000; 47 break; 48 case eSF_88200Hz: 49 value = 88200; 50 break; 51 case eSF_96000Hz: 52 value = 96000; 53 break; 54 case eSF_176400Hz: 55 value = 176400; 56 break; 57 case eSF_192000Hz: 58 value = 192000; 59 break; 60 case eSF_AnyLow: 61 value = 48000; 62 break; 63 case eSF_AnyMid: 64 value = 96000; 65 break; 66 case eSF_AnyHigh: 67 value = 192000; 68 break; 69 default: 70 value = 0; 71 } 27 namespace AVC { 72 28 73 29 74 return value;75 30 } 76 77 ESamplingFrequency78 parseSampleRate( int sampleRate )79 {80 ESamplingFrequency efreq;81 switch ( sampleRate ) {82 case 22050:83 efreq = eSF_22050Hz;84 break;85 case 24000:86 efreq = eSF_24000Hz;87 break;88 case 32000:89 efreq = eSF_32000Hz;90 break;91 case 44100:92 efreq = eSF_44100Hz;93 break;94 case 48000:95 efreq = eSF_48000Hz;96 break;97 case 88200:98 efreq = eSF_88200Hz;99 break;100 case 96000:101 efreq = eSF_96000Hz;102 break;103 case 176400:104 efreq = eSF_176400Hz;105 break;106 case 192000:107 efreq = eSF_192000Hz;108 break;109 default:110 efreq = eSF_DontCare;111 }112 113 return efreq;114 }115 116 std::ostream& operator<<( std::ostream& stream, ESamplingFrequency samplingFrequency )117 {118 char* str;119 switch ( samplingFrequency ) {120 case eSF_22050Hz:121 str = "22050";122 break;123 case eSF_24000Hz:124 str = "24000";125 break;126 case eSF_32000Hz:127 str = "32000";128 break;129 case eSF_44100Hz:130 str = "44100";131 break;132 case eSF_48000Hz:133 str = "48000";134 break;135 case eSF_88200Hz:136 str = "88200";137 break;138 case eSF_96000Hz:139 str = "96000";140 break;141 case eSF_176400Hz:142 str = "176400";143 break;144 case eSF_192000Hz:145 str = "192000";146 break;147 case eSF_DontCare:148 default:149 str = "unknown";150 }151 return stream << str;152 };branches/echoaudio/src/libavc/avc_definitions.h
r499 r503 27 27 #include <libavc1394/avc1394.h> 28 28 #include <ostream> 29 30 31 namespace AVC { 29 32 30 33 typedef byte_t ctype_t; … … 83 86 typedef quadlet_t company_id_t; 84 87 85 /**86 * \brief the possible sampling frequencies87 */88 enum ESamplingFrequency {89 eSF_22050Hz = 0x00,90 eSF_24000Hz = 0x01,91 eSF_32000Hz = 0x02,92 eSF_44100Hz = 0x03,93 eSF_48000Hz = 0x04,94 eSF_88200Hz = 0x0A,95 eSF_96000Hz = 0x05,96 eSF_176400Hz = 0x06,97 eSF_192000Hz = 0x07,98 eSF_AnyLow = 0x0B,99 eSF_AnyMid = 0x0C,100 eSF_AnyHigh = 0x0D,101 eSF_None = 0x0E,102 eSF_DontCare = 0x0F,103 };104 105 /**106 * \brief Convert from ESamplingFrequency to an integer107 * @param freq108 * @return109 */110 int convertESamplingFrequency(ESamplingFrequency freq);111 /**112 * \brief Convert from integer to ESamplingFrequency113 * @param sampleRate114 * @return115 */116 ESamplingFrequency parseSampleRate( int sampleRate );117 118 std::ostream& operator<<( std::ostream& stream, ESamplingFrequency samplingFrequency );119 120 88 #define AVC1394_SUBUNIT_AUDIO 1 121 89 #define AVC1394_SUBUNIT_PRINTER 2 … … 148 116 }; 149 117 118 } 150 119 151 120 #endif // AVDDEFINITIONS_H branches/echoaudio/src/libavc/ccm/avc_signal_source.cpp
r502 r503 32 32 33 33 #define AVC1394_CMD_SIGNAL_SOURCE 0x1A 34 35 namespace AVC { 36 34 37 35 38 SignalUnitAddress::SignalUnitAddress() … … 283 286 return m_signalDestination; 284 287 } 288 289 } branches/echoaudio/src/libavc/ccm/avc_signal_source.h
r502 r503 29 29 30 30 #include <libavc1394/avc1394.h> 31 32 namespace AVC { 33 31 34 32 35 class SignalAddress: public IBusData … … 98 101 }; 99 102 103 } 100 104 101 105 #endif // AVCSIGNALSOURCE_H branches/echoaudio/src/libavc/descriptors/avc_descriptor.cpp
r502 r503 28 28 #include "libieee1394/ieee1394service.h" 29 29 30 namespace AVC { 31 30 32 AVCDescriptorSpecifier::AVCDescriptorSpecifier( enum EType type ) 31 33 : m_type ( type ) … … 540 542 return result; 541 543 } 544 545 } branches/echoaudio/src/libavc/descriptors/avc_descriptor.h
r502 r503 44 44 #include <string> 45 45 46 class Ieee1394Service; 47 48 namespace AVC { 49 46 50 class IOSSerialize; 47 51 class IISDeserialize; 48 class Ieee1394Service;49 50 51 52 /** 52 53 * The specifier used to indicate the target descriptor … … 246 247 // }; 247 248 249 } 250 248 251 #endif // AVCDESCRIPTOR_H branches/echoaudio/src/libavc/descriptors/avc_descriptor_cmd.cpp
r502 r503 32 32 33 33 using namespace std; 34 35 namespace AVC { 34 36 35 37 OpenDescriptorCmd::OpenDescriptorCmd(Ieee1394Service& ieee1394service) … … 231 233 default: return eInvalid; 232 234 } 233 234 } 235 } 236 237 } branches/echoaudio/src/libavc/descriptors/avc_descriptor_cmd.h
r502 r503 28 28 29 29 #include <libavc1394/avc1394.h> 30 31 namespace AVC { 32 30 33 31 34 // defined in avc1394.h … … 119 122 }; 120 123 124 } 125 121 126 #endif // AVCDESCRIPTORCMD_H branches/echoaudio/src/libavc/general/avc_connect.cpp
r502 r503 31 31 using namespace std; 32 32 33 namespace AVC { 34 33 35 ConnectCmd::ConnectCmd(Ieee1394Service& ieee1394service) 34 36 : AVCCommand( ieee1394service, AVC1394_CMD_CONNECT ) … … 53 55 return true; 54 56 } 57 58 } branches/echoaudio/src/libavc/general/avc_connect.h
r502 r503 28 28 29 29 #include <libavc1394/avc1394.h> 30 namespace AVC { 30 31 31 32 class ConnectCmd: public AVCCommand … … 42 43 }; 43 44 45 } 44 46 45 47 #endif // AVCCONNECT_H branches/echoaudio/src/libavc/general/avc_extended_cmd_generic.cpp
r502 r503 25 25 #include "../util/avc_serialize.h" 26 26 #include "libieee1394/ieee1394service.h" 27 28 namespace AVC { 27 29 28 30 UnitPlugAddress::UnitPlugAddress( EPlugType plugType, plug_type_t plugId ) … … 557 559 } 558 560 559 561 } branches/echoaudio/src/libavc/general/avc_extended_cmd_generic.h
r502 r503 26 26 27 27 #include "avc_generic.h" 28 29 namespace AVC { 28 30 29 31 //////////////////////////////////////////////////////////// … … 286 288 }; 287 289 290 } 288 291 289 292 #endif branches/echoaudio/src/libavc/general/avc_extended_plug_info.cpp
r502 r503 31 31 using namespace std; 32 32 33 namespace AVC { 34 33 35 ///////////////////////////////////////// 34 36 ///////////////////////////////////////// … … 855 857 return true; 856 858 } 859 860 } branches/echoaudio/src/libavc/general/avc_extended_plug_info.h
r502 r503 32 32 #include <string> 33 33 #include <vector> 34 35 namespace AVC { 34 36 35 37 class ExtendedPlugInfoPlugTypeSpecificData : public IBusData … … 316 318 }; 317 319 320 } 318 321 319 322 #endif branches/echoaudio/src/libavc/general/avc_extended_subunit_info.cpp
r502 r503 30 30 #define NR_OF_PAGE_DATA 5 31 31 #define SIZE_OF_PAGE_ENTRY 5 32 33 namespace AVC { 32 34 33 35 ExtendedSubunitInfoPageData::ExtendedSubunitInfoPageData() … … 156 158 return status; 157 159 } 160 161 } branches/echoaudio/src/libavc/general/avc_extended_subunit_info.h
r502 r503 31 31 #include <string> 32 32 #include <vector> 33 34 namespace AVC { 35 33 36 34 37 class ExtendedSubunitInfoPageData: public IBusData … … 105 108 }; 106 109 110 } 111 107 112 #endif branches/echoaudio/src/libavc/general/avc_generic.cpp
r502 r503 31 31 32 32 #define DEBUG_EXTRA_VERBOSE 5 33 34 35 namespace AVC { 33 36 34 37 IMPL_DEBUG_MODULE( AVCCommand, AVCCommand, DEBUG_LEVEL_NORMAL ); … … 332 335 return responseToStrings[eResponse]; 333 336 } 337 338 } branches/echoaudio/src/libavc/general/avc_generic.h
r502 r503 32 32 #include <libavc1394/avc1394.h> 33 33 34 class Ieee1394Service; 35 36 namespace AVC { 37 34 38 class IOSSerialize; 35 39 class IISDeserialize; 36 class Ieee1394Service;37 40 38 41 const int fcpFrameMaxLength = 512; … … 135 138 const char* responseToString( AVCCommand::EResponse eResponse ); 136 139 140 } 141 137 142 #endif // AVCGENERIC_H branches/echoaudio/src/libavc/general/avc_plug_info.cpp
r502 r503 30 30 31 31 using namespace std; 32 33 namespace AVC { 32 34 33 35 PlugInfoCmd::PlugInfoCmd( Ieee1394Service& ieee1394service, … … 155 157 return true; 156 158 } 159 160 } branches/echoaudio/src/libavc/general/avc_plug_info.h
r502 r503 33 33 #define AVC1394_PLUG_INFO_SUBFUNCTION_SERIAL_BUS_GENERIC_BUS_PLUG_BLUETOOTH 0x40 34 34 #define AVC1394_PLUG_INFO_SUBFUNCTION_SERIAL_BUS_NOT_USED 0xFF 35 36 37 namespace AVC { 35 38 36 39 … … 74 77 }; 75 78 79 } 76 80 77 81 #endif // AVCPLUGINFO_H branches/echoaudio/src/libavc/general/avc_subunit_info.cpp
r502 r503 30 30 31 31 using namespace std; 32 33 namespace AVC { 34 32 35 33 36 SubUnitInfoCmd::SubUnitInfoCmd( Ieee1394Service& ieee1349service ) … … 96 99 return true; 97 100 } 101 102 } branches/echoaudio/src/libavc/general/avc_subunit_info.h
r502 r503 29 29 #include <libavc1394/avc1394.h> 30 30 31 32 namespace AVC { 31 33 32 34 // No extended subunit queries supported … … 73 75 }; 74 76 77 } 75 78 76 79 #endif // AVCSUBUNITINFO_H branches/echoaudio/src/libavc/general/avc_unit_info.cpp
r502 r503 30 30 31 31 using namespace std; 32 33 namespace AVC { 34 32 35 33 36 UnitInfoCmd::UnitInfoCmd( Ieee1394Service& ieee1349service ) … … 84 87 return true; 85 88 } 89 90 } branches/echoaudio/src/libavc/general/avc_unit_info.h
r502 r503 28 28 29 29 #include <libavc1394/avc1394.h> 30 31 namespace AVC { 32 30 33 31 34 class UnitInfoCmd: public AVCCommand … … 68 71 }; 69 72 73 } 70 74 71 75 #endif // AVCUNITINFO_H branches/echoaudio/src/libavc/musicsubunit/avc_descriptor_music.cpp
r502 r503 34 34 // info block implementations 35 35 36 namespace AVC { 37 38 36 39 AVCMusicGeneralStatusInfoBlock::AVCMusicGeneralStatusInfoBlock( ) 37 40 : AVCInfoBlock( 0x8100 ) … … 638 641 } 639 642 643 } branches/echoaudio/src/libavc/musicsubunit/avc_descriptor_music.h
r502 r503 39 39 #include <vector> 40 40 41 class Ieee1394Service; 42 43 namespace AVC { 44 45 41 46 class IOSSerialize; 42 47 class IISDeserialize; 43 class Ieee1394Service;44 48 45 49 /** … … 242 246 }; 243 247 248 } 249 244 250 #endif // AVCDESCRIPTORMUSIC_H branches/echoaudio/src/libavc/streamformat/avc_extended_stream_format.cpp
r502 r503 27 27 28 28 #include <netinet/in.h> 29 30 #warning clean up the samplerate mess 31 #include "ffadodevice.h" 32 33 namespace AVC { 29 34 30 35 /////////////////////////////////////////////////////////// … … 388 393 return true; 389 394 } 395 396 } branches/echoaudio/src/libavc/streamformat/avc_extended_stream_format.h
r502 r503 31 31 #include <iostream> 32 32 #include <vector> 33 34 namespace AVC { 33 35 34 36 #define AVC1394_STREAM_FORMAT_SUPPORT 0x2F … … 287 289 }; 288 290 291 } 292 289 293 #endif // AVCEXTENDEDSTREAMFROMAT_H branches/echoaudio/src/libavc/util/avc_serialize.cpp
r502 r503 28 28 29 29 #include <netinet/in.h> 30 31 32 namespace AVC { 33 30 34 31 35 IMPL_DEBUG_MODULE( CoutSerializer, CoutSerializer, DEBUG_LEVEL_NORMAL ); … … 304 308 } 305 309 310 } branches/echoaudio/src/libavc/util/avc_serialize.h
r502 r503 29 29 #include <libraw1394/raw1394.h> // byte_t and quadlet_t declaration 30 30 #include <string> 31 32 namespace AVC { 31 33 32 34 // Interfaces … … 158 160 }; 159 161 162 } 160 163 #endif // SERIALIZE_H 161 164