Bug 300

Summary: Sample rate must be rechecked after acquisition
Product: PulseView Reporter: Bert Vermeulen <bert>
Component: AcquisitionAssignee: Nobody <nobody>
Status: CONFIRMED ---    
Severity: normal CC: joel
Priority: Normal    
Version: unreleased development snapshot   
Target Milestone: PulseView 0.3.0   
Hardware: All   
OS: All   

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.