[Git][pulseaudio/pavucontrol][master] Don't inhibit suspend on monitor sources

Arun Raghavan (@arun) gitlab at gitlab.freedesktop.org
Wed Jun 4 04:35:20 UTC 2025



Arun Raghavan pushed to branch master at PulseAudio / pavucontrol


Commits:
1f58c433 by Arun Raghavan at 2025-06-03T09:23:41+05:30
Don't inhibit suspend on monitor sources

This allows us to not keep sinks open if nothing else is connected.

- - - - -


1 changed file:

- src/mainwindow.cc


Changes:

=====================================
src/mainwindow.cc
=====================================
@@ -721,6 +721,7 @@ void MainWindow::updateSource(const pa_source_info &info) {
     const char *icon;
     std::map<uint32_t, CardWidget*>::iterator cw;
     std::set<pa_source_port_info,source_port_prio_compare> port_priorities;
+    SourceType type = info.monitor_of_sink != PA_INVALID_INDEX ? SOURCE_MONITOR : (info.flags & PA_SOURCE_HARDWARE ? SOURCE_HARDWARE : SOURCE_VIRTUAL);
 
     if (sourceWidgets.count(info.index))
         w = sourceWidgets[info.index];
@@ -736,7 +737,7 @@ void MainWindow::updateSource(const pa_source_info &info) {
         w->setVolumeMeterVisible(showVolumeMetersCheckButton->get_active());
 
         if (pa_context_get_server_protocol_version(get_context()) >= 13)
-            w->peak = createMonitorStreamForSource(info.index, -1, !!(info.flags & PA_SOURCE_NETWORK));
+            w->peak = createMonitorStreamForSource(info.index, -1, !!(info.flags & PA_SOURCE_NETWORK) || type == SOURCE_MONITOR);
     }
 
     w->updating = true;
@@ -744,7 +745,7 @@ void MainWindow::updateSource(const pa_source_info &info) {
     w->card_index = info.card;
     w->name = info.name;
     w->description = info.description;
-    w->type = info.monitor_of_sink != PA_INVALID_INDEX ? SOURCE_MONITOR : (info.flags & PA_SOURCE_HARDWARE ? SOURCE_HARDWARE : SOURCE_VIRTUAL);
+    w->type = type;
 
     w->boldNameLabel->set_text("");
     gchar *txt;



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/-/commit/1f58c43347c8fe36b88165064ba8196b477525ef

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pavucontrol/-/commit/1f58c43347c8fe36b88165064ba8196b477525ef
You're receiving this email because of your account on gitlab.freedesktop.org.




More information about the pulseaudio-commits mailing list