summaryrefslogtreecommitdiffstats
path: root/meta-agl-ic-container
diff options
context:
space:
mode:
authorNaoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>2024-10-01 00:13:10 +0900
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2024-10-09 14:03:15 +0000
commitd7d2f57df5a852d5bedd0072072183d80680e9bc (patch)
treeb3f6704b2ca31f4ab241770c34c2f224e36c06be /meta-agl-ic-container
parent24f2da7bfd7fa66e8a3b8ed7e5d8c09ef6956c68 (diff)
Enable QtMultimedia sound support
The QtMultimedia is using plusaudio to support audio. It has alsa support, but that alsa support has restriction. And QtMulitimedia is not support pipwire. This change enable pulseaudio as a temporary solution of Qt6 support. Bug-AGL: SPEC-5162 Change-Id: Ic7cf20d49612feb4deaebfc501831bdbe5a00142 Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
Diffstat (limited to 'meta-agl-ic-container')
-rw-r--r--meta-agl-ic-container/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend3
-rw-r--r--meta-agl-ic-container/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_%.bbappend3
-rw-r--r--meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/daemon.conf92
-rw-r--r--meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/nanopct6/system.pa33
-rw-r--r--meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/pulseaudio.service13
-rw-r--r--meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/raspberrypi4-64/system.pa33
-rw-r--r--meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/rcar-gen3/system.pa33
-rw-r--r--meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend27
-rw-r--r--meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber-policy-config-agl_%.bbappend8
-rw-r--r--meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber/0001-systemd-wireplumber-to-not-depend-on-the-pipewire-de.patch61
-rw-r--r--meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber_%.bbappend5
-rw-r--r--meta-agl-ic-container/recipes-qt/qt/qtmultimedia_%.bbappend2
12 files changed, 239 insertions, 74 deletions
diff --git a/meta-agl-ic-container/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend b/meta-agl-ic-container/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
new file mode 100644
index 00000000..6a0d14b3
--- /dev/null
+++ b/meta-agl-ic-container/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_%.bbappend
@@ -0,0 +1,3 @@
+PACKAGECONFIG:append = " \
+ openh264 \
+"
diff --git a/meta-agl-ic-container/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_%.bbappend b/meta-agl-ic-container/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_%.bbappend
new file mode 100644
index 00000000..c882a035
--- /dev/null
+++ b/meta-agl-ic-container/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_%.bbappend
@@ -0,0 +1,3 @@
+PACKAGECONFIG:append = " \
+ pulseaudio \
+"
diff --git a/meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/daemon.conf b/meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/daemon.conf
new file mode 100644
index 00000000..58a2ab6f
--- /dev/null
+++ b/meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/daemon.conf
@@ -0,0 +1,92 @@
+# This file is part of PulseAudio.
+#
+# PulseAudio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# PulseAudio is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
+
+## Configuration file for the PulseAudio daemon. See pulse-daemon.conf(5) for
+## more information. Default values are commented out. Use either ; or # for
+## commenting.
+
+; daemonize = no
+; fail = yes
+; allow-module-loading = yes
+; allow-exit = yes
+; use-pid-file = yes
+; system-instance = no
+; local-server-type = user
+; enable-shm = yes
+; enable-memfd = yes
+; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB
+; lock-memory = no
+; cpu-limit = no
+
+; high-priority = yes
+; nice-level = -11
+
+realtime-scheduling = yes
+realtime-priority = 5
+
+; exit-idle-time = 20
+; scache-idle-time = 20
+
+; dl-search-path = (depends on architecture)
+
+; load-default-script-file = yes
+; default-script-file = /etc/pulse/default.pa
+
+; log-target = auto
+; log-level = notice
+; log-meta = no
+; log-time = no
+; log-backtrace = 0
+
+; resample-method = speex-float-1
+; avoid-resampling = false
+; enable-remixing = yes
+; remixing-use-all-sink-channels = yes
+; remixing-produce-lfe = no
+; remixing-consume-lfe = no
+; lfe-crossover-freq = 0
+
+; flat-volumes = no
+
+; rescue-streams = yes
+
+; rlimit-fsize = -1
+; rlimit-data = -1
+; rlimit-stack = -1
+; rlimit-core = -1
+; rlimit-as = -1
+; rlimit-rss = -1
+; rlimit-nproc = -1
+; rlimit-nofile = 256
+; rlimit-memlock = -1
+; rlimit-locks = -1
+; rlimit-sigpending = -1
+; rlimit-msgqueue = -1
+; rlimit-nice = 31
+; rlimit-rtprio = 9
+; rlimit-rttime = 200000
+
+default-sample-format = s16le
+default-sample-rate = 48000
+alternate-sample-rate = 48000
+default-sample-channels = 2
+default-channel-map = front-left,front-right
+
+default-fragments = 2
+default-fragment-size-msec = 5
+
+; enable-deferred-volume = yes
+; deferred-volume-safety-margin-usec = 8000
+; deferred-volume-extra-delay-usec = 0
diff --git a/meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/nanopct6/system.pa b/meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/nanopct6/system.pa
new file mode 100644
index 00000000..f9bffb05
--- /dev/null
+++ b/meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/nanopct6/system.pa
@@ -0,0 +1,33 @@
+#!/usr/bin/pulseaudio -nF
+#
+# This file is part of PulseAudio.
+#
+# PulseAudio is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# PulseAudio is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
+
+# This startup script is used only if PulseAudio is started in system
+# mode.
+
+### Automatically restore the volume of streams and devices
+load-module module-device-restore
+load-module module-stream-restore
+load-module module-card-restore
+
+### Use the static hardware detection module (for systems that lack udev/hal support)
+load-module module-alsa-sink device=hw:1,0
+
+### Load several protocols
+load-module module-native-protocol-unix auth-anonymous=1
+
+.nofail
+.include /etc/pulse/system.pa.d
diff --git a/meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/pulseaudio.service b/meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/pulseaudio.service
new file mode 100644
index 00000000..2cafafcd
--- /dev/null
+++ b/meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/pulseaudio.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Pulse Audio Service
+After=basic.target
+Before=multi-user.target
+
+[Service]
+Type=notify
+ExecStart=/usr/bin/pulseaudio --system --daemonize=no --disallow-exit --disallow-module-loading --log-target=journal
+MemoryDenyWriteExecute=yes
+Restart=on-failure
+
+[Install]
+WantedBy=basic.target
diff --git a/meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/raspberrypi4-64/system.pa b/meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/raspberrypi4-64/system.pa
new file mode 100644
index 00000000..5bb33743
--- /dev/null
+++ b/meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/raspberrypi4-64/system.pa
@@ -0,0 +1,33 @@
+#!/usr/bin/pulseaudio -nF
+#
+# This file is part of PulseAudio.
+#
+# PulseAudio is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# PulseAudio is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
+
+# This startup script is used only if PulseAudio is started in system
+# mode.
+
+### Automatically restore the volume of streams and devices
+load-module module-device-restore
+load-module module-stream-restore
+load-module module-card-restore
+
+### Use the static hardware detection module (for systems that lack udev/hal support)
+load-module module-alsa-sink device=hw:"Device"
+
+### Load several protocols
+load-module module-native-protocol-unix auth-anonymous=1
+
+.nofail
+.include /etc/pulse/system.pa.d
diff --git a/meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/rcar-gen3/system.pa b/meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/rcar-gen3/system.pa
new file mode 100644
index 00000000..6891574f
--- /dev/null
+++ b/meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio/rcar-gen3/system.pa
@@ -0,0 +1,33 @@
+#!/usr/bin/pulseaudio -nF
+#
+# This file is part of PulseAudio.
+#
+# PulseAudio is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# PulseAudio is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
+
+# This startup script is used only if PulseAudio is started in system
+# mode.
+
+### Automatically restore the volume of streams and devices
+load-module module-device-restore
+load-module module-stream-restore
+load-module module-card-restore
+
+### Use the static hardware detection module (for systems that lack udev/hal support)
+load-module module-alsa-sink device=hw:0,0
+
+### Load several protocols
+load-module module-native-protocol-unix auth-anonymous=1
+
+.nofail
+.include /etc/pulse/system.pa.d
diff --git a/meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend b/meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend
new file mode 100644
index 00000000..ae1a20c6
--- /dev/null
+++ b/meta-agl-ic-container/recipes-multimedia/pulseaudio/pulseaudio_%.bbappend
@@ -0,0 +1,27 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/pulseaudio:"
+
+SRC_URI:append = " \
+ file://pulseaudio.service \
+ file://system.pa \
+ file://daemon.conf \
+ "
+
+do_install:append() {
+ install -Dm644 ${WORKDIR}/system.pa ${D}${sysconfdir}/pulse/system.pa
+ install -Dm644 ${WORKDIR}/daemon.conf ${D}${sysconfdir}/pulse/daemon.conf
+ rm ${D}${sysconfdir}/pulse/default.pa
+
+ install -d ${D}/${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/pulseaudio.service ${D}/${systemd_unitdir}/system
+ rm ${D}/${systemd_unitdir}/user/*
+}
+
+FILES:${PN}-server:append = " ${systemd_unitdir}/*"
+CONFFILES:pulseaudio-server = "\
+ ${sysconfdir}/pulse/daemon.conf \
+ ${sysconfdir}/pulse/system.pa \
+"
+
+SYSTEMD_PACKAGES:append = " ${PN}-server"
+SYSTEMD_SERVICE:${PN}-server = "pulseaudio.service"
+SYSTEMD_AUTO_ENABLE:${PN}-server = "enable"
diff --git a/meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber-policy-config-agl_%.bbappend b/meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber-policy-config-agl_%.bbappend
deleted file mode 100644
index fe6dab86..00000000
--- a/meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber-policy-config-agl_%.bbappend
+++ /dev/null
@@ -1,8 +0,0 @@
-do_install:append() {
- config_dir="${D}${sysconfdir}/wireplumber/"
- systemd_dir="${D}${sysconfdir}/systemd/system/sockets.target.wants"
-
- # enable additional systemd services
- install -d ${systemd_dir}
- ln -s ${systemd_system_unitdir}/wireplumber@.service ${systemd_dir}/wireplumber@policy.service
-}
diff --git a/meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber/0001-systemd-wireplumber-to-not-depend-on-the-pipewire-de.patch b/meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber/0001-systemd-wireplumber-to-not-depend-on-the-pipewire-de.patch
deleted file mode 100644
index ba400211..00000000
--- a/meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber/0001-systemd-wireplumber-to-not-depend-on-the-pipewire-de.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 512e9ee130841e3b6c379511234afc07d66d99d7 Mon Sep 17 00:00:00 2001
-From: Ashok Sidipotu <ashok.sidipotu@collabora.com>
-Date: Mon, 28 Feb 2022 06:46:19 +0530
-Subject: [PATCH] systemd: changes to run wireplumber instances in containers
-
-- remove the pipewire daemon dependencies so that
-only wireplumber policy daemon can run in containers.
-- remove pipewire user
-
-Upstream-Status: Inappropriate [configuration]
----
- src/systemd/system/wireplumber@.service.in | 8 +++-----
- src/systemd/user/wireplumber@.service.in | 5 ++---
- 2 files changed, 5 insertions(+), 8 deletions(-)
-
-diff --git a/src/systemd/system/wireplumber@.service.in b/src/systemd/system/wireplumber@.service.in
-index 0766d4e0..50ddf4c6 100644
---- a/src/systemd/system/wireplumber@.service.in
-+++ b/src/systemd/system/wireplumber@.service.in
-@@ -5,8 +5,7 @@
- # wireplumber@policy.service loads the "policy" profile, etc.
- [Unit]
- Description=Multimedia Service Session Manager (%i)
--After=pipewire.service
--BindsTo=pipewire.service
-+After=sockets.target
- Conflicts=pipewire-media-session.service
-
- [Service]
-@@ -19,9 +18,8 @@ Type=simple
- AmbientCapabilities=CAP_SYS_NICE
- ExecStart=@WP_BINARY@ -p %i
- Restart=on-failure
--User=pipewire
--Environment=PIPEWIRE_RUNTIME_DIR=%t/pipewire
-+Environment=PIPEWIRE_RUNTIME_DIR=/var
- Environment=GIO_USE_VFS=local
-
- [Install]
--WantedBy=pipewire.service
-+WantedBy=multi-user.target
-diff --git a/src/systemd/user/wireplumber@.service.in b/src/systemd/user/wireplumber@.service.in
-index 5c1096fc..7368f683 100644
---- a/src/systemd/user/wireplumber@.service.in
-+++ b/src/systemd/user/wireplumber@.service.in
-@@ -5,8 +5,7 @@
- # wireplumber@policy.service loads the "policy" profile, etc.
- [Unit]
- Description=Multimedia Service Session Manager (%i)
--After=pipewire.service
--BindsTo=pipewire.service
-+After=sockets.target
- Conflicts=pipewire-media-session.service
-
- [Service]
-@@ -22,4 +21,4 @@ Slice=session.slice
- Environment=GIO_USE_VFS=local
-
- [Install]
--WantedBy=pipewire.service
-+WantedBy=multi-user.target
diff --git a/meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber_%.bbappend b/meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber_%.bbappend
deleted file mode 100644
index 56f03a4c..00000000
--- a/meta-agl-ic-container/recipes-multimedia/wireplumber/wireplumber_%.bbappend
+++ /dev/null
@@ -1,5 +0,0 @@
-FILESEXTRAPATHS:prepend := "${THISDIR}/wireplumber:"
-
-SRC_URI += "\
- file://0001-systemd-wireplumber-to-not-depend-on-the-pipewire-de.patch \
-"
diff --git a/meta-agl-ic-container/recipes-qt/qt/qtmultimedia_%.bbappend b/meta-agl-ic-container/recipes-qt/qt/qtmultimedia_%.bbappend
new file mode 100644
index 00000000..4c76a4c3
--- /dev/null
+++ b/meta-agl-ic-container/recipes-qt/qt/qtmultimedia_%.bbappend
@@ -0,0 +1,2 @@
+#PACKAGECONFIG:append = " alsa"
+#PACKAGECONFIG:remove = "ffmpeg pulseaudio"