audio: set hotword input for soundtrigger only

The sound_trigger session might have been paused while
soundtrigger client starts to record.

In this corner case, this input won't be detected as
soundtrigger input in audio HAL since the st_session handle
has been removed because the st_session is in pause state.

Then soundtrigger input will try to open pcm driver and
act as normal audio record, it will cause race condition
on pcm node.

To fix this, set the input with AUDIO_INPUT_FLAG_HW_HOTWORD
flag to be always soundtrigger input.

Bug: 135059114
Test: hotword/music detection works
Change-Id: I4475bfb1d3e2c9b998c583e9244c0aa4f07b2134
Signed-off-by: Carter Hsu <carterhsu@google.com>
1 file changed
tree: 79a090807abb33f1215f4b3de3415f13daa2190e
  1. hal/
  2. legacy/
  3. post_proc/
  4. visualizer/
  5. voice_processing/
  6. Android.mk
  7. OWNERS