History log of /frameworks/av/services/oboeservice/AAudioServiceEndpoint.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
39f02ddfbfd9313370d862a6c4727826379a319a 04-Aug-2017 Phil Burk <philburk@google.com> aaudio: fix EXCLUSIVE mode interfering with SHARED

The MMAP endpoints were not tracked by the EndpointManager
so it could not broker EXCLUSIVE access. To fix this the MMAP stream
was refactored to use a per-client stream and a per-device endpoint.

Cleanup close() of MMAP stream.
Add AAudioServiceEndpointShared.cpp.
Extract AAudioServiceEndpointMMAP from AAudioServiceStreamMMAP.
Track MMAP endpoints so we can manage EXCLUSIVE and SHARED access.

Bug: 64494572
Bug: 64310586
Test: see bug, use write_sine to play a shared stream and a excl stream
Change-Id: I5053193abfd9b8a69a2f7e1110739d65e2af5d64
Merged-In: I5053193abfd9b8a69a2f7e1110739d65e2af5d64
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.h
97350f9df7252c881f011a410fcd9e6d766d2bee 22-Jul-2017 Phil Burk <philburk@google.com> aaudio: improve accuracy of timestamps

Account for latency added by the AAudio service.
Fix input timestamps.

Bug: 37080396
Test: test_timestamps.cpp input_monitor.cpp
Change-Id: I1053cd21af722bb9b9371df4e5731bf4a0a57b0b
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.h
940083c3049e269f6c150d5477eccb6bad32b129 18-Jul-2017 Phil Burk <philburk@google.com> aaudio: fix intermittent hang and position error

Fix hang caused by recursive mutex.
Fix disconnect caused by getPosition() failing, which was
just because the stream wasn't ready yet.

Bug: 63775537
Bug: 63709749
Test: run "aaudio_loopback -pl -Pl -c2 -n6 -te -m" many times
Change-Id: Ic1d54360b55cfc8ecc1809584c262bc0976c58bb
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.h
cb4dae216758d9e9a28050f65097f1ce905c03e9 02-Jul-2017 Eric Laurent <elaurent@google.com> aaudio: indicate client UID and PID to audio flinger

Implement correct indication of client UID and PID to audio flinger
for AAudio MMAP streams in both exclusive mode and shared mode.
- Add start/stop client methods on MMAP streams used only when the MMAP
stream is in AAudio service and carries a mix of shared streams.
- Add "In Service'" indication from "client" side to AAudioServiceStreamMMAP
so that the behavior can be adapted accordingly.
- Modify logic on audio flinger side with regard to mmap tracks and
audio HAL stream activity:
- use same audio session for all clients on a same stream to match
audio policy logic to share same direct output stream for clients on same
session. This is also more consistent with current volume and effect
handling as all MMAP clients sharing the same output stream have the
same volume and use case.
- start/stop the HAL when the stream is started/stopped with the initial client
handle (returned when the stream is opened) but do not create a track.
AAudioService implementation will always send an additional start command before
first client starts and a stop command after last client stops,
in both shared and exclusive mode.
- start/stop a track only if the start/stop stream command is received
with a handle different from the initial handle.
- Allow more than one active client from the same UID on a MMAP input in audio policy.

Bug: 62950008
Test: verify playback and capture in mmap mode
Merged-In: I86151bbb637ff172d2fd5f813056eab13a7bcd3c
Change-Id: I86151bbb637ff172d2fd5f813056eab13a7bcd3c
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.h
4501b3510f9b2af2ff63a0471de24e3feea1d0a8 30-Jun-2017 Phil Burk <philburk@google.com> aaudio: improved dumpsys

Add more information about various streams and endpoints.

Bug: 38396780
Test: adb shell dumpsys media.aaudio
Change-Id: I5cc116574bfc3aa93703c182d933dbdfcbefad7a
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.h
a17ae74e3570a5afa2ece02d2b4090ba7b731bc1 30-Jun-2017 Eric Laurent <elaurent@google.com> aaudio: modify endpoint sharing logic

A new Client stream in shared mode can share an existing endpoint
if it has no preferences or compatible device, sample rate and channel
count requests.

Bug: 62961537
Test: play and capture with AAudio in mmap mode
Change-Id: I38536fb486dfc06f4399f7d02248384583fd3a17
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.h
11e8d335b1da528ee771b19b63df23ae6fd52f41 24-May-2017 Phil Burk <philburk@google.com> aaudio: close MMAP stream if client dies

Notify client when audio service dies. Clear connection.
Notify AAudio service when client dies. Close client streams.

Use sp<> to track ServiceStreams.

Bug: 38267698
Test: test_no_close.cpp
Change-Id: I5f1699ed3b8b7bd960947c0028a89ca8419ce7a0
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.h
ec89b2e2f8c84a7d3936db1a888034f4a4b0df16 21-Jun-2017 Phil Burk <philburk@google.com> aaudio: fix CTS for MMAP mode

Improve calculation of buffer capacity based on requested minimum.
Adjust timing of start() to reduce underflows.
Track ServiceEndpoints based on requested deviceId.
Fix getFramesRead() and flush() behavior.
Fix timeouts due to ClockModel lateness bug.
Misc cleanup.

Bug: 37755299
Test: test_aaudio.cpp
Change-Id: I637c16e87fbe14b6f28c60aeea0b9dfed965ecd0
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.h
87c9f646a94259d7c321c3b3d5947fa1778f5ac2 17-May-2017 Phil Burk <philburk@google.com> aaudio: lower latency using MMAP capture

MMAP can be enabled by setting system properties.

Bug: 38267780
Test: input_monitor.cpp
Change-Id: I5e86fd1d9baef4fe59837ccbca7971acbb54d8b5
Signed-off-by: Phil Burk <philburk@google.com>
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.h
c8f69a08a409fd163873d725c63f8d60259ae21d 12-May-2017 Phil Burk <philburk@google.com> aaudio: control MMAP mode using system properties

To facilitate testing of MMAP mode.

Bug: 38268547
Test: set properties, see framesPerBurst in write_sine_callback.cpp
Change-Id: I6e15c563215017f6a5020d89ac312ff8331afc4f
Signed-off-by: Phil Burk <philburk@google.com>
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.h
71f35bb687476694882a617ba4a810a0bb56fe23 14-Apr-2017 Phil Burk <philburk@google.com> aaudio: fix SHARED MMAP mode in server plus other bugs

Fixed some buffer miscalculations, and some NPEs in the close() code.
Added debugging and some general cleanup.
Fixed data conversion.
Fixed start/pause/flush in server.
Added reference counting in server for endpoints.
Programs can now be ran more than once.
General code cleanup.
Reconnect with service if server dies.
Move stop() logic into server for better synchronization.
Add sleep to prevent race condition when closing an MMAP stream.

Bug: 33398120
Test: two write_sine_callback.cpp can be run simultaneously
Change-Id: Ibb006215a498868c222228d675ff961d7e0bf514
Signed-off-by: Phil Burk <philburk@google.com>
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.h
c0c70e3c7dd10bc2c0caffcab1f3f5fb406b35fb 09-Feb-2017 Phil Burk <philburk@google.com> AAudioService: integrated with audioserver

Call the MmapStreamInterface from AudioFlinger instead of the FakeHAL.
Fix sending timestamps from the thread.
Add shared mode in service.

Bug: 35260844
Bug: 33398120
Test: CTS test_aaudio.cpp
Change-Id: I44c7e4ecae4ce205611b6b73a72e0ae8a5b243e5
Signed-off-by: Phil Burk <philburk@google.com>
(cherry picked from commit 7f6b40d78b1976c78d1300e8a51fda36eeb50c5d)
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.h