Changeset 1062
- Timestamp:
- 04/28/08 14:37:56 (13 years ago)
- Files:
-
- trunk/libffado/support/mixer/ffadomixer.in (modified) (4 diffs)
- trunk/libffado/support/mixer/mixer_dummy.py (modified) (1 diff)
- trunk/libffado/support/mixer/mixer_dummy.ui (modified) (3 diffs)
- trunk/libffado/support/mixer/SConscript (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/support/mixer/ffadomixer.in
r1060 r1062 50 50 from mixer_dummy import * 51 51 52 from mixer_generic import * 52 use_generic = False 53 try: 54 from mixer_generic import * 55 except ImportError: 56 print "Didn't find the generic-mixer" 57 else: 58 use_generic = True 53 59 54 60 SupportedDevices=[ … … 244 250 except dbus.DBusException, ex: 245 251 time.sleep( 1 ) 246 252 247 253 nbDevices=devmgr.getNbDevices() 248 249 forms=[]; 254 255 if nbDevices == 0: 256 print "No supported device found..." 257 msg.information( msg, "No mixer found", "Your device doesn't seem to have a supported mixer." ) 258 sys.exit( -1 ) 259 260 mw = QTabWidget() 261 250 262 for idx in range(nbDevices): 251 263 path=devmgr.getDeviceName(idx) 252 264 print "Found device %d: %s" % (idx, path) 253 265 254 266 cfgrom = ConfigRomInterface(server, basepath+'/DeviceManager/'+path) 255 267 vendorId = cfgrom.getVendorId() … … 273 285 if vendorId == 0x1f2: 274 286 thisdev=(vendorId, 0x00000000) 275 287 276 288 found_panel = False 277 289 for dev in SupportedDevices: 278 290 if dev[0] == thisdev: 279 291 mixerapp = dev[1] 280 292 281 293 # hack for the focusrite devices 282 294 # Saffire: 0x130e010001???? … … 288 300 mixerapp = "SaffireLEMixer" 289 301 print mixerapp 290 exec('forms.append('+mixerapp+'())') 291 forms[idx].hw = ControlInterface(server, basepath+'/DeviceManager/'+path) 292 forms[idx].configrom = cfgrom 293 forms[idx].clockselect = ClockSelectInterface(server, basepath+'/DeviceManager/'+path) 294 forms[idx].initValues() 295 forms[idx].show() 302 exec('tmp = '+mixerapp+'( mw )') 303 mw.addTab( tmp, mixerapp ) 304 tmp.hw = ControlInterface(server, basepath+'/DeviceManager/'+path) 305 tmp.configrom = cfgrom 306 tmp.clockselect = ClockSelectInterface(server, basepath+'/DeviceManager/'+path) 307 tmp.initValues() 308 tmp.show() 296 309 found_panel = True 297 310 298 311 if not found_panel: 299 forms.append( DummyMixer( ) ) 300 forms[idx].hw = ControlInterface(server, basepath+'/DeviceManager/'+path) 301 forms[idx].configrom = cfgrom 302 forms[idx].clockselect = ClockSelectInterface(server, basepath+'/DeviceManager/'+path) 303 forms[idx].initValues() 304 forms[idx].show() 305 306 # note: the generic mixer is disabled for now... 307 use_generic = False # !!! HACK !!! 312 tmp = DummyMixer( mw ) 313 mw.addTab( tmp, modelName+" (Dummy)" ) 314 tmp.hw = ControlInterface(server, basepath+'/DeviceManager/'+path) 315 tmp.configrom = cfgrom 316 tmp.clockselect = ClockSelectInterface(server, basepath+'/DeviceManager/'+path) 317 tmp.initValues() 318 tmp.show() 319 308 320 if nbDevices > 0 and use_generic: 309 forms.append( GenericMixer( devmgr.bus, server ) ) 310 forms[-1].show() 311 312 if forms: 313 # not setting this makes that the app doesn't quit when the first window is closed 314 #app.setMainWidget(forms[0]) 321 mw.addTab( GenericMixer( devmgr.bus, server, mw ), "Generic Mixer" ) 322 323 if mw.count() > 0: 324 mw.show() 315 325 316 326 QObject.connect(app,SIGNAL("lastWindowClosed()"),app,SLOT("quit()")) 317 327 318 328 app.exec_loop() 319 else:320 print "No supported device found..."321 msg.information( msg, "No mixer found", "Your device doesn't seem to have a supported mixer." )trunk/libffado/support/mixer/mixer_dummy.py
r1060 r1062 26 26 class DummyMixer(DummyMixerUI): 27 27 def __init__(self,parent = None,name = None,modal = 0,fl = 0): 28 DummyMixerUI.__init__(self,parent,name, modal,fl)28 DummyMixerUI.__init__(self,parent,name,fl) 29 29 30 30 def init(self): trunk/libffado/support/mixer/mixer_dummy.ui
r1060 r1062 18 18 GNU General Public License for more details. 19 19 </comment> 20 <widget class="Q Dialog">20 <widget class="QWidget"> 21 21 <property name="name"> 22 22 <cstring>DummyMixerUI</cstring> … … 26 26 <x>0</x> 27 27 <y>0</y> 28 <width> 220</width>29 <height>2 21</height>28 <width>309</width> 29 <height>290</height> 30 30 </rect> 31 31 </property> … … 33 33 <string>Dummy Panel</string> 34 34 </property> 35 < widget class="QLabel">35 <grid> 36 36 <property name="name"> 37 <cstring> textLabel1</cstring>37 <cstring>unnamed</cstring> 38 38 </property> 39 <property name="geometry"> 40 <rect> 41 <x>10</x> 42 <y>10</y> 43 <width>210</width> 44 <height>170</height> 45 </rect> 46 </property> 47 <property name="text"> 48 <string>This panel is merely a placeholder for devices that don't have a mixer panel yet.</string> 49 </property> 50 <property name="alignment"> 51 <set>WordBreak|AlignVCenter</set> 52 </property> 53 </widget> 54 <widget class="QPushButton"> 55 <property name="name"> 56 <cstring>pushButton1</cstring> 57 </property> 58 <property name="geometry"> 59 <rect> 60 <x>90</x> 61 <y>180</y> 62 <width>121</width> 63 <height>31</height> 64 </rect> 65 </property> 66 <property name="text"> 67 <string>Close</string> 68 </property> 69 </widget> 39 <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2"> 40 <property name="name"> 41 <cstring>textLabel1</cstring> 42 </property> 43 <property name="text"> 44 <string>This panel is merely a placeholder for devices that don't have a mixer panel yet.</string> 45 </property> 46 <property name="alignment"> 47 <set>WordBreak|AlignVCenter</set> 48 </property> 49 </widget> 50 <spacer row="1" column="0"> 51 <property name="name"> 52 <cstring>spacer1</cstring> 53 </property> 54 <property name="orientation"> 55 <enum>Horizontal</enum> 56 </property> 57 <property name="sizeType"> 58 <enum>Expanding</enum> 59 </property> 60 <property name="sizeHint"> 61 <size> 62 <width>40</width> 63 <height>20</height> 64 </size> 65 </property> 66 </spacer> 67 </grid> 70 68 </widget> 71 69 <connections> 72 <connection>73 <sender>pushButton1</sender>74 <signal>clicked()</signal>75 <receiver>DummyMixerUI</receiver>76 <slot>close()</slot>77 </connection>78 70 </connections> 79 71 <slots> trunk/libffado/support/mixer/SConscript
r1061 r1062 32 32 e['MIXERAPPS'] = [ 'phase24', 'phase88', 'saffirepro', 'saffire', 33 33 'saffirele', 'af2', 'bcoaudio5', 'edirolfa66', 34 'mackie_generic', 'quatafire', 'motu', 35 ' generic', 'dummy'34 'mackie_generic', 'quatafire', 'motu', 35 'dummy' 36 36 ] 37 37 e['OTHERAPPS'] = ['ffado_regdialog']