drosca added a comment.

  >   What do I need to add in this file to make the comparision with 
"Port.Available" instead?
  
  You probably forgot import org.kde.plasma.private.volume.
  
  > We now know which ports of which sink are currently connected, right? When 
I take a look at my audio sink directly on the mainboard, it has one port at 
the back (lineout) and one at the front (headphones). I can switch between them 
in the KCM, which only changes the volume, but not the direction. I.e. when I 
have connected headphones I cannot change here to the port on the back, the 
sound will still come via the front port and the back port is marked as not 
available. When I manually disconnect the headphone, it switches to the back 
again. So is there a way to change this behaviour?
  
  You can probably change it, but only in pulseaudio configuration (most likely 
changing some modules properties or loading/unlading modules). You can't do 
that with plasma-pa.
  
  > To know if a device is currently "connected", we would need to loop over 
all its port and check if atleast one of them is connected, right? But what 
about the "State" property of a sink? It seems to also indicate, if the device 
is currently used. Should we use this one instead?
  
  Correct, it indicates if you have "jack" connected in port. `State` property 
of Device is different thing, it indicates whether the device is currently 
playing any audio (if it has some streams, if the streams are currently playing 
or not).

REPOSITORY
  R115 Plasma Audio Volume Applet

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D4736

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: drosca, #plasma, subdiff
Cc: subdiff, broulik, plasma-devel, progwolff, lesliezhai, ali-mohamed, 
jensreuterberg, abetts, sebas, apol

Reply via email to