This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KMix DCOP interface

Tags: None
(comma "," separated)
satan
Registered Member
Posts
3
Karma
0

KMix DCOP interface

Fri Dec 22, 2017 10:40 pm
I have a question - how can I use the KMix KDCOP interface from command line in KDE Applications 17.12? Namely, how can I toggle audio playback device with this interface? I remember there used to be 'kdcop' tool for this purpose, but I can't find it anywhere...

My problem: PC I am using has two playback devices - a dedicated headphone amplifier and AV receiver which drives the speaker. I would like to quickly toggle between these two, by just using a keyboard shortcut (using the KMix GUI, these are 3 clicks; this is too much). My plan is to define a keyboard shortcut, which will tell the KMix to toggle the sources (if there is no 'toggle' option, just setting the specified source - this is also OK, I can define one shortcut for speakers and another one for the headphones).
lueck
Mentor
Posts
225
Karma
2
satan
Registered Member
Posts
3
Karma
0

Re: KMix DCOP interface

Sat Dec 23, 2017 12:04 pm
Unfortunately, this does not work for me, despite kmix running, with it's icon visible in the tray:

$ qdbus org.kde.kmix
Service 'org.kde.kmix' does not exist.


Do I need to install some additional package?

Can't I just use the DCOP? I remember there was a nice graphical browser for all the propertieses, and I remember it worked as a charm...
tosky
Registered Member
Posts
210
Karma
3

Re: KMix DCOP interface

Sat Dec 23, 2017 12:22 pm
DCOP was replaced by D-Bus for at least 12 years. There is no DCOP anymore.

Regarding the dbus interface, you probably don't have kmix running; the default mixer in Plasma is a plasmoid which does not expose the dbus interface.


tosky, proud to be a member of KDE forums since 2008-Oct.
satan
Registered Member
Posts
3
Karma
0

Re: KMix DCOP interface

Sat Dec 23, 2017 12:39 pm
OK, launched the kmix manually, but I can't find anything to toggle the sources - it seems the interface can only do what the legacy kmix could do:

Code: Select all
$ qdbus org.kde.kmix
/
/MainApplication
/Mixers
/Mixers/PulseAudio__Capture_Devices_1
/Mixers/PulseAudio__Capture_Streams_1
/Mixers/PulseAudio__Playback_Devices_1
/Mixers/PulseAudio__Playback_Devices_1/alsa_output_pci_0000_00_1b_0_iec958_stereo
/Mixers/PulseAudio__Playback_Devices_1/alsa_output_pci_0000_01_00_1_hdmi_stereo_extra1
/Mixers/PulseAudio__Playback_Streams_1
/Mixers/PulseAudio__Playback_Streams_1/restore_sink_input_by_media_role_event
/kmix
/kmix/KMixWindow
/kmix/KMixWindow/actions
/kmix/KMixWindow/actions/file_quit
/kmix/KMixWindow/actions/options_show_menubar
/kmix/KMixWindow/actions/options_configure
/kmix/KMixWindow/actions/options_configure_keybinding
/kmix/KMixWindow/actions/launch_kdesoundsetup
/kmix/KMixWindow/actions/hwinfo
/kmix/KMixWindow/actions/hide_kmixwindow
/kmix/KMixWindow/actions/toggle_channels_currentview
/kmix/KMixWindow/actions/select_master
/kmix/KMixWindow/actions/save_1
/kmix/KMixWindow/actions/save_2
/kmix/KMixWindow/actions/save_3
/kmix/KMixWindow/actions/save_4
/kmix/KMixWindow/actions/load_1
/kmix/KMixWindow/actions/load_2
/kmix/KMixWindow/actions/load_3
/kmix/KMixWindow/actions/load_4
/kmix/KMixWindow/actions/increase_volume
/kmix/KMixWindow/actions/decrease_volume
/kmix/KMixWindow/actions/mute
/org
/org/kde
/org/kde/kmix

$ qdbus org.kde.kmix /Mixers/PulseAudio__Playback_Devices_1/alsa_output_pci_0000_00_1b_0_iec958_stereo
property readwrite int org.kde.KMix.Control.absoluteVolume
property read int org.kde.KMix.Control.absoluteVolumeMax
property read int org.kde.KMix.Control.absoluteVolumeMin
property read bool org.kde.KMix.Control.canMute
property read bool org.kde.KMix.Control.hasCaptureSwitch
property read QString org.kde.KMix.Control.iconName
property read QString org.kde.KMix.Control.id
property readwrite bool org.kde.KMix.Control.mute
property read QString org.kde.KMix.Control.readableName
property readwrite bool org.kde.KMix.Control.recordSource
property readwrite int org.kde.KMix.Control.volume
method void org.kde.KMix.Control.decreaseVolume()
method void org.kde.KMix.Control.increaseVolume()
method void org.kde.KMix.Control.toggleMute()
signal void org.freedesktop.DBus.Properties.PropertiesChanged(QString interface_name, QVariantMap changed_properties, QStringList invalidated_properties)
method QDBusVariant org.freedesktop.DBus.Properties.Get(QString interface_name, QString property_name)
method QVariantMap org.freedesktop.DBus.Properties.GetAll(QString interface_name)
method void org.freedesktop.DBus.Properties.Set(QString interface_name, QString property_name, QDBusVariant value)
method QString org.freedesktop.DBus.Introspectable.Introspect()
method QString org.freedesktop.DBus.Peer.GetMachineId()
method void org.freedesktop.DBus.Peer.Ping()


Or maybe am I wrong?


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], lockheed