diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2019-07-26 17:15:00 +0300 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2019-07-30 15:03:08 +0000 |
commit | 48c3b10785ddbc042fe3e508921db406bb78b347 (patch) | |
tree | 39f6cc2940a4f7f8644196a5a888df1ac89c0c36 /meta-pipewire | |
parent | c05a127e27183e66f02ee7ad8ce17e5712af043a (diff) |
wireplumber: add AGL-specific per-board config
Bug-AGL: SPEC-2662
Change-Id: If419c940e18feb46f42f9004479944bd395a3b4a
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Diffstat (limited to 'meta-pipewire')
3 files changed, 125 insertions, 0 deletions
diff --git a/meta-pipewire/conf/include/agl-pipewire.inc b/meta-pipewire/conf/include/agl-pipewire.inc index 400eaa96..edd89311 100644 --- a/meta-pipewire/conf/include/agl-pipewire.inc +++ b/meta-pipewire/conf/include/agl-pipewire.inc @@ -1,2 +1,3 @@ DISTRO_FEATURES_append = " pipewire" PREFERRED_RPROVIDER_virtual/pipewire-config = "pipewire-conf-agl" +PREFERRED_RPROVIDER_virtual/wireplumber-config = "wireplumber-board-config-agl" diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-board-config-agl/wireplumber.conf.in b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-board-config-agl/wireplumber.conf.in new file mode 100644 index 00000000..76a57419 --- /dev/null +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-board-config-agl/wireplumber.conf.in @@ -0,0 +1,55 @@ +# Basic pipewire integration - do not remove +load-module C libwireplumber-module-pipewire + +# Grants access to security confined clients +load-module C libwireplumber-module-client-permissions + +# Endpoint implementation for standard audio devices +# using software conversions, mixing and volume controls +load-module C libwireplumber-module-pw-audio-softdsp-endpoint + +# Endpoint that provides high-level volume controls for the AGL mixer +# The streams specified here are the ones that will appear in the mixer. +# They must match the stream names in the alsa-udev module, +# except for "Master", which is treated specially. +load-module C libwireplumber-module-mixer { + "streams": <["Master", "Multimedia", "Speech-Low", "Custom-Low", + "Navigation", "Speech-High", "Custom-High", + "Communication", "Emergency"]> +} + +# Monitors the ALSA devices that are discovered via udev +# and creates softdsp-endopints for each one of them +# The streams specified here are the ones that will be available for linking +# clients. Currently, they are matched against the client's role string. +load-module C libwireplumber-module-pw-alsa-udev { + "streams": <["Multimedia", "Speech-Low", "Custom-Low", + "Navigation", "Speech-High", "Custom-High", + "Communication", "Emergency"]> +} + +# Monitors the Audio clients that are discovered via pipewire +# and creates simple-endpoints for each one of them +load-module C libwireplumber-module-pw-audio-client + +# Implements linking clients to devices and maintains +# information about the devices to be used. +# Notes: +# - Devices must be specified in hw:X,Y format, where X and Y are integers. +# Things like hw:Intel,0 or paths are not understood. +# - Roles and priorities can be arbitrary strings and arbitrary numbers +# - Roles are matched against the stream names specified in the modules above. +load-module C libwireplumber-module-simple-policy { + "default-playback-device": <"PLAYBACK">, + "default-capture-device": <"CAPTURE">, + "role-priorities": <{ + "Multimedia": 1, + "Speech-Low": 2, + "Custom-Low": 3, + "Navigation": 5, + "Speech-High:": 7, + "Custom-High": 8, + "Communication": 9, + "Emergency": 10 + }> +} diff --git a/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-board-config-agl_git.bb b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-board-config-agl_git.bb new file mode 100644 index 00000000..7ed9ea1a --- /dev/null +++ b/meta-pipewire/recipes-multimedia/wireplumber/wireplumber-board-config-agl_git.bb @@ -0,0 +1,69 @@ +SUMMARY = "AGL configuration file for wireplumber" +HOMEPAGE = "https://gitlab.freedesktop.org/gkiagia/wireplumber" +BUGTRACKER = "https://jira.automotivelinux.org" +AUTHOR = "George Kiagiadakis <george.kiagiadakis@collabora.com>" +SECTION = "multimedia" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = "file://wireplumber.conf.in" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +# +# For device names, any unique substring of the "endpoint" name is valid. +# To list all endpoints: +# export XDG_RUNTIME_DIR=/run/user/1001 +# pipewire-cli +# > connect pipewire-0 +# > list-objects +# ... and look for objects of type "PipeWire:Interface:Endpoint/0" +# +# For instance: +# id 269, parent 40, type PipeWire:Interface:Endpoint/0 +# media.name = "USB Audio on WD15 Dock (hw:1,0 / node 5)" +# media.class = "Audio/Sink" +# id 270, parent 40, type PipeWire:Interface:Endpoint/0 +# media.name = "USB Audio on WD15 Dock (hw:1,0 / node 7)" +# media.class = "Audio/Source" +# +# Audio/Sink endpoints are valid for playback +# Audio/Source endpoints are valid for capture +# +# Wireplumber will first filter endpoints based on the media.class, depending +# on whether the client is doing playback or capture and then it will look +# for a sub-string match in the media.name +# +DEV_PLAYBACK = "hw:0,0" +DEV_CAPTURE = "hw:0,0" + +DEV_PLAYBACK_dra7xx-evm = "DRA7xx-EVM" +DEV_CAPTURE_dra7xx-evm = "DRA7xx-EVM" + +DEV_PLAYBACK_m3ulcb = "ak4613" +DEV_CAPTURE_m3ulcb = "ak4613" + +DEV_PLAYBACK_h3ulcb = "ak4613" +DEV_CAPTURE_h3ulcb = "ak4613" + +DEV_PLAYBACK_raspberrypi3 = "bcm2835 ALSA on bcm2835 ALSA" +DEV_CAPTURE_raspberrypi3 = "hw:0,0" + +do_install_append() { + sed -e "s/PLAYBACK/${DEV_PLAYBACK}/" -e "s/CAPTURE/${DEV_CAPTURE}/" ${WORKDIR}/wireplumber.conf.in > ${WORKDIR}/wireplumber.conf + install -d ${D}/${sysconfdir}/wireplumber/ + install -m 644 ${WORKDIR}/wireplumber.conf ${D}/${sysconfdir}/wireplumber/wireplumber.conf +} + +FILES_${PN} += "\ + ${sysconfdir}/wireplumber/* \ +" +CONFFILES_${PN} += "\ + ${sysconfdir}/wireplumber/* \ +" + +RPROVIDES_${PN} += "virtual/wireplumber-config" |