Registered Member
|
Hi! I wondered if there was a way to change the master channel in kmix while changing the sound output.
I explain. I've setup a script, which works with pulseaudio, that allows me to "rotate" between sound output with a keyboard shortcut. Now, what I want to do is to "tell" kmix to change the master channel according to the newly chosen output, otherwise I'm not able to use my keyboard volume keys to turn up or down the volume if the output is not the "kmix master channel", it will only turn up and down the volume of my second output... which is pointless since I'm not even using it because I change to another output. I don't know if I made myself clear... If you'd like some command outputs or logs just let me know!! |
Administrator
|
You may find the following output to be of use:
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
The output of qdbus org.kde.kmix /Mixers is:
property read QString org.kde.KMix.MixSet.currentMasterControl property read QString org.kde.KMix.MixSet.currentMasterMixer property read QStringList org.kde.KMix.MixSet.mixers property read QString org.kde.KMix.MixSet.preferredMasterControl property read QString org.kde.KMix.MixSet.preferredMasterMixer signal void org.kde.KMix.MixSet.masterChanged() signal void org.kde.KMix.MixSet.mixersChanged() method void org.kde.KMix.MixSet.setCurrentMaster(QString mixer, QString control) method void org.kde.KMix.MixSet.setPreferredMaster(QString mixer, QString control) 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() But I don't know what more it brings me... |
Administrator
|
To change the master channel, you need to set two things: the master mixer, and the master control. Together, these two determine which channel is changed when you press the up/down volume keys, and which one is displayed in the popup.
You can use the following command to get a list of mixers:
And the following command to get a list of controls from a given mixer (which is /Mixers/0 in this example):
Once you have determined that, you can run the following to change the master mixer and control:
You can use the following two commands to see what the current master mixer and controls are:
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
So It didn't work but maybe I've done something wrong so I'll paste the outputs of the commands above.
gives
gives
then, to change the current master to analog_stereo... I typed
and, to change the current master back to hdmi_stereo... I typed
This is where the thing bugs... it doesns't switch back to hdmi... When I'm first on HDMI and I switch to analog it works.. but when I try to use the second command to switch back nothing happens. P.S. Thanks for your fast replies. |
Administrator
|
Hmm, did this command complete successfully, as it looks like there is only one argument rather than the two that it is supposed to have?
Otherwise, try passing the value of "id" from the mixer and control respectively to the command instead.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered Member
|
Thanks for your help! It seems the code was more responsive with the use of the ids.
It now works! |
Registered Member
|
Can you share this script? I have similar problem viewtopic.php?f=19&t=123962 |
Registered Member
|
newly chosen output, otherwise I'm not able to use my keyboard volume keys to turn up or down the volume if the output is not the "kmix master channel", it will only turn up and down the volume of my second output... which is pointless since I'm not even using it because I change to another output.
(Edit by admin: removed advertisement link, please see the forum rules) |
Registered Member
|
This is the correct method of setting the master channel through qdbus:
First, manually select the first master channel from the GUI. The output of this will be the mixer:
The output of this will be the control:
Select the second master channel from the GUI. Run the previous command again to get the secondary control ID. To set the new master channel from qdbus:
|
Registered users: Bing [Bot], Evergrowing, Google [Bot], ourcraft