[Feature request] Encoded content passthrough
Scope
Add support for encoded content passthrough. At the moment it's relevant mostly for Bluetooth headphones, in future when WiFi headphones and Miracast displays will be supported, it can be used for those as well.
Issue
At the moment browser or any other client decodes audio content and then PipeWire sends it to headphones, while headphones might support the same format and PipeWire will encode audio back into that format.
Proposal
Add codec negotiation to the protocol for native PipeWire clients. Supporting clients will be able to detect codecs supported by sink and send encoded content to PipeWire without extra decoding/encoding load.
Example (browser is streaming AAC encoded music):
Client | Daemon |
---|---|
Which codecs are available for current sink? | plain, SBC, AAC, aptX, LDAC |
Set output codec: AAC | done |
<sends AAC content> | <passes it to Bluetooth without re-encoding> |
Benefits
- Higher audio quality (no extra lossy codec)
- Lower latency
- Lower CPU load
- Lower power consumption