Changeset 2680
- Timestamp:
- 03/27/17 02:52:30 (7 years ago)
- Files:
-
- trunk/libffado/support/mixer-qt4/ffado/configuration.py (modified) (2 diffs)
- trunk/libffado/support/mixer-qt4/ffado/ffadowindow.py (modified) (1 diff)
- trunk/libffado/support/mixer-qt4/ffado/mixer/generic_dice_eap.py (modified) (1 diff)
- trunk/libffado/support/mixer-qt4/ffado/mixer/globalmixer.py (modified) (6 diffs)
- trunk/libffado/support/mixer-qt4/ffado/mixer/profire2626.py (modified) (1 diff)
- trunk/libffado/support/mixer-qt4/ffado/mixer/rme.py (modified) (1 diff)
- trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice.py (modified) (2 diffs)
- trunk/libffado/support/mixer-qt4/ffado/panelmanager.py (modified) (9 diffs)
- trunk/libffado/support/mixer-qt4/ffado/widgets/crossbarrouter.py (modified) (1 diff)
- trunk/libffado/support/mixer-qt4/ffado/widgets/matrixmixer.py (modified) (2 diffs)
- trunk/libffado/support/tools/ffado-sandbox-install.py (modified) (20 diffs)
- trunk/libffado/support/tools/ffado_diag_helpers.py (modified) (1 diff)
- trunk/libffado/support/tools/helpstrings.py (modified) (1 diff)
- trunk/libffado/support/tools/listirqinfo.py (modified) (1 diff)
- trunk/libffado/tests/dbus_test.py (modified) (20 diffs)
- trunk/libffado/tests/python/test-eap-ctrl.py (modified) (4 diffs)
- trunk/libffado/tests/python/test-echo-digital.py (modified) (3 diffs)
- trunk/libffado/tests/python/test-echo-routing.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/support/mixer-qt4/ffado/configuration.py
r1934 r2680 143 143 token = self.lex.get_token() 144 144 if token in ("=",":"): 145 #print "%sWill parse value" % level145 #print( "%sWill parse value" % level ) 146 146 value = self.parsevalue( level ) 147 147 return (name,value) … … 161 161 devs = DeviceList( file ) 162 162 163 print devs.devices163 print( devs.devices ) 164 164 165 165 # vim: et trunk/libffado/support/mixer-qt4/ffado/ffadowindow.py
r2678 r2680 177 177 # Lock acquired 178 178 except socket.error: 179 print 'ffado-mixer instance is already running'179 print( 'ffado-mixer instance is already running' ) 180 180 sys.exit() 181 181 trunk/libffado/support/mixer-qt4/ffado/mixer/generic_dice_eap.py
r2653 r2680 39 39 40 40 def buildMixer(self): 41 #print self.hw42 #print self.hw.getText("/Generic/Nickname")41 #print( self.hw ) 42 #print( self.hw.getText("/Generic/Nickname") ) 43 43 self.mixer = MatrixMixer(self.hw.servername, self.hw.basepath+"/EAP/MatrixMixer", self, "Columns_are_outputs", -1, None, None, False, QTabWidget.North, QTabWidget.Rounded) 44 44 self.tabs.addTab(self.mixer, "Mixer") trunk/libffado/support/mixer-qt4/ffado/mixer/globalmixer.py
r2675 r2680 127 127 128 128 def initValues( self ): 129 #print "GlobalMixer::initValues()"129 #print( "GlobalMixer::initValues()" ) 130 130 nb_clocks = self.clockselect.count() 131 131 for i in range( nb_clocks ): … … 202 202 idx = readString.index('<nickname>') 203 203 except Exception: 204 print "No nickname found"204 print( "No nickname found" ) 205 205 idx = -1 206 206 if idx >= 0: … … 214 214 idx = readString.index('<clock>') 215 215 except Exception: 216 print "No clock found"216 print( "No clock found" ) 217 217 idx = -1 218 218 if idx >= 0: … … 225 225 idxclock = clockLabel.index(clock) 226 226 except Exception: 227 print "No %s clock found" % clock227 print( "No %s clock found" % clock ) 228 228 idxclock = -1 229 229 if idxclock >= 0: … … 236 236 idx = readString.index('<samplerate>') 237 237 except Exception: 238 print "Samplerate not found"238 print( "Samplerate not found" ) 239 239 idx = -1 240 240 if idx >= 0: … … 247 247 idxsrate = srateLabel.index(samplerate) 248 248 except Exception: 249 print "No %s samplerate found" % samplerate249 print( "No %s samplerate found" % samplerate ) 250 250 idxsrate = -1 251 251 if idxsrate >= 0: trunk/libffado/support/mixer-qt4/ffado/mixer/profire2626.py
r2670 r2680 72 72 73 73 def buildMixer(self): 74 #print self.hw75 #print self.hw.getText("/Generic/Nickname")74 #print( self.hw ) 75 #print( self.hw.getText("/Generic/Nickname") ) 76 76 Generic_Dice_EAP.buildMixer(self) 77 77 trunk/libffado/support/mixer-qt4/ffado/mixer/rme.py
r2658 r2680 436 436 def initValues(self): 437 437 438 # print self.hw.servername439 # print self.hw.basepath438 # print( self.hw.servername ) 439 # print( self.hw.basepath ) 440 440 self.inputmatrix = MatrixMixer(self.hw.servername, self.hw.basepath+"/Mixer/InputFaders", self, "Columns_are_inputs", 0x8000, self.hw.basepath+"/Mixer/InputMutes", self.hw.basepath+"/Mixer/InputInverts", True) 441 441 layout = QVBoxLayout() trunk/libffado/support/mixer-qt4/ffado/mixer/saffire_dice.py
r2676 r2680 73 73 74 74 def buildMixer(self): 75 #print self.hw76 #print self.hw.getText("/Generic/Nickname")75 #print( self.hw ) 76 #print( self.hw.getText("/Generic/Nickname") ) 77 77 Generic_Dice_EAP.buildMixer(self) 78 78 … … 94 94 ModelName += "_" 95 95 ModelName += ModelNum 96 print ModelName96 print( ModelName ) 97 97 98 98 if ModelName == "SAFFIRE_PRO_14": trunk/libffado/support/mixer-qt4/ffado/panelmanager.py
r2670 r2680 216 216 217 217 def removePanel(self, guid): 218 print "Removing widget for device" + guid218 print( "Removing widget for device" + guid ) 219 219 w = self.panels[guid] 220 220 del self.panels[guid] # remove from the list … … 492 492 f = open(savefilename, 'w') 493 493 except IOError: 494 print "Unable to open save file"494 print( "Unable to open save file" ) 495 495 return 496 496 for s in saveString: … … 503 503 f = open(readfilename, 'r') 504 504 except IOError: 505 print "Unable to open file"505 print( "Unable to open file" ) 506 506 return 507 507 log.debug("Opening file %s" % readfilename) … … 514 514 # It must start with the <?xml ... tag as the first string 515 515 if readString[0].find("<?xml") == -1: 516 print "Not an xml data file"516 print( "Not an xml data file" ) 517 517 return 518 518 # Then there must be a file version tag somewhere in the file … … 520 520 idx = readString.index('<fileversion>') 521 521 except Exception: 522 print "Data file should contain the version tag"522 print( "Data file should contain the version tag" ) 523 523 return 524 524 if readString[idx+1].find("<major>") == -1: 525 print "Incompatible versioning of the file"525 print( "Incompatible versioning of the file" ) 526 526 if readString[idx+3].find("</major>") == -1: 527 print "Not a valid xml file"527 print( "Not a valid xml file" ) 528 528 if readString[idx+4].find("<minor>") == -1: 529 print "Incompatible versioning of the file"529 print( "Incompatible versioning of the file" ) 530 530 if readString[idx+6].find("</minor>") == -1: 531 print "Not a valid xml file"531 print( "Not a valid xml file" ) 532 532 version_major = readString[idx+2] 533 533 version = version_major + '.' + readString[idx+5] … … 535 535 # File version newer than present 536 536 if int(version_major) > int(str(FILE_VERSION).split('.')[0]): 537 print "File version is too recent: you should upgrade your FFADO installation"537 print( "File version is too recent: you should upgrade your FFADO installation" ) 538 538 return 539 539 # FIXME At a time it will be necessary to detect if an older major version is detected … … 546 546 n = readString.count('</device>'); 547 547 if n != nd: 548 print "Not a regular xml file: opening device tag must match closing ones"548 print( "Not a regular xml file: opening device tag must match closing ones" ) 549 549 return 550 550 while nd > 0: … … 552 552 idxe = readString.index('</device>') 553 553 if idxe < idxb+1: 554 print "Not a regular xml file: data must be enclosed between a <device> and </device> tag"554 print( "Not a regular xml file: data must be enclosed between a <device> and </device> tag" ) 555 555 return 556 556 stringDev = [] … … 561 561 idx = stringDev.index('<guid>') 562 562 except Exception: 563 print "Device guid not found"563 print( "Device guid not found" ) 564 564 return 565 565 guid = stringDev[idx+1] trunk/libffado/support/mixer-qt4/ffado/widgets/crossbarrouter.py
r2670 r2680 170 170 171 171 def __del__(self): 172 print "CrossbarRouter.__del__()"172 print( "CrossbarRouter.__del__()" ) 173 173 self.settings.setValue("crossbarrouter/runvu", self.vubtn.isChecked()) 174 174 trunk/libffado/support/mixer-qt4/ffado/widgets/matrixmixer.py
r2679 r2680 73 73 74 74 def getColor(self, n): 75 #print "ColorForNumber.getColor( %g )" % (n)75 #print( "ColorForNumber.getColor( %g )" % (n) ) 76 76 keys = sorted(self.colors.keys()) 77 77 low = keys[-1] … … 81 81 low = keys[i] 82 82 high = keys[i+1] 83 #print "%g is between %g and %g" % (n, low, high)83 #print( "%g is between %g and %g" % (n, low, high) ) 84 84 f = 0 85 85 if high != low: trunk/libffado/support/tools/ffado-sandbox-install.py
r1499 r2680 74 74 75 75 if source_descriptor[1] == 'svn': 76 print " Checking out SVN repository: %s" % source_descriptor[2]76 print( " Checking out SVN repository: %s" % source_descriptor[2] ) 77 77 cwd = os.getcwd() 78 78 os.chdir(build_dir) … … 80 80 os.chdir(cwd) 81 81 if retval: 82 print " Failed to checkout the SVN repository. Inspect %s for details. (is subversion installed?)" % logfile82 print( " Failed to checkout the SVN repository. Inspect %s for details. (is subversion installed?)" % logfile ) 83 83 return False 84 84 return True 85 85 elif source_descriptor[1] == 'tar.gz': 86 print " Downloading tarball: %s" % source_descriptor[2]86 print( " Downloading tarball: %s" % source_descriptor[2] ) 87 87 import urllib 88 88 tmp_file = '%s/tmp.tar.gz' % build_dir … … 90 90 urllib.urlretrieve(source_descriptor[2], tmp_file) 91 91 except: 92 print " Could not retrieve source tarball."92 print( " Could not retrieve source tarball." ) 93 93 return False 94 94 cwd = os.getcwd() 95 95 os.chdir(build_dir) 96 print " extracting tarball..."96 print( " extracting tarball..." ) 97 97 retval = os.system('tar -zxf "%s" > %s' % (tmp_file, logfile)) 98 98 if retval: 99 print " Failed to extract the source tarball. Inspect %s for details." % logfile99 print( " Failed to extract the source tarball. Inspect %s for details." % logfile ) 100 100 os.chdir(cwd) 101 101 return False … … 103 103 retval = os.system('mv "%s" "%s"' % (source_descriptor[3], target)) 104 104 if retval: 105 print " Failed to move the extracted tarball"105 print( " Failed to move the extracted tarball" ) 106 106 os.chdir(cwd) 107 107 return False … … 109 109 return True 110 110 else: 111 print "bad source type"111 print( "bad source type" ) 112 112 return False 113 113 … … 134 134 """ 135 135 136 print welcome_msg136 print( welcome_msg ) 137 137 138 138 # get the paths to be used … … 180 180 """ % suggestion_build 181 181 182 print sandbox_dir_msg182 print( sandbox_dir_msg ) 183 183 sandbox_dir = ask_for_dir('sandbox', suggestion_sandbox) 184 184 if sandbox_dir == None: 185 print "Cannot proceed without valid sandbox directory."185 print( "Cannot proceed without valid sandbox directory." ) 186 186 exit(-1) 187 187 print(" using %s as sandbox directory" % sandbox_dir) 188 188 189 189 190 print build_dir_msg190 print( build_dir_msg ) 191 191 build_dir = ask_for_dir('build', suggestion_build) 192 192 if build_dir == None: 193 print "Cannot proceed without valid build directory."193 print( "Cannot proceed without valid build directory." ) 194 194 exit(-1) 195 195 print(" using %s as build directory" % build_dir) … … 210 210 ffado_versions_msg += " %2s: %s\n" % (key, ffado_versions[key][0]) 211 211 212 print ffado_versions_msg212 print( ffado_versions_msg ) 213 213 while True: 214 214 ffado_version = raw_input("Please select a FFADO version: ") … … 220 220 yesno = raw_input("Invalid FFADO version specified. Try again? [yes/no] ") 221 221 if yesno == "" or yesno[0] != 'y': 222 print "Cannot proceed without valid FFADO version."222 print( "Cannot proceed without valid FFADO version." ) 223 223 exit(-1) 224 224 else: … … 240 240 jack_versions_msg += " %2s: %s\n" % (key, jack_versions[key][0]) 241 241 242 print jack_versions_msg242 print( jack_versions_msg ) 243 243 while True: 244 244 jack_version = raw_input("Please select a jack version: ") … … 250 250 yesno = raw_input("Invalid jack version specified. Try again? [yes/no] ") 251 251 if yesno == "" or yesno[0] != 'y': 252 print "Cannot proceed without valid jack version."252 print( "Cannot proceed without valid jack version." ) 253 253 exit(-1) 254 254 else: … … 258 258 use_jack_version = jack_versions[jack_version_int] 259 259 260 # print a summary261 print """260 # print( a summary ) 261 print( """ ) 262 262 SUMMARY 263 263 ======= … … 270 270 271 271 # get the ffado source 272 print "Fetching FFADO source..."272 print( "Fetching FFADO source..." ) 273 273 274 274 if not fetch_source(build_dir, use_ffado_version, 'libffado'): 275 print "Could not fetch FFADO source"276 exit(-1) 277 print " Successfully fetched FFADO source"278 279 print "Fetching jack source..."275 print( "Could not fetch FFADO source" ) 276 exit(-1) 277 print( " Successfully fetched FFADO source" ) 278 279 print( "Fetching jack source..." ) 280 280 281 281 if not fetch_source(build_dir, use_jack_version, 'jack'): 282 print "Could not fetch jack source"283 exit(-1) 284 print " Successfully fetched jack source"282 print( "Could not fetch jack source" ) 283 exit(-1) 284 print( " Successfully fetched jack source" ) 285 285 286 286 cwd = os.getcwd() … … 292 292 # configure FFADO 293 293 os.chdir("%s/libffado/" % build_dir) 294 print "Building FFADO..."295 print " Compiling..."294 print( "Building FFADO..." ) 295 print( " Compiling..." ) 296 296 retval = os.system('scons PREFIX="%s" %s >> %s' % (sandbox_dir, ffado_scons_options, ffado_log)) 297 297 if retval: 298 print """298 print( """ ) 299 299 Failed to configure/build FFADO. Most likely this is due to uninstalled dependencies. 300 300 Check %s for details. … … 303 303 304 304 # install FFADO 305 print " Installing into %s..." % sandbox_dir305 print( " Installing into %s..." % sandbox_dir ) 306 306 retval = os.system('scons install >> %s' % (ffado_log)) 307 307 if retval: 308 print "Failed to install FFADO. Check %s for details." % ffado_log308 print( "Failed to install FFADO. Check %s for details." % ffado_log ) 309 309 exit(-1) 310 310 … … 314 314 os.system('echo "" > %s' % jack_log) 315 315 316 print "Building Jack..."316 print( "Building Jack..." ) 317 317 if use_jack_version[1] == 'svn': 318 print " Initializing build system..."318 print( " Initializing build system..." ) 319 319 retval = os.system('./autogen.sh >> %s' % jack_log) 320 320 if retval: 321 print """321 print( """ ) 322 322 Failed to initialize the jack build system. Most likely this is due to uninstalled dependencies. 323 323 Check %s for details. … … 325 325 exit(-1) 326 326 327 print " Configuring build..."327 print( " Configuring build..." ) 328 328 retval = os.system('./configure --prefix="%s" >> %s' % (sandbox_dir, jack_log)) 329 329 if retval: 330 print """330 print( """ ) 331 331 Failed to configure the jack build. Most likely this is due to uninstalled dependencies. 332 332 Check %s for details. … … 335 335 336 336 # build and install jack 337 print " Compiling..."337 print( " Compiling..." ) 338 338 retval = os.system('make >> %s' % (jack_log)) 339 339 if retval: 340 print "Failed to build jack. Check %s for details." % jack_log341 exit(-1) 342 343 print " Installing into %s..." % sandbox_dir340 print( "Failed to build jack. Check %s for details." % jack_log ) 341 exit(-1) 342 343 print( " Installing into %s..." % sandbox_dir ) 344 344 retval = os.system('make install >> %s' % (jack_log)) 345 345 if retval: 346 print "Failed to install jack. Check %s for details." % jack_log346 print( "Failed to install jack. Check %s for details." % jack_log ) 347 347 exit(-1) 348 348 … … 361 361 """ % (sandbox_dir, sandbox_dir, sandbox_dir) 362 362 363 print "Writing shell configuration file..."363 print( "Writing shell configuration file..." ) 364 364 sandbox_rc_file = "%s/ffado.rc" % sandbox_dir 365 365 try: … … 368 368 fid.close() 369 369 except: 370 print "Could not write the sandbox rc file."370 print( "Could not write the sandbox rc file." ) 371 371 exit(-1) 372 372 373 373 os.chdir(cwd) 374 374 375 print """375 print( """ ) 376 376 FFADO and jack are installed into %s. If you want to use the 377 377 versions in the sandbox, you have to alter your environment trunk/libffado/support/tools/ffado_diag_helpers.py
r2148 r2680 163 163 tmp 164 164 cmd = lspci_cmd + " -vv -nn -s %s" % tmp[0] 165 print run_command(cmd)165 print( run_command(cmd) ) 166 166 167 167 def get_juju_permissions(): trunk/libffado/support/tools/helpstrings.py
r2053 r2680 56 56 57 57 def show(self, sid): 58 print self.get(sid)58 print( self.get(sid) ) 59 59 trunk/libffado/support/tools/listirqinfo.py
r2149 r2680 158 158 if __name__== '__main__': 159 159 160 print ""161 print "Interrupt list utility " + LISTIRQINFO_VERSION162 print "=========================="163 print "(C) 2008 Pieter Palmers"164 print ""160 print( "" ) 161 print( "Interrupt list utility " + LISTIRQINFO_VERSION ) 162 print( "==========================" ) 163 print( "(C) 2008 Pieter Palmers" ) 164 print( "" ) 165 165 166 166 info = IRQInfo() 167 167 168 168 info.load() 169 print str(info)169 print( str(info) ) 170 170 171 print ""171 print( "" ) trunk/libffado/tests/dbus_test.py
r1336 r2680 45 45 dev_cont.setValueIdx(idx,v) 46 46 except: 47 print "Failed to set Continuous %s on server %s" % (path, self.servername)47 print( "Failed to set Continuous %s on server %s" % (path, self.servername) ) 48 48 49 49 def getContignuous(self, subpath, idx=None): … … 57 57 return dev_cont.getValueIdx(idx) 58 58 except: 59 print "Failed to get Continuous %s on server %s" % (path, self.servername)59 print( "Failed to get Continuous %s on server %s" % (path, self.servername) ) 60 60 return 0 61 61 … … 67 67 dev_cont.setValue(v) 68 68 except: 69 print "Failed to set Discrete %s on server %s" % (path, self.servername)69 print( "Failed to set Discrete %s on server %s" % (path, self.servername) ) 70 70 71 71 def getDiscrete(self, subpath): … … 76 76 return dev_cont.getValue() 77 77 except: 78 print "Failed to get Discrete %s on server %s" % (path, self.servername)78 print( "Failed to get Discrete %s on server %s" % (path, self.servername) ) 79 79 return 0 80 80 … … 86 86 dev_cont.setValue(address, value) 87 87 except: 88 print "Failed to set Register %s on server %s" % (path, self.servername)88 print( "Failed to set Register %s on server %s" % (path, self.servername) ) 89 89 90 90 def getRegister(self, subpath, address): … … 95 95 return dev_cont.getValue(address) 96 96 except: 97 print "Failed to get Register %s on server %s" % (path, self.servername)97 print( "Failed to get Register %s on server %s" % (path, self.servername) ) 98 98 return 0 99 99 … … 105 105 dev_cont.setValue(v) 106 106 except: 107 print "Failed to set Text %s on server %s" % (path, self.servername)107 print( "Failed to set Text %s on server %s" % (path, self.servername) ) 108 108 109 109 def getText(self, subpath): … … 114 114 return dev_cont.getValue() 115 115 except: 116 print "Failed to get Text %s on server %s" % (path, self.servername)116 print( "Failed to get Text %s on server %s" % (path, self.servername) ) 117 117 return 0 118 118 … … 124 124 dev_cont.setValue(row, col, v) 125 125 except: 126 print "Failed to set MatrixMixer %s on server %s" % (path, self.servername)126 print( "Failed to set MatrixMixer %s on server %s" % (path, self.servername) ) 127 127 128 128 def getMatrixMixerValue(self, subpath, row, col): … … 133 133 return dev_cont.getValue(row, col) 134 134 except: 135 print "Failed to get MatrixMixer %s on server %s" % (path, self.servername)135 print( "Failed to get MatrixMixer %s on server %s" % (path, self.servername) ) 136 136 return 0 137 137 … … 143 143 dev_cont.select(v) 144 144 except: 145 print "Failed to select %s on server %s" % (path, self.servername)145 print( "Failed to select %s on server %s" % (path, self.servername) ) 146 146 147 147 def enumSelected(self, subpath): … … 152 152 return dev_cont.selected() 153 153 except: 154 print "Failed to get selected enum %s on server %s" % (path, self.servername)154 print( "Failed to get selected enum %s on server %s" % (path, self.servername) ) 155 155 return 0 156 156 … … 162 162 return dev_cont.getEnumLabel(v) 163 163 except: 164 print "Failed to get enum label %s on server %s" % (path, self.servername)164 print( "Failed to get enum label %s on server %s" % (path, self.servername) ) 165 165 return 0 166 166 … … 172 172 return dev_cont.count() 173 173 except: 174 print "Failed to get enum count %s on server %s" % (path, self.servername)174 print( "Failed to get enum count %s on server %s" % (path, self.servername) ) 175 175 return 0 176 176 … … 191 191 192 192 #def updateSignal(self): 193 #print ("Received update signal")193 #print( ("Received update signal") ) 194 194 195 195 def getNbDevices(self): … … 257 257 if __name__ == "__main__": 258 258 259 print """259 print( """ ) 260 260 =========================================================== 261 261 FFADO DBUS TEST TOOL … … 273 273 repeat -= 1 274 274 except dbus.DBusException, ex: 275 print "\n"276 print "==========================================================="277 print "ERROR: Could not communicate with the FFADO DBus service..."278 print "==========================================================="279 print "\n"275 print( "\n" ) 276 print( "===========================================================" ) 277 print( "ERROR: Could not communicate with the FFADO DBus service..." ) 278 print( "===========================================================" ) 279 print( "\n" ) 280 280 sys.exit( -1 ) 281 281 282 282 if nbDevices == 0: 283 print "No supported device found..."283 print( "No supported device found..." ) 284 284 sys.exit( -1 ) 285 285 … … 287 287 288 288 path=devmgr.getDeviceName(idx) 289 print "Found device %d: %s" % (idx, path)289 print( "Found device %d: %s" % (idx, path) ) 290 290 291 291 cfgrom = ConfigRomInterface(server, basepath+'/DeviceManager/'+path) … … 296 296 vendorName = cfgrom.getVendorName() 297 297 modelName = cfgrom.getModelName() 298 print " Found (%s, %X, %X) %s %s" % (str(GUID), vendorId, modelId, vendorName, modelName)298 print( " Found (%s, %X, %X) %s %s" % (str(GUID), vendorId, modelId, vendorName, modelName) ) 299 299 300 300 # create a control objects … … 311 311 oldval = register[regid] 312 312 if newval != oldval: 313 print "%04d: from %8d | %08X to %8d | %08X" % (regid, oldval, oldval, newval, newval)313 print( "%04d: from %8d | %08X to %8d | %08X" % (regid, oldval, oldval, newval, newval) ) 314 314 register[regid] = newval 315 315 time.sleep(0.2) 316 print "--- %d ---" % i316 print( "--- %d ---" % i ) 317 317 #time.sleep(1) 318 318 319 319 #regid=eval(sys.argv[1]) 320 320 #val=eval(sys.argv[2]) 321 #print hw.getRegister("/Register", regid)321 #print( hw.getRegister("/Register", regid) ) 322 322 #hw.setRegister("/Register", regid, val) 323 323 trunk/libffado/tests/python/test-eap-ctrl.py
r1630 r2680 39 39 #nboutputs = mixer.getColCount() 40 40 41 #print nbinputs42 #print nboutputs41 #print( nbinputs ) 42 #print( nboutputs ) 43 43 44 44 #for i in range(nbinputs): … … 50 50 #srcidx = router.getSourceIndex(src) 51 51 #for dst in dsts: 52 #print dst52 #print( dst ) 53 53 #dstidx = router.getDestinationIndex(dst) 54 54 … … 61 61 ## connect 62 62 #if router.canConnect(srcidx, dstidx): 63 #print router.getConnectionState(srcidx, dstidx)64 #print router.setConnectionState(srcidx, dstidx, 1)63 #print( router.getConnectionState(srcidx, dstidx) ) 64 #print( router.setConnectionState(srcidx, dstidx, 1) ) 65 65 66 66 #reroute("InS1:02", ["InS0:00", "InS1:00", "InS1:02", "InS1:04", "InS1:06"]) … … 98 98 s += "\n" 99 99 100 print s100 print( s ) trunk/libffado/tests/python/test-echo-digital.py
r2390 r2680 37 37 dbus_interface='org.ffado.Control.Element.Discrete') 38 38 except: 39 print "'ffado-dbus-server' should be started in advance."39 print( "'ffado-dbus-server' should be started in advance." ) 40 40 sys.exit() 41 41 … … 45 45 raise Exception() 46 46 except: 47 print "Your device just supports coaxial digital interface."47 print( "Your device just supports coaxial digital interface." ) 48 48 sys.exit() 49 49 … … 56 56 57 57 if (argc > 2): 58 print "too many arguments"58 print( "too many arguments" ) 59 59 sys.exit() 60 60 elif (argc > 1): 61 61 param = int(argvs[1]) 62 62 if ((param == 1) or (param > 3)): 63 print "wrong argument. it should be:"64 print "\t0(S/PDIF coaxial), 2(S/PDIF optical), or 3(ADAT optical)"63 print( "wrong argument. it should be:" ) 64 print( "\t0(S/PDIF coaxial), 2(S/PDIF optical), or 3(ADAT optical)" ) 65 65 else: 66 print interface.setValue(param)66 print( interface.setValue(param) ) 67 67 68 68 else: 69 print interface.getValue()69 print( interface.getValue() ) 70 70 trunk/libffado/tests/python/test-echo-routing.py
r2395 r2680 45 45 dbus_interface='org.ffado.Control.Element.Discrete') 46 46 except: 47 print "'ffado-dbus-server' should be started in advance."47 print( "'ffado-dbus-server' should be started in advance." ) 48 48 sys.exit() 49 49 … … 53 53 raise Exception() 54 54 except: 55 print "Your device doesn't support playback-routing."55 print( "Your device doesn't support playback-routing." ) 56 56 sys.exit() 57 57 … … 67 67 strm = int(argvs[2]) 68 68 if ((port > 2) or (strm > 2)): 69 print 'arguments should be less than 3.'69 print( 'arguments should be less than 3.' ) 70 70 sys.exit() 71 71 s = router.setValueIdx(port, strm); 72 print s72 print( s ) 73 73 # get status 74 74 else: 75 print "port\tstream"75 print( "port\tstream" ) 76 76 for i in range(3): 77 print i, "\t", router.getValueIdx(i);77 print( i, "\t", router.getValueIdx(i); ) 78 78