Add a KCM setting to control pulse audio module combine-sinks
ClosedPublic

Authored by davidedmundson on Jul 3 2016, 11:33 PM.

Details

Summary

Add a KCM setting to control pulse audio module combine-sinks

This allows one to stream the same audio to multiple devices, for example
the normal headphone port on a laptop and a USB device.

We use GConf rather than calling load_module directly as we need
pulseaudio to restore the settings after restart. There is a gconf module
in pulseaudio already monitoring this setting.

GConf code is wrapped via a fork of a class from libqtgconf, but modified
so that we only create one QObject per gconf subtree.

GConf code seting code is based on the code in paprefs.

Test Plan

Clicked checkbox - ensured new output appeared
Confirmed checkbox initial state is correct
Confirmed toggling the setting in paprefs updates the checkbox in real time

Diff Detail

Repository
R115 Plasma Audio Volume Applet
Branch
qgconf
Lint
No Linters Available
Unit
No Unit Test Coverage
davidedmundson retitled this revision from to Add a KCM setting to control pulse audio module combine-sinks.
davidedmundson updated this object.
davidedmundson edited the test plan for this revision. (Show Details)
davidedmundson added a reviewer: Plasma.
Restricted Application added a project: Plasma. · View Herald TranscriptJul 3 2016, 11:33 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik added a subscriber: broulik.Jul 4 2016, 4:03 PM

Nice! Check your coding style, though.

Can we perhaps add a special sorting logic so this virtual device always shows at the top of the list? We have something similar to keep the "Notification Sounds" stream always ontop.

drosca added a subscriber: drosca.Jul 5 2016, 9:47 AM

Can we perhaps add a special sorting logic so this virtual device always shows at the top of the list? We have something similar to keep the "Notification Sounds" stream always ontop.

If this creates virtual device, then it wouldn't be displayed at all currently as virtual devices are now filtered out.

Then it's not technically a virtual device as it shows as "simultaneous output to x, y, and z" in the list.

Coding style changes

drosca requested changes to this revision.Jul 13 2016, 6:26 PM
drosca added a reviewer: drosca.
drosca added inline comments.
src/modulemanager.cpp
33 ↗(On Diff #5133)

Can this be QStringLiteral?

35 ↗(On Diff #5133)

remove space before comma: &GConfItem::subtreeChanged ,

45 ↗(On Diff #5133)

QStringLiteral

src/modulemanager.h
42 ↗(On Diff #5133)

*parent = nullptr

50 ↗(On Diff #5133)

remove

This revision now requires changes to proceed.Jul 13 2016, 6:26 PM
davidedmundson edited edge metadata.

Addressed David's comments

drosca accepted this revision.Jul 13 2016, 6:35 PM
drosca edited edge metadata.

Please fix that last style issue and push, thanks!

src/modulemanager.h
42

This needs spaces around = *parent = nullptr

This revision is now accepted and ready to land.Jul 13 2016, 6:35 PM
davidedmundson edited edge metadata.

spaces

This revision was automatically updated to reflect the committed changes.