audio hal: Fix set_parameters behavior

Allow device change for active streams. Previously this was
not allowed. The origin of this restriction is from the old
emulator, and the reason for introducing it were failing
AudioRecordingConfiguration CTS tests which we are anyway
fixing in this topic.

Removing this restriction fixes flakiness of audio CTS tests
that use audio input due to interference from GSA hotword
detection.

Remove support for "device connect" and "device disconnect"
parameters on streams. They were originally added due to an
error in Audio HAL V2.0 interface in order to pass VTS tests. As
cuttlefish uses HAL V5.0, they are no more needed.

Move KV pairs parsing out from critical sections to reduce
contention.

Bug: 136279123
Test: atest CtsNativeMediaAAudioTestCases:android.nativemedia.aaudio.AAudioTests
      vts-tradefed run commandAndExit vts -m VtsHalAudioV5_0Target
Change-Id: I26e318b292c06965f7ba89ee2a55ecd870e2a572
1 file changed
tree: 3c3c2f58499a99e1bcb87e0ed36b76970690f310
  1. common/
  2. guest/
  3. host/
  4. tests/
  5. tools/
  6. Android.bp
  7. Android.mk
  8. OWNERS
  9. TEST_MAPPING