EVL: CLOCK_MONOTONIC_RAW
Jesus Villena <[email protected]>
| Newsgroups | dev.linux.lists.xenomai |
|---|---|
| Message-ID | <AS8PR10MB773133A184BDFE3CC57D8DA1F93F2@AS8PR10MB7731.EURPRD10.PROD.OUTLOOK.COM> |
Hello,
I have some problems with audio synchronization algorithms running in a real-time EVL thread when using NTP at the same time in other inband threads, because they use an EVL_CLOCK_MONOTONIC clock to measure time differences and to implement internal time corrections (in nanoseconds resolution).
I think the reason is because EVL_CLOCK_MONOTONIC is based in the CLOCK_MONOTONIC linux clock (ktime_get() kernel call), and it's known that it suffers from NTP frequency adjustments:
CLOCK_MONOTONIC never experiences discontinuities due to NTP time adjustments, but it does change in frequency as NTP learns what error exists between the local oscillator and the upstream servers.
In Linux, typical audio synchronization algorithms recommend to use the CLOCK_MONOTONIC_RAW instead (ktime_get_raw() kernel call):
CLOCK_MONOTONIC_RAW is simply the local oscillator, not disciplined by NTP. This could be very useful if you want to implement some other time synchronization algorithm against a clock which is not fighting you due to NTP.
However, EVL doesn't have an EVL_CLOCK_MONOTONIC_RAW clock available in an out-of-band context.
Could you please add a new EVL_CLOCK_MONOTONIC_RAW to EVL in order to get the correct behavior on these scenarios?
Best regard
---
Jesus.
Jesus Villena
Software Engineer
607198846 / 3025
[Ecler] <https://www.ecler.com>
Neec Audio Barcelona SL
Carrer dels Motors, 166-168
08038 Barcelona
ES
www.ecler.com <https://www.ecler.com/es/>
[Twitter] <https://twitter.com/eclerofficial> [Facebook] <https://www.facebook.com/ecler/> [LinkedIn] <https://www.linkedin.com/company/ecler/> [YouTube] <https://www.youtube.com/ECLER> [Ecler Brochure ISE 2026] <https://media.ecler.com/1768915806-ecler-brochure-ise-2026.pdf>
Your data processing is under the responsability of the company NEEC AUDIO BARCELONA, S.L. registered in Barcelona, Calle Motors 166-168, VAT number B-55210645, telephone number 93.223.84.00, and e-mail address [email protected]. The aim of the data processing is to forward news bulletins and these data will be stored as long as unsubscribing from the newsletter is not requested. The legal basis for the data processing is consent. Data will not be handed over to third parties with the exception of being authorized by the person concerned or under legal requirement. You have the right to obtain confirmation on whether data are being processed by NEEC AUDIO BARCELONA, S.L. , as well as the access, amendment of incorrect data, or the request of deletion when, for instance, the data are no longer needed towards the aim for which they were collected. Under certain circumstances, you will be able to request the restraint of data processing and data will only be stored in order to lodge or argue a complaint. Under certain circumstances, you could object to your personal data processing and NEEC AUDIO BARCELONA, S.L. shall cease to process them, unless there are legal and imperative requirements or the lodge or arguing of prospective complaints. In addition, you can review our full Privacy Policy at https://www.ecler.com/en/privacy-policy/