Commit 8b3b582f authored by Nicolas Fella's avatar Nicolas Fella
Browse files

Hide advanced output configuration when using PipeWire

PipeWire does not have support for the relevant PulseAudio modules.

See https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/771

module-switch-on-connect is less relevant since PipeWire has this behavior by default.

BUG: 433246
parent 6fe27693
......@@ -7,6 +7,7 @@
#include "modulemanager.h"
#include "../config.h"
#include "module.h"
#include "server.h"
#if USE_GSETTINGS
#include "gsettingsitem.h"
......@@ -100,6 +101,13 @@ ModuleManager::~ModuleManager(){};
bool ModuleManager::settingsSupported() const
{
// PipeWire does not (yet) have support for module-switch-on-connect and module-combine-sink
// Also switching streams is the default there
// TODO Check whether there is a PipeWire-specific way to do these
if (Context::instance()->server()->isPipeWire()) {
return false;
}
#if USE_GCONF || USE_GSETTINGS
return true;
#else
......
......@@ -64,6 +64,7 @@ void Server::update(const pa_server_info *info)
{
m_defaultSinkName = QString::fromUtf8(info->default_sink_name);
m_defaultSourceName = QString::fromUtf8(info->default_source_name);
m_isPipeWire = QString::fromUtf8(info->server_name).contains("PipeWire");
updateDefaultDevices();
}
......@@ -105,4 +106,9 @@ void Server::updateDefaultDevices()
}
}
bool Server::isPipeWire() const
{
return m_isPipeWire;
}
} // QPulseAudio
......@@ -32,6 +32,8 @@ public:
void reset();
void update(const pa_server_info *info);
bool isPipeWire() const;
Q_SIGNALS:
void defaultSinkChanged(Sink *sink);
void defaultSourceChanged(Source *source);
......@@ -43,6 +45,7 @@ private:
QString m_defaultSourceName;
Sink *m_defaultSink;
Source *m_defaultSource;
bool m_isPipeWire;
};
} // QPulseAudio
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment