From Fedora Project Wiki
(Created page with "{{admon/important | Comments and Explanations | The page source contains comments providing guidance to fill out each section. They are invisible when viewing this page. To re...")
 
No edit summary
Line 1: Line 1:
{{admon/important | Comments and Explanations | The page source contains comments providing guidance to fill out each section. They are invisible when viewing this page. To read it, choose the "view source" link.<br/> '''Copy the source to a ''new page'' before making changes!  DO NOT EDIT THIS TEMPLATE FOR YOUR CHANGE PROPOSAL.'''}}
{{admon/tip | Guidance | For details on how to fill out this form, see the [https://docs.fedoraproject.org/en-US/program_management/changes_guide/ documentation].}}
{{admon/tip | Guidance | For details on how to fill out this form, see the [https://docs.fedoraproject.org/en-US/program_management/changes_guide/ documentation].}}


<!-- The actual name of your proposed change page should look something like: Changes/Your_Change_Proposal_Name.  This keeps all change proposals in the same namespace -->
<!-- The actual name of your proposed change page should look something like: Changes/Your_Change_Proposal_Name.  This keeps all change proposals in the same namespace -->


= Change Proposal Name <!-- The name of your change proposal --> =
= Route all Audio to PipeWire<!-- The name of your change proposal --> =


== Summary ==
== Summary ==
<!-- A sentence or two summarizing what this change is and what it will do. This information is used for the overall changeset summary page for each release.  
<!-- A sentence or two summarizing what this change is and what it will do. This information is used for the overall changeset summary page for each release.  
Note that motivation for the change should be in the Benefit to Fedora section below, and this part should answer the question "What?" rather than "Why?". -->
Note that motivation for the change should be in the Benefit to Fedora section below, and this part should answer the question "What?" rather than "Why?". -->
This change proposal is to route all audio from PulseAudio and JACK to the PipeWire Audio
daemon by default.


== Owner ==
== Owner ==
Line 16: Line 16:
This should link to your home wiki page so we know who you are.  
This should link to your home wiki page so we know who you are.  
-->
-->
* Name: [[User:FASAcountName| Your Name]]
* Name: [[User:Wtaymans| Wim Taymans]]
<!-- Include you email address that you can be reached should people want to contact you about helping with your change, status is requested, or technical issues need to be resolved. If the change proposal is owned by a SIG, please also add a primary contact person. -->
<!-- Include you email address that you can be reached should people want to contact you about helping with your change, status is requested, or technical issues need to be resolved. If the change proposal is owned by a SIG, please also add a primary contact person. -->
* Email: <your email address so we can contact you, invite you to meetings, etc. Please provide your Bugzilla email address if it is different from your email in FAS>
* Email: wim.taymans@gmail.com
<!--- UNCOMMENT only for Changes with assigned Shepherd (by FESCo)
<!--- UNCOMMENT only for Changes with assigned Shepherd (by FESCo)
* FESCo shepherd: [[User:FASAccountName| Shehperd name]] <email address>
* FESCo shepherd: [[User:FASAccountName| Shehperd name]] <email address>
Line 35: Line 35:


<!-- Select proper category, default is Self Contained Change -->
<!-- Select proper category, default is Self Contained Change -->
[[Category:SelfContainedChange]]
<!-- [[Category:SelfContainedChange]] -->
<!-- [[Category:SystemWideChange]] -->
[[Category:SystemWideChange]]


* Targeted release: [[Releases/<number> | Fedora <number> ]]  
* Targeted release: [[Releases/34 | Fedora 34 ]]  
* Last updated: <!-- this is an automatic macro — you don't need to change this line -->  {{REVISIONYEAR}}-{{REVISIONMONTH}}-{{REVISIONDAY2}}  
* Last updated: <!-- this is an automatic macro — you don't need to change this line -->  {{REVISIONYEAR}}-{{REVISIONMONTH}}-{{REVISIONDAY2}}  
<!-- After the change proposal is accepted by FESCo, tracking bug is created in Bugzilla and linked to this page  
<!-- After the change proposal is accepted by FESCo, tracking bug is created in Bugzilla and linked to this page  
Line 54: Line 54:


<!-- Expand on the summary, if appropriate.  A couple sentences suffices to explain the goal, but the more details you can provide the better. -->
<!-- Expand on the summary, if appropriate.  A couple sentences suffices to explain the goal, but the more details you can provide the better. -->
Currently, all desktop audio is handled by the PulseAudio daemon. Applications make use of the
PulseAudio client library to communicate with the PulseAudio daemon that mixes and manages the
audio streams from the clients.
The desktop shell (gnome-shell) and the control panel (gnome-control-panel) both use the
Pulseaudio client libraries to manage the volume and configuration of the PulseAudio daemon.
This proposal is to replace the PulseAudio daemon with a functionally compatible implementation
based on PipeWire. This means that all existing clients using the PulseAudio client library
will continue to work as before, as well as applications shipped as Flatpak.
All PRO audio is handled with the JACK client library, which talks to the JACK server. This
proposal will install a JACK client library replacement that talks directly to PipeWire. All
existing PRO audio jack applications will then work on top of PipeWire.
For legacy ALSA clients, we will install an ALSA plugin that routes the audio directly to
PipeWire.
With these 3 changes, all audio will be routed to PipeWire. There will then be no more need to
install the PulseAudio and JACK daemons.


== Feedback ==
== Feedback ==


<!-- Summarize the feedback from the community and address why you chose not to accept proposed alternatives. This section is optional for all change proposals but is strongly suggested. Incorporating feedback here as it is raised gives FESCo a clearer view of your proposal and leaves a good record for the future. If you get no feedback, that is useful to note in this section as well. For innovative or possibly controversial ideas, consider collecting feedback before you file the change proposal. -->
<!-- Summarize the feedback from the community and address why you chose not to accept proposed alternatives. This section is optional for all change proposals but is strongly suggested. Incorporating feedback here as it is raised gives FESCo a clearer view of your proposal and leaves a good record for the future. If you get no feedback, that is useful to note in this section as well. For innovative or possibly controversial ideas, consider collecting feedback before you file the change proposal. -->
The owner of this proposal has been in context with both the PulseAudio and JACK maintainers and community.
PipeWire is considered to be the successor of both projects.


== Benefit to Fedora ==
== Benefit to Fedora ==
Line 88: Line 112:
     https://fedoraproject.org/wiki/Changes/perl5.26 (major upgrade to a popular software stack, visible to users of that stack)
     https://fedoraproject.org/wiki/Changes/perl5.26 (major upgrade to a popular software stack, visible to users of that stack)
-->
-->
Some of the benefits that PipeWire will bring:
* PRO Audio features
  PipeWire can support both Desktop and PRO Audio use cases. PRO Audio application tend to use
  the JACK API and JACK daemon, which is hard to setup and integrates poorly with the rest of
  the system (and PulseAudio in particular).
  With a replacement libjack library, PRO Audio application can run directly on PipeWire and
  integrate seamlessly with other ALSA and PulseAudio applications. This would bring Fedora
  closer to the experience of other operating systems.
* Flexibility/Integration
 
  PipeWire is designed to be multiprocess. It separates the processing of the multimedia graph
  and the management into separate processes. This makes it possible to better integrate with
  the other system components or swap out the default policy for a highly customized one (such as
  for automotive or embedded). This is in contrast to PulseAudio, which has all logic embedded
  into the daemon with limited configuration options.
* Performance
 
  PipeWire was designed for high performance and low-latency, using much of the same design as
  JACK. JACK application should run with comparable performance even in low-latency situations.
* Security
  PipeWire has enforces per client security. Object visibility and the actions on them can be
  configured independently per client. This makes it possible to enforce a security policy for
  sandboxes applications (Flatpak) such as denying access to certain audio capture devices or
  block them from interfering with other applications.
* Maintainability
  Both PulseAudio and JACK have very slow development cycles with few new features. The more
  flexible and distributed nature of the design of PipeWire should encourage more new features
  and use-cases.


== Scope ==
== Scope ==
Line 93: Line 155:
<!-- What work do the feature owners have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
<!-- What work do the feature owners have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->


* Other developers: N/A (not a System Wide Change) <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
We would make a pipewire-pulse package that provides the same features as the pulseaudio (daemon) package.
We would only provide a drop-in replacement daemon, the pulseaudio client libraries will remain unchanged.
 
The idea is that when installing pipewire-pulse, only the pulseaudio package is removed and replaced by the
pipewire-pulse implementation. In the same way, installing the pulseaudio package would remove the pipewire-pulse
package, making it possible to switch between implementations.
 
We also need to check and correct the dependencies of other packages. As of this writing, some packages do
not state their dependencies correctly and get removed when pulseaudio is removed. We also need to check the
JACK to make sure they still install with the replacement JACK client libary.
 
The JACK client libraries will be installed in the same way, removing the old JACK client libraries.
 
* Other developers: <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- What work do other developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
<!-- What work do other developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
The distribution needs to default to the pipewire-pulse package instead of pulseaudio.
JACK applications need to install the pipewire-libjack client library.


* Release engineering: [https://pagure.io/releng/issues #Releng issue number] (a check of an impact with Release Engineering is needed) <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Release engineering: [https://pagure.io/releng/issues #Releng issue number] (a check of an impact with Release Engineering is needed) <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
Line 100: Line 179:
The issue is required to be filed prior to feature submission, to ensure that someone is on board to do any process development work and testing and that all changes make it into the pipeline; a bullet point in a change is not sufficient communication -->
The issue is required to be filed prior to feature submission, to ensure that someone is on board to do any process development work and testing and that all changes make it into the pipeline; a bullet point in a change is not sufficient communication -->


* Policies and guidelines: N/A (not a System Wide Change) <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
The distribution needs to default to the pipewire-pulse package instead of pulseaudio.
 
JACK applications need to install the pipewire-libjack client library.
 
* Policies and guidelines: <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
<!-- Do the packaging guidelines or other documents need to be updated for this feature?  If so, does it need to happen before or after the implementation is done?  If a FPC ticket exists, add a link here. -->
<!-- Do the packaging guidelines or other documents need to be updated for this feature?  If so, does it need to happen before or after the implementation is done?  If a FPC ticket exists, add a link here. -->


Line 108: Line 191:
* Alignment with Objectives:  
* Alignment with Objectives:  
<!-- Does your proposal align with the current Fedora Objectives: https://docs.fedoraproject.org/en-US/project/objectives/ ? It's okay if it doesn't, but it's something to consider -->
<!-- Does your proposal align with the current Fedora Objectives: https://docs.fedoraproject.org/en-US/project/objectives/ ? It's okay if it doesn't, but it's something to consider -->


== Upgrade/compatibility impact ==
== Upgrade/compatibility impact ==
<!-- What happens to systems that have had a previous versions of Fedora installed and are updated to the version containing this change? Will anything require manual configuration or data migration? Will any existing functionality be no longer supported? -->
<!-- What happens to systems that have had a previous versions of Fedora installed and are updated to the version containing this change? Will anything require manual configuration or data migration? Will any existing functionality be no longer supported? -->


<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
The pulseaudio package will be uninstalled and pipewire-pulse will be installed.
N/A (not a System Wide Change)
 
pipewire-pulse does not yet implement all the features of pulseaudio but it is expected that
comparable functionality will be implemented later. Most notable features that are likely
not going to be available for fedora 34
 
* avahi network discovery and audio routing. This is not enabled by default but can be activated
  with paprefs. this includes TCP and RTP transport of audio.
* make devices available as UPNP media servers. Not enabled by default, paprefs can be used.
* easy configuration of combining all sinks. Questionable feature but possible via paprefs.
 
User scripts will still work but custom configurations of the pulseaudio daemon will not be used
anymore.
 
Most of the JACK workflow of managing the JACK daemon is not going to be needed anymore as things
will work out-of-the-box. As of this writing, these things are missing from the JACK implementation,
we hope to implement them before fedora 34:
 
* latency reporting: useful to align streams
* freewheeling: used when rendering a project
* jackdbus: used by some tools to manage the graph
 


== How To Test ==
== How To Test ==
Line 130: Line 234:
-->
-->


<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
This change needs to be tested on as many different audio cards as possible. The same test plan
N/A (not a System Wide Change)
applies here as with PulseAudio.
 
To test, one needs to install the pipewire-pulse library (which removes the pulseaudio package).
After this change, a restart is needed to make sure the new pipewire-pulse daemon is running.
 
Audio functionality should be like it was before with the Pulseaudio daemon. Some things to verify:
 
- patcl info should now list: Server Name: PulseAudio (on PipeWire 0.3.x)
- gnome-control-center: check the audio tab, check the volume sliders and do the audio channel
                        test. Change the card profile, plug/unplug headphones and observe correct
                        switch.
- pavucontrol: check volumes in the input devices tabs and check the microphone volumes
- firefox: check out a website with audio/video such as youtube and verify that audio works as
            usual. Check out a website with a video chat test page (bluejeans.com/111).
- rhythmbox: check if playback works as expected
- bluetooth devices, connect as usual and verify working behaviour with PipeWire. Check volume
                      changes etc.
- Regular system usage and performance should not change.
- JACK tools such as catia, carla should run and can be used to inspect the graph.
 


== User Experience ==
== User Experience ==
Line 144: Line 267:
  - Green has been scientifically proven to be the most relaxing color. The move to a default background color of green with green text will result in Fedora users being the most relaxed users of any operating system.
  - Green has been scientifically proven to be the most relaxing color. The move to a default background color of green with green text will result in Fedora users being the most relaxed users of any operating system.
-->
-->
In general, users should not be able to see any change when using PulseAudio applications.
The big change is when using JACK application:
- They will start without having to configure and start the daemon. this includes
  the period size and sample rates.
- All devices will be visible in the graph with meaningful names. Devices will
  be automatically slaved when needed without needing any configuration.
- bluetooth devices will be usable as well.


== Dependencies ==
== Dependencies ==
<!-- What other packages (RPMs) depend on this package?  Are there changes outside the developers' control on which completion of this change depends?  In other words, completion of another change owned by someone else and might cause you to not be able to finish on time or that you would need to coordinate?  Other upstream projects like the kernel (if this is not a kernel change)? -->
<!-- What other packages (RPMs) depend on this package?  Are there changes outside the developers' control on which completion of this change depends?  In other words, completion of another change owned by someone else and might cause you to not be able to finish on time or that you would need to coordinate?  Other upstream projects like the kernel (if this is not a kernel change)? -->


<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
Other packages might need to have their requirements fixed to work with the replacement packages
N/A (not a System Wide Change)
but this is under our control.


== Contingency Plan ==
== Contingency Plan ==


<!-- If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "Revert the shipped configuration".  Or it might not (e.g. rebuilding a number of dependent packages).  If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy.  -->
<!-- If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "Revert the shipped configuration".  Or it might not (e.g. rebuilding a number of dependent packages).  If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy.  -->
* Contingency mechanism: (What to do?  Who will do it?) N/A (not a System Wide Change)  <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Contingency mechanism: Keep existing pulseaudio and JACK client libraries as defaults
<!-- When is the last time the contingency mechanism can be put in place?  This will typically be the beta freeze. -->
<!-- When is the last time the contingency mechanism can be put in place?  This will typically be the beta freeze. -->
* Contingency deadline: N/A (not a System Wide Change)  <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Contingency deadline: beta freeze
<!-- Does finishing this feature block the release, or can we ship with the feature in incomplete state? -->
<!-- Does finishing this feature block the release, or can we ship with the feature in incomplete state? -->
* Blocks release? N/A (not a System Wide Change), Yes/No <!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
* Blocks release? No
* Blocks product? product <!-- Applicable for Changes that blocks specific product release/Fedora.next -->
* Blocks product? No
 


== Documentation ==
== Documentation ==
<!-- Is there upstream documentation on this change, or notes you have written yourself?  Link to that material here so other interested developers can get involved. -->
<!-- Is there upstream documentation on this change, or notes you have written yourself?  Link to that material here so other interested developers can get involved. -->


<!-- REQUIRED FOR SYSTEM WIDE CHANGES -->
[https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/INSTALL.md](install guide)
N/A (not a System Wide Change)  
[https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/README.md](how to use/test)


== Release Notes ==
== Release Notes ==

Revision as of 10:32, 18 November 2020

Idea.png
Guidance
For details on how to fill out this form, see the documentation.


Route all Audio to PipeWire

Summary

This change proposal is to route all audio from PulseAudio and JACK to the PipeWire Audio daemon by default.

Owner

Current status

  • Targeted release: Fedora 34
  • Last updated: 2020-11-18
  • FESCo issue: <will be assigned by the Wrangler>
  • Tracker bug: <will be assigned by the Wrangler>
  • Release notes tracker: <will be assigned by the Wrangler>

Detailed Description

Currently, all desktop audio is handled by the PulseAudio daemon. Applications make use of the PulseAudio client library to communicate with the PulseAudio daemon that mixes and manages the audio streams from the clients.

The desktop shell (gnome-shell) and the control panel (gnome-control-panel) both use the Pulseaudio client libraries to manage the volume and configuration of the PulseAudio daemon.

This proposal is to replace the PulseAudio daemon with a functionally compatible implementation based on PipeWire. This means that all existing clients using the PulseAudio client library will continue to work as before, as well as applications shipped as Flatpak.

All PRO audio is handled with the JACK client library, which talks to the JACK server. This proposal will install a JACK client library replacement that talks directly to PipeWire. All existing PRO audio jack applications will then work on top of PipeWire.

For legacy ALSA clients, we will install an ALSA plugin that routes the audio directly to PipeWire.

With these 3 changes, all audio will be routed to PipeWire. There will then be no more need to install the PulseAudio and JACK daemons.

Feedback

The owner of this proposal has been in context with both the PulseAudio and JACK maintainers and community. PipeWire is considered to be the successor of both projects.

Benefit to Fedora

Some of the benefits that PipeWire will bring:

* PRO Audio features
  PipeWire can support both Desktop and PRO Audio use cases. PRO Audio application tend to use
  the JACK API and JACK daemon, which is hard to setup and integrates poorly with the rest of
  the system (and PulseAudio in particular). 
  With a replacement libjack library, PRO Audio application can run directly on PipeWire and
  integrate seamlessly with other ALSA and PulseAudio applications. This would bring Fedora
  closer to the experience of other operating systems.
* Flexibility/Integration
 
  PipeWire is designed to be multiprocess. It separates the processing of the multimedia graph
  and the management into separate processes. This makes it possible to better integrate with
  the other system components or swap out the default policy for a highly customized one (such as
  for automotive or embedded). This is in contrast to PulseAudio, which has all logic embedded
  into the daemon with limited configuration options.
* Performance
 
  PipeWire was designed for high performance and low-latency, using much of the same design as
  JACK. JACK application should run with comparable performance even in low-latency situations.
* Security
  PipeWire has enforces per client security. Object visibility and the actions on them can be
  configured independently per client. This makes it possible to enforce a security policy for
  sandboxes applications (Flatpak) such as denying access to certain audio capture devices or
  block them from interfering with other applications.
* Maintainability
  Both PulseAudio and JACK have very slow development cycles with few new features. The more
  flexible and distributed nature of the design of PipeWire should encourage more new features
  and use-cases. 

Scope

  • Proposal owners:

We would make a pipewire-pulse package that provides the same features as the pulseaudio (daemon) package. We would only provide a drop-in replacement daemon, the pulseaudio client libraries will remain unchanged.

The idea is that when installing pipewire-pulse, only the pulseaudio package is removed and replaced by the pipewire-pulse implementation. In the same way, installing the pulseaudio package would remove the pipewire-pulse package, making it possible to switch between implementations.

We also need to check and correct the dependencies of other packages. As of this writing, some packages do not state their dependencies correctly and get removed when pulseaudio is removed. We also need to check the JACK to make sure they still install with the replacement JACK client libary.

The JACK client libraries will be installed in the same way, removing the old JACK client libraries.

  • Other developers:

The distribution needs to default to the pipewire-pulse package instead of pulseaudio.

JACK applications need to install the pipewire-libjack client library.

The distribution needs to default to the pipewire-pulse package instead of pulseaudio.

JACK applications need to install the pipewire-libjack client library.

  • Policies and guidelines:
  • Trademark approval: N/A (not needed for this Change)
  • Alignment with Objectives:


Upgrade/compatibility impact

The pulseaudio package will be uninstalled and pipewire-pulse will be installed.

pipewire-pulse does not yet implement all the features of pulseaudio but it is expected that comparable functionality will be implemented later. Most notable features that are likely not going to be available for fedora 34

* avahi network discovery and audio routing. This is not enabled by default but can be activated
  with paprefs. this includes TCP and RTP transport of audio.
* make devices available as UPNP media servers. Not enabled by default, paprefs can be used.
* easy configuration of combining all sinks. Questionable feature but possible via paprefs.

User scripts will still work but custom configurations of the pulseaudio daemon will not be used anymore.

Most of the JACK workflow of managing the JACK daemon is not going to be needed anymore as things will work out-of-the-box. As of this writing, these things are missing from the JACK implementation, we hope to implement them before fedora 34:

* latency reporting: useful to align streams
* freewheeling: used when rendering a project
* jackdbus: used by some tools to manage the graph


How To Test

This change needs to be tested on as many different audio cards as possible. The same test plan applies here as with PulseAudio.

To test, one needs to install the pipewire-pulse library (which removes the pulseaudio package). After this change, a restart is needed to make sure the new pipewire-pulse daemon is running.

Audio functionality should be like it was before with the Pulseaudio daemon. Some things to verify:

- patcl info should now list: Server Name: PulseAudio (on PipeWire 0.3.x)
- gnome-control-center: check the audio tab, check the volume sliders and do the audio channel
                        test. Change the card profile, plug/unplug headphones and observe correct
                        switch.
- pavucontrol: check volumes in the input devices tabs and check the microphone volumes
- firefox: check out a website with audio/video such as youtube and verify that audio works as
           usual. Check out a website with a video chat test page (bluejeans.com/111).
- rhythmbox: check if playback works as expected
- bluetooth devices, connect as usual and verify working behaviour with PipeWire. Check volume
                     changes etc.
- Regular system usage and performance should not change.
- JACK tools such as catia, carla should run and can be used to inspect the graph.


User Experience

In general, users should not be able to see any change when using PulseAudio applications.

The big change is when using JACK application:

- They will start without having to configure and start the daemon. this includes
  the period size and sample rates.
- All devices will be visible in the graph with meaningful names. Devices will
  be automatically slaved when needed without needing any configuration.
- bluetooth devices will be usable as well.

Dependencies

Other packages might need to have their requirements fixed to work with the replacement packages but this is under our control.

Contingency Plan

  • Contingency mechanism: Keep existing pulseaudio and JACK client libraries as defaults
  • Contingency deadline: beta freeze
  • Blocks release? No
  • Blocks product? No


Documentation

[1](install guide) [2](how to use/test)

Release Notes