<table><tr><td style="">drosca added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D4736" rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">What do I need to add in this file to make the comparision with "Port.Available" instead?</pre></div></blockquote>

<p>You probably forgot import org.kde.plasma.private.volume.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>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?</p></blockquote>

<p>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.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>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?</p></blockquote>

<p>Correct, it indicates if you have "jack" connected in port. <tt style="background: #ebebeb; font-size: 13px;">State</tt> 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).</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R115 Plasma Audio Volume Applet</div></div></div><br /><div><strong>BRANCH</strong><div><div>master</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D4736" rel="noreferrer">https://phabricator.kde.org/D4736</a></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>drosca, Plasma, subdiff<br /><strong>Cc: </strong>subdiff, broulik, plasma-devel, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol<br /></div>