Ejemplo n.º 1
0
def main(argv):
    cmd = None
    if len(argv) > 1 and argv[1] in ('-h', '-help', '--help'):
        print __doc__ % globals()
        return 0
    if len(argv) > 1 and argv[1] in ('-m', '-monitor', '--monitor'):
        cmd = 'monitor'
        del argv[1]
    if len(argv) > 1 and argv[1] in ('-g', '-graph', '--graph'):
        cmd = 'graph'
        del argv[1]
    if read_nodes(sys.argv[1:]) == 0:
        print "No HDA codecs were found or insufficient priviledges for "
        print "/dev/snd/controlC* and /dev/snd/hwdepC*D* device files."
        print
        print "You may also check, if you compiled HDA driver with HWDEP"
        print "interface as well or close all application using HWDEP."
        print
        print "Try run this program as root user."
        return 0
    else:
        if cmd == 'monitor':
            monitor()
            return 1
        if cmd == 'graph':
            for card in CODEC_TREE:
                for codec in CODEC_TREE:
                    create_graph(CODEC_TREE[card][codec])
        else:
            HDAAnalyzer()
        gtk.main()
    return 1
Ejemplo n.º 2
0
def main(argv):
  cmd = None
  if len(argv) > 1 and argv[1] in ('-h', '-help', '--help'):
    print __doc__ % globals()
    return 0
  if len(argv) > 1 and argv[1] in ('-m', '-monitor', '--monitor'):
    cmd = 'monitor'
    del argv[1]
  if len(argv) > 1 and argv[1] in ('-g', '-graph', '--graph'):
    cmd = 'graph'
    del argv[1]
  if read_nodes(sys.argv[1:]) == 0:
    print "No HDA codecs were found or insufficient priviledges for "
    print "/dev/snd/controlC* and /dev/snd/hwdepC*D* device files."
    print
    print "You may also check, if you compiled HDA driver with HWDEP"
    print "interface as well or close all application using HWDEP."
    print
    print "Try run this program as root user."
    return 0
  else:
    if cmd == 'monitor':
      monitor()
      return 1
    if cmd == 'graph':
      for card in CODEC_TREE:
        for codec in CODEC_TREE:
          create_graph(CODEC_TREE[card][codec])
    else:
      HDAAnalyzer()
    gtk.main()
  return 1
Ejemplo n.º 3
0
 def __graph_clicked(self, button):
     if not self.codec:
         self.simple_dialog(
             gtk.MESSAGE_WARNING,
             "Please, select a codec in left codec/node tree.")
         return
     create_graph(self.codec)
Ejemplo n.º 4
0
 def __graph_clicked(self, button):
   if not self.codec:
     self.simple_dialog(gtk.MESSAGE_WARNING, "Please, select a codec in left codec/node tree.")
     return
   create_graph(self.codec)