Commit 10a0c18b authored by David Henningsson's avatar David Henningsson Committed by Arun Raghavan
Browse files

sound: Fix port handling for the unknown availability case

The current code assumes that port availability transitions will be
between YES and NO, and doesn't account for the fact that it may also be
UNKNOWN. This causes spurious entries if the port availability
transitions between YES and UNKNOWN.
parent 54f2f8f3
......@@ -2138,7 +2138,7 @@ update_card (GvcMixerControl *control,
else {
for (i = 0; i < info->n_ports; i++) {
if (g_strcmp0 (card_port->port, info->ports[i]->name) == 0) {
if (card_port->available != info->ports[i]->available) {
if ((card_port->available == PA_PORT_AVAILABLE_NO) != (info->ports[i]->available == PA_PORT_AVAILABLE_NO)) {
card_port->available = info->ports[i]->available;
g_debug ("sync port availability on card %i, card port name '%s', new available value %i",
gvc_mixer_card_get_index (card),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment