summaryrefslogtreecommitdiff
path: root/decoders/spdif/pd.py
AgeCommit message (Collapse)Author
2020-07-20spdif: Simplify samplerate check.Uwe Hermann
2020-07-20spdif: Drop unneeded braces.Uwe Hermann
2020-07-20spdif: Fix various issues.Arno Morbach
Bug #897 and my own experience caused me to improve the SPDIF decoder. The following issues were addressed and resolved: 1. The Error: "srd: ValueError: Protocol decoder instance spdif-1: invalid literal for int() with base 2: '121111012112021111012120'" This error can happen if the sample rate is marginal. The correct function of the decoder depends on the position of the data stream. The pulse width calculation was wrong and the pulse width detection sometimes thought the same pulse classes to be different. The new decoder explicitly checks for short pulses and reports an error with a corresponding message. 2. Bitrates were calculated wrong: The shown results were not usable at all. The new decoder uses the first ten frames to calculate the bit rates and uses the correct measurement units. Possible issue: The bit rate calculation assumes an ongoing data stream. It uses the time between the first and 10th frame. They need to be sent without interruption. But this should be no problem because SPDIF is meant to be a continuous stream. 3. A missing samplerate, e.g. when used in sigrok-cli with binary input, lead to an error message on the original decoder. The new decoder just skips the output of the bitrate if the samplerate is missing. A missing samplerate no longer raises an error but only a message in the data output. 4. The user was not informed about the integral steps of the decoder. The new decoder shows the results of the synchronisation process at the beginning. This can help to understand the behaviour of the decoder. This fixes bug #897.
2020-01-01All PDs: Consistently use singular/plural for annotation classes/rows.Uwe Hermann
2019-11-29decoders: Use a slightly more consistent/logical annotation row setup.Uwe Hermann
Generally show "bits" and other smaller annotations in rows that come before "larger" annotations (in later rows).
2019-04-02decoders: Fix incorrect 'outputs' fields.Uwe Hermann
Only add items to 'outputs' if the respective PD actually has OUTPUT_PYTHON support implemented as of right now. Various decoders might get OUTPUT_PYTHON support later, but the 'outputs' field should reflect the current status.
2019-03-15decoders: Add/update tags for each PD.Uwe Hermann
2017-12-22all decoders: introduce a reset() methodGerhard Sittig
Move initialization code of protocol decoders from the constructor to a new reset() helper method. The libsigrokdecode backend could run this method several times to clear the decoder's internal state, before new data from another acquisition gets fed to decode() calls.
2017-06-05Add srd_inst_initial_pins_set_all() and support code.Uwe Hermann
This allows frontends to set the assumed initial pins (i.e., the assumed state of the pins before the first sample of a capture) to user-specified values. The assumed initial pins can be either low, or high, or "use same value as the first sample of the capture". The special self.initial_pins decoder attribute is now removed.
2017-01-07license: remove FSF postal address from boiler plate license textGerhard Sittig
Remove the FSF postal address as it might change (it did in the past). Reference the gnu.org website instead which is more stable.
2016-12-07spdif: Convert to PD API version 3.Uwe Hermann
2016-05-15Use consistent __init__() format across all PDs.Uwe Hermann
The previous **kwargs some PDs had is not actually ever used, so drop it.
2015-04-07Fix a bunch of typos.Uwe Hermann
2014-09-10Various PDs: Whitespace, cosmetics.Uwe Hermann
2014-08-30spdif: Simplify get_pulse_type() a bit.Uwe Hermann
2014-08-30spdif: Use strings for decoder states.Uwe Hermann
2014-08-30spdif: Add another annotation helper.Uwe Hermann
2014-08-30spdif: Refactor and reduce nesting level.Uwe Hermann
2014-08-30Add initial S/PDIF decoder.Guenther Wenninger