The state of DSP functionality on the Linux Desktop is not good. What can we do? #8609
Replies: 4 comments 3 replies
-
I'll give some comments inline, that being said there are some difficulties around FW code signing, 3rd party processing IP and proprietary compilers that make it more difficult to get involved than other FW projects or to freely share binaries on Linux.
Upstream and available today. Topologies using most of the upstream modules are in production today on Chrome.
More than happy to accept code for codecs upstream where legally permitted.
Main reason is most of the codec/algo IP that can run on the xtensa DSP is not opensource and is proprietary. This is fine for Chrome/Windows, but not possible on Linux.
Please do raise bugs in sof-docs for anything that is unclear or ambiguous, most of the community are experienced SOF developers so we may not see any missing detail in the docs. There are 2 ways to get involved and add more pre/post processing today if you do have time to contribute
@singalsu is adding more offloaded pre/post processing for Linux in v2.9 (end of March), he should be able to share his topologies soon. |
Beta Was this translation helpful? Give feedback.
-
Yes, providing it is upstream quality, fast on target DSPs, passes CI, passes fuzzing and Opus is fully patent/license free.
SOF can use 2 RTOSes today 1) xtos, original RTOS on xtensa only arch, 2) Zephyr - can run on multiple architectures including host PC as application. Btw, there are other things that also need work on Linux that are less complex than algorithms/codecs. e.g.
Today there are quote a lot of processing modules that would benefit from nice userspace UI information/controls/tuning. |
Beta Was this translation helpful? Give feedback.
-
To be clearer, it's not a one-time code import. Such libraries would need a clear long-term maintenance plan to deal with vulnerabilities or broken streams. |
Beta Was this translation helpful? Give feedback.
-
After doing some research, these codecs seem to be legally free of restrictions for SOF, while still having enough usage to justify an implementation:
The only missing codec would be AAC, which unfortunately offers no open-source friendly licensing. Obviously, proper legal research (not mine) would have to be made to confirm the suitability of these codecs. If there's developer interest, these seem to be good candidates for implementation into SOF. |
Beta Was this translation helpful? Give feedback.
-
Note: For this discussion, "Linux Desktop" refers to traditional Linux distributions which share the general APIs, projects and components belonging to freedesktop.org (Ubuntu, Fedora Workstation, RHEL Workstation, etc.). ChromeOS is not included.
Hey everyone. Long time lurker, but first time interacting with development here directly.
So, I've recently been looking at the state of media offloading in the Linux desktop ecosystem and trying to diagnose (and potentially fix) shortcomings with offloading/hardware acceleration stacks in Linux. This started with the most common part, video codec acceleration, where I made some discoveries (most notably, programs not using existing JPEG hardware decoding capabilities for webcams, increasing power consumption unnecessarily). Now, I'm looking into audio DSPs, which lead me to SOF.
Newish Intel and AMD platforms include a DSP, whose functionality is implemented in Linux by SOF. Unfortunately, the drivers, firmware and topologies SOF provides for these "PC platforms" is extremely limited and, to my understanding, provides little to no signal processing.
According to Intel's PCH datasheet for Raptor Lake, its DSP is capable of a wide range of functionality, such as post-processing, voice recognition, miscellaneous sensor/communication offloading and audio codec offloading.
Unfortunately, most of these features appear to be missing in action for intel avs topologies and firmware. The DSP has no functionality outside of basic DMIC recording, audio buffer passthrough (no actual processing done to audio), and very recently, bluetooth audio offload.
Linux's audio drivers have been traditionally subpar for PCs. Although the sound stack is great, drivers for PC audio are limited and lack a lot of functionality. This is also the case with SOF's implementation of intel/amd platforms, where enablement is limited "making audio playback and recording work". As hardware vendors and third-parties start putting additional effort on Linux, especially in its graphics and power management stack, I believe it's time to consider giving PC audio some much needed love.
First of all, what's the state of DSP functionality in Intel and AMD platforms? Are there any plans for implementing any of the following functionalities?
If not, what's blocking these functionalities? Is this a 3rd party IP/licensing issue? Lack of interest? Something else? SOF's architecture is capable of implementing the functionalities I mentioned (done for some non-PC platforms), so I'm guessing there's a specific reason here.
SOF documentation has been pretty confusing for me, so I might have a few details wrong. If I'm misunderstanding something, please steer me in the right direction.
Beta Was this translation helpful? Give feedback.
All reactions