| Summary: | Add DBus function to adjust volume directly | ||
|---|---|---|---|
| Product: | [Applications] kmix | Reporter: | em2cEYhqFfLon |
| Component: | general | Assignee: | Christian Esken <esken> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | wishlist | CC: | jjm |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
em2cEYhqFfLon
2022-11-22 08:26:37 UTC
There is already a DBus interface to set the absolute volume of any channel. It is not obvious how to set a read/write value via qdbusviewer (use "Set value" in the context menu) but it can be accessed via the command line, for example: # read the current absolute volume $ qdbus org.kde.kmix /Mixers/ALSA__HDA_ATI_SB_1/Master_0 absoluteVolume 27 # ses the current absolute volume $ qdbus org.kde.kmix /Mixers/ALSA__HDA_ATI_SB_1/Master_0 absoluteVolume 16 # read the max/min values if required to calculate from/to a percentage $ qdbus org.kde.kmix /Mixers/ALSA__HDA_ATI_SB_1/Master_0 absoluteVolumeMax 31 $ qdbus org.kde.kmix /Mixers/ALSA__HDA_ATI_SB_1/Master_0 absoluteVolumeMin 0 You can also read the current master card and control if you don't have them already (replace all colons in the control name with underscores to derive the DBus path used above): $ qdbus org.kde.kmix /Mixers currentMasterMixer ALSA::HDA_ATI_SB:1 $ qdbus org.kde.kmix /Mixers currentMasterControl Master:0 (In reply to Jonathan Marten from comment #1) > There is already a DBus interface to set the absolute volume of any channel. > It is not obvious how to set a read/write value via qdbusviewer (use "Set > value" in the context menu) but it can be accessed via the command line, for > example: > > # read the current absolute volume > $ qdbus org.kde.kmix /Mixers/ALSA__HDA_ATI_SB_1/Master_0 absoluteVolume > 27 > # ses the current absolute volume > $ qdbus org.kde.kmix /Mixers/ALSA__HDA_ATI_SB_1/Master_0 absoluteVolume 16 > # read the max/min values if required to calculate from/to a percentage > $ qdbus org.kde.kmix /Mixers/ALSA__HDA_ATI_SB_1/Master_0 absoluteVolumeMax > 31 > $ qdbus org.kde.kmix /Mixers/ALSA__HDA_ATI_SB_1/Master_0 absoluteVolumeMin > 0 > > You can also read the current master card and control if you don't have them > already (replace all colons in the control name with underscores to derive > the DBus path used above): > > $ qdbus org.kde.kmix /Mixers currentMasterMixer > ALSA::HDA_ATI_SB:1 > $ qdbus org.kde.kmix /Mixers currentMasterControl > Master:0 Thank you very much Mr., |