<table><tr><td style="">nicolasfella requested changes to this revision.<br />nicolasfella added a reviewer: drosca.<br />nicolasfella added a comment.<br />This revision now requires changes to proceed.
</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/D13694">View Revision</a></tr></table><br /><div><div><p>This breaks the profile selection Combobox in the KCM.</p>

<p>From the libpulse <a href="https://freedesktop.org/software/pulseaudio/doxygen/structpa__card__profile__info2.html#a9c32760168c4151aa4716f2bd9fab434" class="remarkup-link" target="_blank" rel="noreferrer">doc</a> on Profile:</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>Is this profile available? If this is zero, meaning "unavailable", then it makes no sense to try to activate this profile.<br />
If this is non-zero, it's still not a guarantee that activating the profile will result in anything useful, it just means that the server isn't aware of any reason why the profile would definitely be useless.</p></blockquote>

<p>So anything different to zero should be interpreted as Profile::Available. If a profile reports 1 it should be interpreted as Available, but now would result in PA_PORT_AVAILABLE_NO.</p>

<p>From libpulse:</p>

<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);">typedef enum pa_port_available {
    PA_PORT_AVAILABLE_UNKNOWN = 0, /**< This port does not support jack detection \since 2.0 */
    PA_PORT_AVAILABLE_NO = 1,      /**< This port is not available, likely because the jack is not plugged in. \since 2.0 */
    PA_PORT_AVAILABLE_YES = 2,     /**< This port is available, likely because the jack is plugged in. \since 2.0 */
} pa_port_available_t;

/** \cond fulldocs */
#define PA_PORT_AVAILABLE_UNKNOWN PA_PORT_AVAILABLE_UNKNOWN
#define PA_PORT_AVAILABLE_NO PA_PORT_AVAILABLE_NO
#define PA_PORT_AVAILABLE_YES PA_PORT_AVAILABLE_YES</pre></div>

<p>Assuming the idea behind your patch is correct it should be moved to the Port class.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R115 Plasma Audio Volume Applet</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D13694">https://phabricator.kde.org/D13694</a></div></div><br /><div><strong>To: </strong>akrutzler, nicolasfella, broulik, drosca<br /><strong>Cc: </strong>plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart<br /></div>