Merge changes I2a915950,I968b705c into main

* changes:
  Close input streams for external devices immediately after probing
  APM: return compatibility score to indicate how the profile is compatible for the given parameters.