X-Git-Url: http://sigrok.org/gitweb/?a=blobdiff_plain;f=decoders%2Fspdif%2Fpd.py;h=126a0274b5087a45214dccf504741c74191cca6b;hb=e144452bcdd5f2abbe6b6f3da41ad64f67e39def;hp=0c535e4a6d86e56530e6837390d01bac714b2c73;hpb=97b874bd0b6913ed52df1b8aac5e7491479fac9a;p=libsigrokdecode.git diff --git a/decoders/spdif/pd.py b/decoders/spdif/pd.py index 0c535e4..126a027 100644 --- a/decoders/spdif/pd.py +++ b/decoders/spdif/pd.py @@ -30,24 +30,25 @@ class Decoder(srd.Decoder): desc = 'Serial bus for connecting digital audio devices.' license = 'gplv2+' inputs = ['logic'] - outputs = ['spdif'] + outputs = [] + tags = ['Audio', 'PC'] channels = ( {'id': 'data', 'name': 'Data', 'desc': 'Data line'}, ) annotations = ( ('bitrate', 'Bitrate / baudrate'), ('preamble', 'Preamble'), - ('bits', 'Bits'), - ('aux', 'Auxillary-audio-databits'), - ('samples', 'Audio Samples'), + ('bit', 'Bit'), + ('aux', 'Auxillary-audio-databit'), + ('sample', 'Audio Sample'), ('validity', 'Data Valid'), ('subcode', 'Subcode data'), ('chan_stat', 'Channnel Status'), ('parity', 'Parity Bit'), ) annotation_rows = ( - ('info', 'Info', (0, 1, 3, 5, 6, 7, 8)), ('bits', 'Bits', (2,)), + ('info', 'Info', (0, 1, 3, 5, 6, 7, 8)), ('samples', 'Samples', (4,)), ) @@ -58,6 +59,9 @@ class Decoder(srd.Decoder): self.put(self.ss_edge, self.samplenum, self.out_ann, data) def __init__(self): + self.reset() + + def reset(self): self.state = 'GET FIRST PULSE WIDTH' self.ss_edge = None self.first_edge = True