module-alsa-card: Report available ports before unavailable ones
authorDavid Henningsson <david.henningsson@canonical.com>
Tue, 5 May 2015 15:01:13 +0000 (17:01 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Tue, 20 Oct 2015 10:13:03 +0000 (13:13 +0300)
commit91313e60a81e96ce976f24c522656c57b4ab94ca
treec55754cf42076de353f544076c6fbd434ea7fb6a
parentf8cd444de0c6dc46cbb7d3d5a0f50b398a60c3bb
module-alsa-card: Report available ports before unavailable ones

In case the same jack causes one port to become available and another
one unavailable, the available should be reported first.

This is to avoid unnecessary changes: e g, consider a 'Headphone Jack'
making 'Headphone' available and 'Speaker' unavailable. In case the
unavailable change triggers first, and there is also a currently available
third port (e g 'Digital out'), the routing system might choose to route
to this port because neither of the 'Speaker' and 'Headphone' ports are
available.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
src/modules/alsa/module-alsa-card.c