card-restore: don't switch profiles when availability changes
authorTanu Kaskinen <tanuk@iki.fi>
Sun, 7 Aug 2016 15:45:49 +0000 (18:45 +0300)
committerTanu Kaskinen <tanuk@iki.fi>
Wed, 10 Aug 2016 18:37:33 +0000 (21:37 +0300)
commitc538bc7aa42e8853cd155d53aeed1221eed3c1fb
tree77169b5f65bf9ed9772afabc6676c7e8e79d380e
parentd9b885e0f1d3eafd38b7ff8ff09c31c040d85b47
card-restore: don't switch profiles when availability changes

module-card-restore should only restore the initial state of new
cards, but profile_available_changed_callback() changed the profile
whenever the saved profile became available. That caused interference
with module-bluetooth-policy, which also sets card profiles based on
the availability changes.

The original reason for having this code was to work around the
problem that bluetooth cards used to be created with only one profile
available, and other profiles would become available soon after the
card creation. Now the bluetooth card creation is delayed until all
profiles are available, so this bad workaround can be removed.

Discussion:
https://lists.freedesktop.org/archives/pulseaudio-discuss/2016-August/026575.html
src/modules/module-card-restore.c