diff options
author | Kevin Rocard <krocard@google.com> | 2018-08-17 18:43:28 -0700 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-08-17 18:43:28 -0700 |
commit | 7a25163fffa8c4ac2e6bd5e17a035a8f4271b49b (patch) | |
tree | ac4e4f4eca72f473480ae580fe6e092c6ab4bbbf /audio | |
parent | e25775aaecee68ebc2fea134eea6b7305ff36073 (diff) | |
parent | f09c8e2d49240fd675c88392f45bb92b5c792075 (diff) | |
download | android_hardware_interfaces-7a25163fffa8c4ac2e6bd5e17a035a8f4271b49b.tar.gz android_hardware_interfaces-7a25163fffa8c4ac2e6bd5e17a035a8f4271b49b.tar.bz2 android_hardware_interfaces-7a25163fffa8c4ac2e6bd5e17a035a8f4271b49b.zip |
Merge changes from topic "share-buffer" am: 54c3572e99 am: 0005ac0e55
am: f09c8e2d49
Change-Id: Ia853174e0443417ec6406a8a03a551e3e86c7ddd
Diffstat (limited to 'audio')
-rw-r--r-- | audio/core/all-versions/default/include/core/all-versions/default/Stream.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/audio/core/all-versions/default/include/core/all-versions/default/Stream.h b/audio/core/all-versions/default/include/core/all-versions/default/Stream.h index 375759dcf..7cf12dd43 100644 --- a/audio/core/all-versions/default/include/core/all-versions/default/Stream.h +++ b/audio/core/all-versions/default/include/core/all-versions/default/Stream.h @@ -169,6 +169,8 @@ Return<void> StreamMmap<T>::createMmapBuffer(int32_t minSizeFrames, size_t frame bool applicationShareable = halInfo.flags & AUDIO_MMAP_APPLICATION_SHAREABLE || halInfo.buffer_size_frames < 0; halInfo.buffer_size_frames = abs(halInfo.buffer_size_frames); + info.sharedMemory = // hidl_memory size must always be positive + hidl_memory("audio_buffer", hidlHandle, frameSize * halInfo.buffer_size_frames); #ifdef AUDIO_HAL_VERSION_2_0 if (applicationShareable) { halInfo.buffer_size_frames *= -1; @@ -178,9 +180,6 @@ Return<void> StreamMmap<T>::createMmapBuffer(int32_t minSizeFrames, size_t frame halInfo.flags | (applicationShareable ? MmapBufferFlag::APPLICATION_SHAREABLE : MmapBufferFlag::NONE); #endif - - info.sharedMemory = - hidl_memory("audio_buffer", hidlHandle, frameSize * halInfo.buffer_size_frames); info.bufferSizeFrames = halInfo.buffer_size_frames; info.burstSizeFrames = halInfo.burst_size_frames; } |