Bug 300 - Sample rate must be rechecked after acquisition
Summary: Sample rate must be rechecked after acquisition
Alias: None
Product: PulseView
Classification: Unclassified
Component: Acquisition (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: PulseView 0.3.0
Assignee: Nobody
Depends on:
Reported: 2014-01-29 22:44 CET by Bert Vermeulen
Modified: 2015-06-28 20:37 CEST (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
Description Bert Vermeulen 2014-01-29 22:44:30 CET
When setting the sample rate, the driver may find it can't set that exact rate in hardware, and set it to some close value instead.

This is the case with the OLS, where the divider sometimes ends up changing the real rate. The driver notices this of course, and logs it:

sr: ols: Can't match samplerate 300000, using 300300.

It also set the internal samplerate to the corrected value.

Another case may be where the clock rate on which the sample rate is based is not an even number, and the reported samplerates are rounded off in order to "look nice". This would cause the driver to correct the sample rate every time.

In any case, by using the set samplerate to populate the time bar on samples, the wrong time stamps may be shown.

PV needs to either query the sample rate after setting it (overkill) or once after the capture, to use for the time bar.