public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Cristian Le <git@lecris.dev>
To: git-commits@fedoraproject.org
Subject: [rpms/qt6-qtmultimedia] epel9: Fix headphones not being picked up on PipeWire
Date: Thu, 08 Oct 2026 20:14:42 GMT	[thread overview]
Message-ID: <179149048238.1.12323491209675202506.rpms-qt6-qtmultimedia-c5623f9e0f2c@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/qt6-qtmultimedia
Branch : epel9
Commit : c5623f9e0f2cd7b644e4ca988f4829c8df2e8a0a
Author : Cristian Le <git@lecris.dev>
Date   : 2026-03-19T15:42:05+01:00
Stats  : +82/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/qt6-qtmultimedia/c/c5623f9e0f2cd7b644e4ca988f4829c8df2e8a0a?branch=epel9

Log:
Fix headphones not being picked up on PipeWire

---
diff --git a/qt6-qtmultimedia.spec b/qt6-qtmultimedia.spec
index 539e82a..f0c3bcc 100644
--- a/qt6-qtmultimedia.spec
+++ b/qt6-qtmultimedia.spec
@@ -21,7 +21,7 @@
 Summary: Qt6 - Multimedia support
 Name:    qt6-%{qt_module}
 Version: 6.10.2
-Release: 1%{?dist}
+Release: 2%{?dist}
 
 License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0
 Url:     http://www.qt.io
@@ -35,6 +35,11 @@ Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submod
 %endif
 
 Patch0:  qtmultimedia-fix-build-on-x86-arch.patch
+# Fix headphones not being picked up on PipeWire
+# https://qt-project.atlassian.net/browse/QTBUG-143570
+# https://bugs.kde.org/show_bug.cgi?id=515151
+# Picked from: https://codereview.qt-project.org/c/qt/qtmultimedia/+/707961
+Patch1:  qtmultimedia-pipewire-relax-format-requirements.patch
 
 # filter plugin/qml provides
 %global __provides_exclude_from ^(%{_qt6_archdatadir}/qml/.*\\.so|%{_qt6_plugindir}/.*\\.so)$
@@ -234,6 +239,9 @@ rm -r %{buildroot}%{_qt6_archdatadir}/mkspecs/features/ios/add_ios_ffmpeg_librar
 
 
 %changelog
+* Thu Mar 19 2026 Cristian Le <git@lecris.dev> - 6.10.2-2
+- Fix headphones not being picked up on PipeWire
+
 * Mon Feb 09 2026 Jan Grulich <jgrulich@redhat.com> - 6.10.2-1
 - 6.10.2
 

diff --git a/qtmultimedia-pipewire-relax-format-requirements.patch b/qtmultimedia-pipewire-relax-format-requirements.patch
new file mode 100644
index 0000000..3efe5a2
--- /dev/null
+++ b/qtmultimedia-pipewire-relax-format-requirements.patch
@@ -0,0 +1,73 @@
+From 0bbe52f0b4cbb142265ecfc0972f01c3e8762d2c Mon Sep 17 00:00:00 2001
+From: Tim Blechmann <tim.blechmann@qt.io>
+Date: Mon, 26 Jan 2026 11:11:06 +0800
+Subject: [PATCH] Pipewire: relax format requirements
+
+Some virtual pipewire devices do not advertise their supported sampling
+rates in their format block. This includes devices created by
+libpipewire-module-loopback. We can still allow them by guessing 48khz
+as preferred sampling rate.
+
+Task-number: QTBUG-143570
+Change-Id: I1f54f7d19f9e30fb898cffa448bfa0235eba62cd
+Reviewed-by: Artem Dyomin <artem.dyomin@qt.io>
+(cherry picked from commit cd709b4f436b578e22dd854d71ed3f198a18d70a)
+Reviewed-by: Tim Blechmann <tim.blechmann@qt.io>
+---
+
+diff --git a/src/multimedia/pipewire/qpipewire_audiodevice.cpp b/src/multimedia/pipewire/qpipewire_audiodevice.cpp
+index ca02ba1..43c701e 100644
+--- a/src/multimedia/pipewire/qpipewire_audiodevice.cpp
++++ b/src/multimedia/pipewire/qpipewire_audiodevice.cpp
+@@ -74,9 +74,13 @@
+     minimumSampleRate = QtMultimediaPrivate::allSupportedSampleRates.front();
+     maximumSampleRate = QtMultimediaPrivate::allSupportedSampleRates.back();
+ 
+-    std::visit([&](const auto &arg) {
+-        setPreferredSamplingRate(arg);
+-    }, formats.rates);
++    if (formats.rates) {
++        std::visit([&](const auto &arg) {
++            setPreferredSamplingRate(arg);
++        }, *formats.rates);
++    } else {
++        setPreferredSamplingRate(48'000);
++    }
+ 
+     std::visit([&](const auto &arg) {
+         setPreferredSampleFormats(arg);
+diff --git a/src/multimedia/pipewire/qpipewire_spa_pod_support.cpp b/src/multimedia/pipewire/qpipewire_spa_pod_support.cpp
+index a89b6dc..5a4714f 100644
+--- a/src/multimedia/pipewire/qpipewire_spa_pod_support.cpp
++++ b/src/multimedia/pipewire/qpipewire_spa_pod_support.cpp
+@@ -118,11 +118,12 @@
+         result.rates = int(info.rate);
+     } else {
+         auto optionalSamplingRates = parseSamplingRates(obj->pod);
+-        if (!optionalSamplingRates)
+-            return std::nullopt;
+-        std::visit([&](auto arg) {
+-            result.rates = arg;
+-        }, *optionalSamplingRates);
++        // note: some virtual devices don't expose any sampling rate
++        if (optionalSamplingRates) {
++            std::visit([&](auto arg) {
++                result.rates = arg;
++            }, *optionalSamplingRates);
++        }
+     }
+ 
+     if (isIec958) {
+diff --git a/src/multimedia/pipewire/qpipewire_spa_pod_support_p.h b/src/multimedia/pipewire/qpipewire_spa_pod_support_p.h
+index c78e303..693bec5 100644
+--- a/src/multimedia/pipewire/qpipewire_spa_pod_support_p.h
++++ b/src/multimedia/pipewire/qpipewire_spa_pod_support_p.h
+@@ -40,7 +40,7 @@
+     static std::optional<SpaObjectAudioFormat> parse(const struct spa_pod *pod);
+ 
+     int channelCount = 0;
+-    std::variant<int, std::vector<int>, SpaRange<int>> rates;
++    std::optional<std::variant<int, std::vector<int>, SpaRange<int>>> rates;
+     std::variant<spa_audio_format, SpaEnum<spa_audio_format>, spa_audio_iec958_codec> sampleTypes;
+     std::optional<QList<spa_audio_channel>> channelPositions; // COW-able
+ };

                 reply	other threads:[~2026-10-08 20:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179149048238.1.12323491209675202506.rpms-qt6-qtmultimedia-c5623f9e0f2c@fedoraproject.org \
    --to=git@lecris.dev \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox