wireplumber: add AGL-specific per-board config
[AGL/meta-agl-devel.git] / meta-pipewire / recipes-multimedia / wireplumber / wireplumber-board-config-agl_git.bb
1 SUMMARY     = "AGL configuration file for wireplumber"
2 HOMEPAGE    = "https://gitlab.freedesktop.org/gkiagia/wireplumber"
3 BUGTRACKER  = "https://jira.automotivelinux.org"
4 AUTHOR      = "George Kiagiadakis <george.kiagiadakis@collabora.com>"
5 SECTION     = "multimedia"
6
7 LICENSE = "MIT"
8 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
9
10 SRC_URI = "file://wireplumber.conf.in"
11
12 PACKAGE_ARCH = "${MACHINE_ARCH}"
13
14 do_configure[noexec] = "1"
15 do_compile[noexec] = "1"
16
17 #
18 # For device names, any unique substring of the "endpoint" name is valid.
19 # To list all endpoints:
20 #  export XDG_RUNTIME_DIR=/run/user/1001
21 #  pipewire-cli
22 #  > connect pipewire-0
23 #  > list-objects
24 # ... and look for objects of type "PipeWire:Interface:Endpoint/0"
25 #
26 # For instance:
27 #   id 269, parent 40, type PipeWire:Interface:Endpoint/0
28 #           media.name = "USB Audio on WD15 Dock (hw:1,0 / node 5)"
29 #           media.class = "Audio/Sink"
30 #   id 270, parent 40, type PipeWire:Interface:Endpoint/0
31 #           media.name = "USB Audio on WD15 Dock (hw:1,0 / node 7)"
32 #           media.class = "Audio/Source"
33 #
34 # Audio/Sink endpoints are valid for playback
35 # Audio/Source endpoints are valid for capture
36 #
37 # Wireplumber will first filter endpoints based on the media.class, depending
38 # on whether the client is doing playback or capture and then it will look
39 # for a sub-string match in the media.name
40 #
41 DEV_PLAYBACK = "hw:0,0"
42 DEV_CAPTURE = "hw:0,0"
43
44 DEV_PLAYBACK_dra7xx-evm = "DRA7xx-EVM"
45 DEV_CAPTURE_dra7xx-evm = "DRA7xx-EVM"
46
47 DEV_PLAYBACK_m3ulcb = "ak4613"
48 DEV_CAPTURE_m3ulcb = "ak4613"
49
50 DEV_PLAYBACK_h3ulcb = "ak4613"
51 DEV_CAPTURE_h3ulcb = "ak4613"
52
53 DEV_PLAYBACK_raspberrypi3 = "bcm2835 ALSA on bcm2835 ALSA"
54 DEV_CAPTURE_raspberrypi3 = "hw:0,0"
55
56 do_install_append() {
57     sed -e "s/PLAYBACK/${DEV_PLAYBACK}/" -e "s/CAPTURE/${DEV_CAPTURE}/" ${WORKDIR}/wireplumber.conf.in > ${WORKDIR}/wireplumber.conf
58     install -d ${D}/${sysconfdir}/wireplumber/
59     install -m 644 ${WORKDIR}/wireplumber.conf ${D}/${sysconfdir}/wireplumber/wireplumber.conf
60 }
61
62 FILES_${PN} += "\
63     ${sysconfdir}/wireplumber/* \
64 "
65 CONFFILES_${PN} += "\
66     ${sysconfdir}/wireplumber/* \
67 "
68
69 RPROVIDES_${PN} += "virtual/wireplumber-config"