hal: optimize worst case soundcard detection time

current sound card detection logic
   - iterate from sound card 0 to Max i.e. 8
   - on each iteration check if soundcard is not enumerated then
     wait for 500 ms and check again, try up-to 10 retries
   - worst case time is 40 sec  (8 * 10 * 500ms)
New sound card detection logic
   - iterate for max retries i.e. 10
   - on each iteration check if any new sound card enumerated i.e.
     probe soundcard only if on previous iteration it failed
   - on failure move to next card until all card are verified
   - at this point wait for 500ms and retry
   - worst case time is 5 sec  (10 * 500ms)

BUG: 31189013
Change-Id: Ice4b8362e59c60be69e92e33d502f469d41a7b46
1 file changed
tree: 407bedd70a7b6dd243292316bd7b3b662d1569c7
  1. hal/
  2. legacy/
  3. post_proc/
  4. visualizer/
  5. voice_processing/
  6. Android.mk