switch-on-port-available: checking the off profile when switching profile
If the current active profile is off, it has no sinks and sources, and if users plug a headset to the audio port, the profile including this audio port becomes available and should be selected as active profile.
But with the current design, the profile_good_for_output() will return false because the sources in off profile and target profile doesn't match.
For example: (Before users plug headset)
Profiles:
HiFi (Speaker): Default (sinks: 1, sources: 1, priority: 8100, available: no)
HiFi (Headphones): Default (sinks: 1, sources: 1, priority: 8200, available: no)
off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
Active Profile: off`
(After users plug headset)
Profiles:
HiFi (Speaker): Default (sinks: 1, sources: 1, priority: 8100, available: yes)
HiFi (Headphones): Default (sinks: 1, sources: 1, priority: 8200, available: yes)
off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
Active Profile: off
Signed-off-by: Hui Wang hui.wang@canonical.com