audio: fix IStream.createMmapBuffer()
Do not close the native fd for shared memory passed by
the legacy HAL as it is owned by tinyalsa implementation.
Test: test MMAP NO IRQ playback and capture streams
Bug: 31458351
Change-Id: Ie0c2a38574e5ac5c13fdb8a5c81fd02cf7d0e47a
diff --git a/audio/2.0/default/Stream.h b/audio/2.0/default/Stream.h
index 63ea1bb..b49e658 100644
--- a/audio/2.0/default/Stream.h
+++ b/audio/2.0/default/Stream.h
@@ -146,7 +146,6 @@
}
_hidl_cb(retval, info);
if (hidlHandle != nullptr) {
- native_handle_close(hidlHandle);
native_handle_delete(hidlHandle);
}
return Void();