SlideShare une entreprise Scribd logo
1  sur  29
Télécharger pour lire hors ligne
Open FirstOpen First
PipeWire: a new foundation for
the embedded multimedia
Julian Bouzas
Multimedia Software Engineer
2
What is PipeWire?
3
Fresh multimedia framework for linux
●
Written by Wim Taymans (creator of PulseAudio)
●
Daemon that handles both audio and video devices
●
Handles format conversion, mixing, and re-position
●
Pipeline Based Design
●
Security Permissions
●
Like PulseAudio, but for video Video as well
4
PipeWire
●
Initial idea: PulseAudio for video (PulseVideo)
●
Now: generic multimedia platform service
– Video capture server
●
Camera and other video sources (ex. gnome-shell screencast)
– Audio server
●
PulseAudio and JACK (pro-audio) replacement
●
Borrowing ideas also from CoreAudio, AudioFlinger, and others…
5
The Multimedia Stack
7
External PipeWire Session Manager
●
Setup of devices
– Format
– Mixers
– Effects
●
Creation of links and nodes
●
Grants security and access control of clients
●
Prioritize Devices – Policy (User Specific)
8
Security
●
Fine-grained object access controls per client
– Visible, Read data (R)
– Write data (W)
– Execute methods (X)
●
Each client can be made to “see” an entirely different graph
●
Session manager applies permissions
9
Design
● Modules and Plugins
● Plugins based on SPA (Simple Plugin API)
– Header-only C library with zero dependencies
– Extremely lightweight data structures
– “Like Glib, but not so heavy” - Wim Tayman
10
Performance & Efficiency
● Uses modern linux kernel APIs:
– memfd & dmabuf to zero-copy buffers
– eventfd & timerfd to wake up the processes
● Low-latency real-time capable
– < 1.5 milliseconds possible on desktop
● Much lower CPU usage than PulseAudio
11
CPU Usage Statistics
Playback of a 24bit 96kHz 5.1 channel file, downmixed to 3.1 and resampled to 48kHz
21.33 ms 1.33 ms 2 clients @ 800 MHz
0.7
2.3
2.7
6
% CPU
●
Measurements:
–
21.33 ms (1024 samples / buffer)
–
1.33 ms (64 samples / buffer)
–
1.33 ms with 2 clients
–
1.33 ms with CPU pinned @ 800 MHz
●
Measurements on
Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
●
Comparatively, on 1.33 ms, PulseAudio
uses 100% CPU and fails (underruns)
12
Compatibility APIs
● ALSA apps
– PipeWire PCM plugin
– Built with streams API
● PulseAudio apps
– Replacement libpulse.so, libpulse-mainloop-glib.so
– Built with streams API
● JACK apps
– Replacement libjack.so
– Built on top of low-level PipeWire
13
Who is behind this
● Author: Wim Taymans
– Well-known old GStreamer developer & ex-maintainer
– Sponsored by: Red Hat
● Embraced by PulseAudio developers
– Seen as the next generation of PulseAudio
● Welcomed by ALSA and JACK developers
● License: MIT
14
Status
● Version 0.2 distributed in fedora
– Used for video only
● Version 0.3 to be released soon
– Estimated for later this year
– A lot of audio work & refactoring done
– Bluetooth starting to be fully supported
– Used in AGL (Automotive Grade Linux)
15
PipeWire in AGL
16
PipeWire in Automotive Grade Linux
● Audio system implemented with PipeWire for Connected Cars
– Replaces PulseAudio
– Mixer, Media player & Radio player using the native API
– ALSA compatibility plugin available
● Session manager: WirePlumber
● Merged in Happy Halibut (8.0.0) RC2
● In the future also: video
17
WirePlumber
● First session manager implementation
● Target: reusable session manager for embedded use cases
– we’ll see about desktop…
● Modular & extensible, like PipeWire
● Based on GObject
– To support writing modules using bindings in other languages
18
WirePlumber concepts
● Graph abstraction: Endpoint
– Closer to PulseAudio’s representation (sources, sinks, source-outputs, sink-inputs)
– Described by name & media-class (Audio/Source, Audio/Sink, Stream/Audio/Input,
Stream/Audio/Output)
● Extensibility: Modules & Factories like PipeWire
● Pipewire Proxies and Properties
– GObject-ify the pipewire API (ease of use + access from bindings)
19
Software DSP Endpoint
20
Hardware DSP Endpoint (Unicens)
21
Policy Management
● Decided what app nodes are linked with what device nodes
● Fully configurable with TOML files
● Default Configuration:
– Clients have roles with priorities:
● Multimedia, Navigation, Emergency, ...
– Highest priority wins
– Equal priority: last one wins
– Audio in other apps is automatically paused & restored
22
Other areas needing work
● Finish Bluetooth audio support (planned for AGL 8.0.2)
● Unicens hardware support (planned for AGL 8.0.3)
● Improve API and make it stable
– We are constantly changing it and figuring out what the best API could be
● Better security
– Mechanisms exist but currently all clients are granted full permissions
● Documentation
23
PipeWire Audio Contributions
24
Audio Stream (pw_stream)
●
Nicer than PipeWire low-level API
●
Takes input from client (asynchronously)
●
Does conversion
–
Resampling
–
Channel mixing / volume
–
Format conversion
–
Channel splitting into DSP
–
Decouples server buffer size from client requested latency
●
Flush / drain
25
In GStreamer
●
pipewiresrc / pipwiresink
–
Available upstream
–
Built mainly for video; have issues with audio at the moment
●
pwaudiosrc / pwaudiosink
–
Available in AGL
–
Smooth operation with audio
–
Upstream-Status: Submitted [https://github.com/PipeWire/pipewire/pull/140]
●
All built with the streams API
26
Supported Bluetooth Profiles
●
Only A2DP Sink was included
–
For high quality audio over bluetooth sinks (music - speakers)
●
Included A2DP Source node
–
For high quality audio over bluetooth sources (music - phones)
●
Started including HSP/HFP Sink and Source nodes
–
For comunications (voice – phones)
–
2 Setups: Head Unit, Gateway
27
Showtime
28
Thank you!
29
We are hiring
col.la/careers

Contenu connexe

Tendances

Webアプリ開発向け ゆるふわDocker使いがCloud Naive開発に必要そうなetc.
Webアプリ開発向け ゆるふわDocker使いがCloud Naive開発に必要そうなetc.Webアプリ開発向け ゆるふわDocker使いがCloud Naive開発に必要そうなetc.
Webアプリ開発向け ゆるふわDocker使いがCloud Naive開発に必要そうなetc.YASUKAZU NAGATOMI
 
Security Monitoring with eBPF
Security Monitoring with eBPFSecurity Monitoring with eBPF
Security Monitoring with eBPFAlex Maestretti
 
Control your service resources with systemd
 Control your service resources with systemd  Control your service resources with systemd
Control your service resources with systemd Marian Marinov
 
High-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringHigh-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringScyllaDB
 
L3HA-VRRP-20141201
L3HA-VRRP-20141201L3HA-VRRP-20141201
L3HA-VRRP-20141201Manabu Ori
 
MySQL Monitoring with Zabbix
MySQL Monitoring with ZabbixMySQL Monitoring with Zabbix
MySQL Monitoring with ZabbixFromDual GmbH
 
Nginx internals
Nginx internalsNginx internals
Nginx internalsliqiang xu
 
Debian or Yocto Project? Which is the best for your Embedded Linux project?
Debian or Yocto Project? Which is the best for your Embedded Linux project?Debian or Yocto Project? Which is the best for your Embedded Linux project?
Debian or Yocto Project? Which is the best for your Embedded Linux project?Chris Simmonds
 
The Yocto Project
The Yocto ProjectThe Yocto Project
The Yocto Projectrossburton
 
SR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/StableSR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/Stablejuet-y
 
Analysis of Open-Source Drivers for IEEE 802.11 WLANs
Analysis of Open-Source Drivers for IEEE 802.11 WLANsAnalysis of Open-Source Drivers for IEEE 802.11 WLANs
Analysis of Open-Source Drivers for IEEE 802.11 WLANsDanh Nguyen
 
ProxySQL for MySQL
ProxySQL for MySQLProxySQL for MySQL
ProxySQL for MySQLMydbops
 
오픈스택 멀티노드 설치 후기
오픈스택 멀티노드 설치 후기오픈스택 멀티노드 설치 후기
오픈스택 멀티노드 설치 후기영우 김
 
Label based Mandatory Access Control on PostgreSQL
Label based Mandatory Access Control on PostgreSQLLabel based Mandatory Access Control on PostgreSQL
Label based Mandatory Access Control on PostgreSQLKohei KaiGai
 
NGINX: Basics & Best Practices - EMEA Broadcast
NGINX: Basics & Best Practices - EMEA BroadcastNGINX: Basics & Best Practices - EMEA Broadcast
NGINX: Basics & Best Practices - EMEA BroadcastNGINX, Inc.
 
NGINX: High Performance Load Balancing
NGINX: High Performance Load BalancingNGINX: High Performance Load Balancing
NGINX: High Performance Load BalancingNGINX, Inc.
 
Slab Allocator in Linux Kernel
Slab Allocator in Linux KernelSlab Allocator in Linux Kernel
Slab Allocator in Linux KernelAdrian Huang
 
Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5Chris Simmonds
 
Ninja Build: Simple Guide for Beginners
Ninja Build: Simple Guide for BeginnersNinja Build: Simple Guide for Beginners
Ninja Build: Simple Guide for BeginnersChang W. Doh
 

Tendances (20)

Webアプリ開発向け ゆるふわDocker使いがCloud Naive開発に必要そうなetc.
Webアプリ開発向け ゆるふわDocker使いがCloud Naive開発に必要そうなetc.Webアプリ開発向け ゆるふわDocker使いがCloud Naive開発に必要そうなetc.
Webアプリ開発向け ゆるふわDocker使いがCloud Naive開発に必要そうなetc.
 
Security Monitoring with eBPF
Security Monitoring with eBPFSecurity Monitoring with eBPF
Security Monitoring with eBPF
 
Control your service resources with systemd
 Control your service resources with systemd  Control your service resources with systemd
Control your service resources with systemd
 
High-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringHigh-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uring
 
L3HA-VRRP-20141201
L3HA-VRRP-20141201L3HA-VRRP-20141201
L3HA-VRRP-20141201
 
MySQL Monitoring with Zabbix
MySQL Monitoring with ZabbixMySQL Monitoring with Zabbix
MySQL Monitoring with Zabbix
 
Nginx internals
Nginx internalsNginx internals
Nginx internals
 
Mellanox VXLAN Acceleration
Mellanox VXLAN AccelerationMellanox VXLAN Acceleration
Mellanox VXLAN Acceleration
 
Debian or Yocto Project? Which is the best for your Embedded Linux project?
Debian or Yocto Project? Which is the best for your Embedded Linux project?Debian or Yocto Project? Which is the best for your Embedded Linux project?
Debian or Yocto Project? Which is the best for your Embedded Linux project?
 
The Yocto Project
The Yocto ProjectThe Yocto Project
The Yocto Project
 
SR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/StableSR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/Stable
 
Analysis of Open-Source Drivers for IEEE 802.11 WLANs
Analysis of Open-Source Drivers for IEEE 802.11 WLANsAnalysis of Open-Source Drivers for IEEE 802.11 WLANs
Analysis of Open-Source Drivers for IEEE 802.11 WLANs
 
ProxySQL for MySQL
ProxySQL for MySQLProxySQL for MySQL
ProxySQL for MySQL
 
오픈스택 멀티노드 설치 후기
오픈스택 멀티노드 설치 후기오픈스택 멀티노드 설치 후기
오픈스택 멀티노드 설치 후기
 
Label based Mandatory Access Control on PostgreSQL
Label based Mandatory Access Control on PostgreSQLLabel based Mandatory Access Control on PostgreSQL
Label based Mandatory Access Control on PostgreSQL
 
NGINX: Basics & Best Practices - EMEA Broadcast
NGINX: Basics & Best Practices - EMEA BroadcastNGINX: Basics & Best Practices - EMEA Broadcast
NGINX: Basics & Best Practices - EMEA Broadcast
 
NGINX: High Performance Load Balancing
NGINX: High Performance Load BalancingNGINX: High Performance Load Balancing
NGINX: High Performance Load Balancing
 
Slab Allocator in Linux Kernel
Slab Allocator in Linux KernelSlab Allocator in Linux Kernel
Slab Allocator in Linux Kernel
 
Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5
 
Ninja Build: Simple Guide for Beginners
Ninja Build: Simple Guide for BeginnersNinja Build: Simple Guide for Beginners
Ninja Build: Simple Guide for Beginners
 

Similaire à Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia

Mp3 player project presentation
Mp3 player project presentationMp3 player project presentation
Mp3 player project presentationAntonio Mondragon
 
UPnP Forum Overview - H Elenbaas
UPnP Forum Overview - H ElenbaasUPnP Forum Overview - H Elenbaas
UPnP Forum Overview - H Elenbaasmfrancis
 
Audio in linux embedded
Audio in linux embeddedAudio in linux embedded
Audio in linux embeddedtrx2001
 
Development of Network Service Infrastructure for Transcoding ...
Development of Network Service Infrastructure for Transcoding ...Development of Network Service Infrastructure for Transcoding ...
Development of Network Service Infrastructure for Transcoding ...Videoguy
 
Utf 8'en'ibm sametime 9 - voice and video deployment
Utf 8'en'ibm sametime 9 - voice and video deployment Utf 8'en'ibm sametime 9 - voice and video deployment
Utf 8'en'ibm sametime 9 - voice and video deployment a8us
 
Challenges and experiences with IPTV from a network point of view
Challenges and experiences with IPTV from a network point of viewChallenges and experiences with IPTV from a network point of view
Challenges and experiences with IPTV from a network point of viewbrouer
 
What’s New in UniVerse 11.2
What’s New in UniVerse 11.2What’s New in UniVerse 11.2
What’s New in UniVerse 11.2Rocket Software
 
Chapter 15 distributed mm systems
Chapter 15 distributed mm systemsChapter 15 distributed mm systems
Chapter 15 distributed mm systemsAbDul ThaYyal
 
LAS16 100 K1 - Keynote George Grey
LAS16 100 K1 - Keynote George GreyLAS16 100 K1 - Keynote George Grey
LAS16 100 K1 - Keynote George Grey96Boards
 
LAS16-100K1: Welcome Keynote
LAS16-100K1: Welcome KeynoteLAS16-100K1: Welcome Keynote
LAS16-100K1: Welcome KeynoteLinaro
 
Audio and video streaming
Audio and video streamingAudio and video streaming
Audio and video streamingRohan Bhatkar
 
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoTInria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoTStéphanie Roger
 
Digital Media Production - Future Internet
Digital Media Production - Future InternetDigital Media Production - Future Internet
Digital Media Production - Future InternetMaarten Verwaest
 

Similaire à Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia (20)

Embedded Android : System Development - Part IV
Embedded Android : System Development - Part IVEmbedded Android : System Development - Part IV
Embedded Android : System Development - Part IV
 
Embedded Android : System Development - Part III (Audio / Video HAL)
Embedded Android : System Development - Part III (Audio / Video HAL)Embedded Android : System Development - Part III (Audio / Video HAL)
Embedded Android : System Development - Part III (Audio / Video HAL)
 
Mp3 player project presentation
Mp3 player project presentationMp3 player project presentation
Mp3 player project presentation
 
Audio equalizer
Audio equalizerAudio equalizer
Audio equalizer
 
UPnP Forum Overview - H Elenbaas
UPnP Forum Overview - H ElenbaasUPnP Forum Overview - H Elenbaas
UPnP Forum Overview - H Elenbaas
 
Audio in linux embedded
Audio in linux embeddedAudio in linux embedded
Audio in linux embedded
 
Development of Network Service Infrastructure for Transcoding ...
Development of Network Service Infrastructure for Transcoding ...Development of Network Service Infrastructure for Transcoding ...
Development of Network Service Infrastructure for Transcoding ...
 
Thinking about IP migration
Thinking about IP migration Thinking about IP migration
Thinking about IP migration
 
Multimedia Services: Video
Multimedia Services: VideoMultimedia Services: Video
Multimedia Services: Video
 
Gda ipsoc blr_hic_final
Gda ipsoc blr_hic_finalGda ipsoc blr_hic_final
Gda ipsoc blr_hic_final
 
Utf 8'en'ibm sametime 9 - voice and video deployment
Utf 8'en'ibm sametime 9 - voice and video deployment Utf 8'en'ibm sametime 9 - voice and video deployment
Utf 8'en'ibm sametime 9 - voice and video deployment
 
Challenges and experiences with IPTV from a network point of view
Challenges and experiences with IPTV from a network point of viewChallenges and experiences with IPTV from a network point of view
Challenges and experiences with IPTV from a network point of view
 
What’s New in UniVerse 11.2
What’s New in UniVerse 11.2What’s New in UniVerse 11.2
What’s New in UniVerse 11.2
 
Chapter 15 distributed mm systems
Chapter 15 distributed mm systemsChapter 15 distributed mm systems
Chapter 15 distributed mm systems
 
LAS16 100 K1 - Keynote George Grey
LAS16 100 K1 - Keynote George GreyLAS16 100 K1 - Keynote George Grey
LAS16 100 K1 - Keynote George Grey
 
LAS16-100K1: Welcome Keynote
LAS16-100K1: Welcome KeynoteLAS16-100K1: Welcome Keynote
LAS16-100K1: Welcome Keynote
 
Audio and video streaming
Audio and video streamingAudio and video streaming
Audio and video streaming
 
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoTInria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
 
The CLAM Framework
The CLAM FrameworkThe CLAM Framework
The CLAM Framework
 
Digital Media Production - Future Internet
Digital Media Production - Future InternetDigital Media Production - Future Internet
Digital Media Production - Future Internet
 

Plus de Anne Nicolas

Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstKernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstAnne Nicolas
 
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIKernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIAnne Nicolas
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelAnne Nicolas
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyAnne Nicolas
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureAnne Nicolas
 
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Anne Nicolas
 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataAnne Nicolas
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Anne Nicolas
 
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxEmbedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxAnne Nicolas
 
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialEmbedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialAnne Nicolas
 
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconEmbedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconAnne Nicolas
 
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureEmbedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureAnne Nicolas
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayAnne Nicolas
 
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerEmbedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerAnne Nicolas
 
Embedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationEmbedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationAnne Nicolas
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingAnne Nicolas
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedAnne Nicolas
 
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPKernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPAnne Nicolas
 
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Anne Nicolas
 
Kernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyKernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyAnne Nicolas
 

Plus de Anne Nicolas (20)

Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstKernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream first
 
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMIKernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
Kernel Recipes 2019 - No NMI? No Problem! – Implementing Arm64 Pseudo-NMI
 
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernelKernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
 
Kernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are moneyKernel Recipes 2019 - Metrics are money
Kernel Recipes 2019 - Metrics are money
 
Kernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and futureKernel Recipes 2019 - Kernel documentation: past, present, and future
Kernel Recipes 2019 - Kernel documentation: past, present, and future
 
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
Embedded Recipes 2019 - Knowing your ARM from your ARSE: wading through the t...
 
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary dataKernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
Kernel Recipes 2019 - GNU poke, an extensible editor for structured binary data
 
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
Kernel Recipes 2019 - Analyzing changes to the binary interface exposed by th...
 
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and BareboxEmbedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
Embedded Recipes 2019 - Remote update adventures with RAUC, Yocto and Barebox
 
Embedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less specialEmbedded Recipes 2019 - Making embedded graphics less special
Embedded Recipes 2019 - Making embedded graphics less special
 
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre SiliconEmbedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
Embedded Recipes 2019 - Linux on Open Source Hardware and Libre Silicon
 
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) pictureEmbedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
Embedded Recipes 2019 - From maintaining I2C to the big (embedded) picture
 
Embedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops wayEmbedded Recipes 2019 - Testing firmware the devops way
Embedded Recipes 2019 - Testing firmware the devops way
 
Embedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmakerEmbedded Recipes 2019 - Herd your socs become a matchmaker
Embedded Recipes 2019 - Herd your socs become a matchmaker
 
Embedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integrationEmbedded Recipes 2019 - LLVM / Clang integration
Embedded Recipes 2019 - LLVM / Clang integration
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debuggingEmbedded Recipes 2019 - Introduction to JTAG debugging
Embedded Recipes 2019 - Introduction to JTAG debugging
 
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all startedKernel Recipes 2019 - ftrace: Where modifying a running kernel all started
Kernel Recipes 2019 - ftrace: Where modifying a running kernel all started
 
Kernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDPKernel Recipes 2019 - Suricata and XDP
Kernel Recipes 2019 - Suricata and XDP
 
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
Kernel Recipes 2019 - Marvels of Memory Auto-configuration (SPD)
 
Kernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyKernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easy
 

Dernier

Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZABSYZ Inc
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROmotivationalword821
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 

Dernier (20)

Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Salesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZSalesforce Implementation Services PPT By ABSYZ
Salesforce Implementation Services PPT By ABSYZ
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTRO
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 

Embedded Recipes 2019 - Pipewire a new foundation for embedded multimedia

  • 1. Open FirstOpen First PipeWire: a new foundation for the embedded multimedia Julian Bouzas Multimedia Software Engineer
  • 3. 3 Fresh multimedia framework for linux ● Written by Wim Taymans (creator of PulseAudio) ● Daemon that handles both audio and video devices ● Handles format conversion, mixing, and re-position ● Pipeline Based Design ● Security Permissions ● Like PulseAudio, but for video Video as well
  • 4. 4 PipeWire ● Initial idea: PulseAudio for video (PulseVideo) ● Now: generic multimedia platform service – Video capture server ● Camera and other video sources (ex. gnome-shell screencast) – Audio server ● PulseAudio and JACK (pro-audio) replacement ● Borrowing ideas also from CoreAudio, AudioFlinger, and others…
  • 6.
  • 7. 7 External PipeWire Session Manager ● Setup of devices – Format – Mixers – Effects ● Creation of links and nodes ● Grants security and access control of clients ● Prioritize Devices – Policy (User Specific)
  • 8. 8 Security ● Fine-grained object access controls per client – Visible, Read data (R) – Write data (W) – Execute methods (X) ● Each client can be made to “see” an entirely different graph ● Session manager applies permissions
  • 9. 9 Design ● Modules and Plugins ● Plugins based on SPA (Simple Plugin API) – Header-only C library with zero dependencies – Extremely lightweight data structures – “Like Glib, but not so heavy” - Wim Tayman
  • 10. 10 Performance & Efficiency ● Uses modern linux kernel APIs: – memfd & dmabuf to zero-copy buffers – eventfd & timerfd to wake up the processes ● Low-latency real-time capable – < 1.5 milliseconds possible on desktop ● Much lower CPU usage than PulseAudio
  • 11. 11 CPU Usage Statistics Playback of a 24bit 96kHz 5.1 channel file, downmixed to 3.1 and resampled to 48kHz 21.33 ms 1.33 ms 2 clients @ 800 MHz 0.7 2.3 2.7 6 % CPU ● Measurements: – 21.33 ms (1024 samples / buffer) – 1.33 ms (64 samples / buffer) – 1.33 ms with 2 clients – 1.33 ms with CPU pinned @ 800 MHz ● Measurements on Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz ● Comparatively, on 1.33 ms, PulseAudio uses 100% CPU and fails (underruns)
  • 12. 12 Compatibility APIs ● ALSA apps – PipeWire PCM plugin – Built with streams API ● PulseAudio apps – Replacement libpulse.so, libpulse-mainloop-glib.so – Built with streams API ● JACK apps – Replacement libjack.so – Built on top of low-level PipeWire
  • 13. 13 Who is behind this ● Author: Wim Taymans – Well-known old GStreamer developer & ex-maintainer – Sponsored by: Red Hat ● Embraced by PulseAudio developers – Seen as the next generation of PulseAudio ● Welcomed by ALSA and JACK developers ● License: MIT
  • 14. 14 Status ● Version 0.2 distributed in fedora – Used for video only ● Version 0.3 to be released soon – Estimated for later this year – A lot of audio work & refactoring done – Bluetooth starting to be fully supported – Used in AGL (Automotive Grade Linux)
  • 16. 16 PipeWire in Automotive Grade Linux ● Audio system implemented with PipeWire for Connected Cars – Replaces PulseAudio – Mixer, Media player & Radio player using the native API – ALSA compatibility plugin available ● Session manager: WirePlumber ● Merged in Happy Halibut (8.0.0) RC2 ● In the future also: video
  • 17. 17 WirePlumber ● First session manager implementation ● Target: reusable session manager for embedded use cases – we’ll see about desktop… ● Modular & extensible, like PipeWire ● Based on GObject – To support writing modules using bindings in other languages
  • 18. 18 WirePlumber concepts ● Graph abstraction: Endpoint – Closer to PulseAudio’s representation (sources, sinks, source-outputs, sink-inputs) – Described by name & media-class (Audio/Source, Audio/Sink, Stream/Audio/Input, Stream/Audio/Output) ● Extensibility: Modules & Factories like PipeWire ● Pipewire Proxies and Properties – GObject-ify the pipewire API (ease of use + access from bindings)
  • 21. 21 Policy Management ● Decided what app nodes are linked with what device nodes ● Fully configurable with TOML files ● Default Configuration: – Clients have roles with priorities: ● Multimedia, Navigation, Emergency, ... – Highest priority wins – Equal priority: last one wins – Audio in other apps is automatically paused & restored
  • 22. 22 Other areas needing work ● Finish Bluetooth audio support (planned for AGL 8.0.2) ● Unicens hardware support (planned for AGL 8.0.3) ● Improve API and make it stable – We are constantly changing it and figuring out what the best API could be ● Better security – Mechanisms exist but currently all clients are granted full permissions ● Documentation
  • 24. 24 Audio Stream (pw_stream) ● Nicer than PipeWire low-level API ● Takes input from client (asynchronously) ● Does conversion – Resampling – Channel mixing / volume – Format conversion – Channel splitting into DSP – Decouples server buffer size from client requested latency ● Flush / drain
  • 25. 25 In GStreamer ● pipewiresrc / pipwiresink – Available upstream – Built mainly for video; have issues with audio at the moment ● pwaudiosrc / pwaudiosink – Available in AGL – Smooth operation with audio – Upstream-Status: Submitted [https://github.com/PipeWire/pipewire/pull/140] ● All built with the streams API
  • 26. 26 Supported Bluetooth Profiles ● Only A2DP Sink was included – For high quality audio over bluetooth sinks (music - speakers) ● Included A2DP Source node – For high quality audio over bluetooth sources (music - phones) ● Started including HSP/HFP Sink and Source nodes – For comunications (voice – phones) – 2 Setups: Head Unit, Gateway