]> sigrok.org Git - libsigrokdecode.git/blobdiff - decoders/ac97/pd.py
All PDs: Consistently use singular/plural for annotation classes/rows.
[libsigrokdecode.git] / decoders / ac97 / pd.py
index ecf88092203d926bb142bfd30d3c13ef1bc355da..adec12bcc081349722851f940476ce210affcff9 100644 (file)
@@ -59,7 +59,7 @@ class Decoder(srd.Decoder):
     desc = 'Audio and modem control for PC systems.'
     license = 'gplv2+'
     inputs = ['logic']
-    outputs = ['ac97']
+    outputs = []
     tags = ['Audio', 'PC']
     channels = (
         {'id': 'sync', 'name': 'SYNC', 'desc': 'Frame synchronization'},
@@ -71,8 +71,8 @@ class Decoder(srd.Decoder):
         {'id': 'rst', 'name': 'RESET#', 'desc': 'Reset line'},
     )
     annotations = (
-        ('bit-out', 'Output bits'),
-        ('bit-in', 'Input bits'),
+        ('bit-out', 'Output bit'),
+        ('bit-in', 'Input bit'),
         ('slot-out-raw', 'Output raw value'),
         ('slot-out-tag', 'Output TAG'),
         ('slot-out-cmd-addr', 'Output command address'),
@@ -153,8 +153,6 @@ class Decoder(srd.Decoder):
         self.put(ss, es, self.out_binary, [cls, data])
 
     def __init__(self):
-        self.out_binary = None
-        self.out_ann = None
         self.reset()
 
     def reset(self):
@@ -168,10 +166,8 @@ class Decoder(srd.Decoder):
         }
 
     def start(self):
-        if not self.out_binary:
-            self.out_binary = self.register(srd.OUTPUT_BINARY)
-        if not self.out_ann:
-            self.out_ann = self.register(srd.OUTPUT_ANN)
+        self.out_binary = self.register(srd.OUTPUT_BINARY)
+        self.out_ann = self.register(srd.OUTPUT_ANN)
 
     def metadata(self, key, value):
         if key == srd.SRD_CONF_SAMPLERATE: