-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FreeBSD: Rewrite OSS backend, introduce sosso library #943
base: develop
Are you sure you want to change the base?
Conversation
Ping! @falkTX, should I just merge this if you don't have time for a review? It's only relevant to FreeBSD. |
it has been on my mind for a while, reviewing this before a release. give me a bit more time please, the changeset is not that small |
That's fine with me, take your time and thanks for looking into it - would be nice though to have a small window before release to fix any issues, like a week in advance. It's quite a lot of changes and I'd appreciate your review. Maybe you want to concentrate on the second commit with all the |
Force push added some missing mutex unlocks, fixes a hangup after IO errors. |
Hey, I missed the anniversary on this PR - happy birthday! ;-) @falkTX: Any realistic chance of a release in the near future? I don't want to put pressure on you, just a statement so I can adjust my plans. This has to go into FreeBSD ports some way or the other, and I'll temporarily switch port sources to my own repo to include it, if needed. |
As a header-only C++ library, synced OSS operation (sosso) is used to clean up and separate the low-level handling of FreeBSD OSS devices in JACK. Features include: * Supports both read() / write() and mmap() IO operation. * Adaptive polling, better suited for low-latency requirements. * Internal double buffer to avoid troubles with OSS buffer resize. * Closely monitors progress and drift for each channel (+/- 1ms). * Facilitates drift correction through buffer offsets. * Depends on C++ standard library and system headers, nothing else. Although the sosso library is somewhat tailored to the needs of JACK, it was developed separately and will eventually be published and / or used in other projects. Therefore the headers follow a different formatting style and are more liberally licensed (ISC).
Make use of the sosso library to handle the low-level operation of OSS devices on FreeBSD. Further separate this part into the JackOSSChannel class, which should make it easier to reuse the code for JackOSSAdapter (not planned yet). JackOSSChannel features an additional assist thread which helps to process the OSS device when the driver thread is busy with the JACK dependency graph. Combined with the improvements of the sosso library, these changes bring JACK into the realm of real-time audio processing on FreeBSD, for select PCI sound cards (4-6ms round trip latency).
realistically september, finally got a home of my own but was in the middle of 2 other trips so a lot of stuff stopped while I focus on more personal / life things. |
Just did a rebase on the HEAD of current develop branch, no changes to my commits. September is fine, I may try to offer this as a build option in FreeBSD ports. Congrats to you for your own home, enjoy! |
This is a complete rewrite of the OSS backend for FreeBSD - none of this
affects other systems or touches code outside of the
freebsd
directory.Main motivation was to make better use of my RME RayDAT PCIe sound
card and its low-latency capabilities. This endeavor quickly escalated into
separate testing programs and then a C++ header-only library to manage
OSS channels. The result of which is hereby used to implement the
FreeBSD OSS backend of JACK, bringing some substantial improvements
over the old code.
The synced OSS operation (sosso) library
As a header-only C++ library, synced OSS operation (sosso) is used to
clean up and separate the low-level handling of FreeBSD OSS devices
in JACK. Features include:
Although the sosso library is somewhat tailored to the needs of JACK,
it was developed separately and will eventually be published and / or
used in other projects. Therefore the headers follow a different
formatting style and are more liberally licensed (ISC).
Rewrite the OSS backend using the sosso library
Make use of the sosso library to handle the low-level operation of
OSS devices on FreeBSD. Further separate this part into the
JackOSSChannel class, which should make it easier to reuse the code
for JackOSSAdapter (not planned yet).
JackOSSChannel features an additional assist thread which helps to
process the OSS device when the driver thread is busy with the JACK
dependency graph.
Combined with the improvements of the sosso library, these changes
bring JACK into the realm of real-time audio processing on FreeBSD,
for select PCI sound cards (4-6ms round trip latency).