History log of /frameworks/av/services/oboeservice/AAudioServiceEndpoint.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
523b3047af443d0a51141ddabd328d52be5a23b0 13-Sep-2017 Phil Burk <philburk@google.com> aaudio: keep track of streams using strong pointers

Maintain strong pointer to service stream during service calls.
Use simple AAudioStreamTracker instead of complex HandleTracker.

Bug: 65280854
Test: affects all MMAP streams, run all CTS tests, etcetera
Change-Id: I3d2ed8b588ea39c216dacd4dea503b11c33f36f3
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.cpp
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.cpp
a5222e298c294781067950a7cc319d3278fa845a 28-Jul-2017 Phil Burk <philburk@google.com> aaudio: improve error logging

Report when INVALID_STATE returned.
This was used to debug monkey test errors.
Cleanup some log messages.
Improve "dumpsys media.aaudio"

Bug: 64310586
Test: CTS nativemedia/aaudio
Change-Id: Ifbcac4794cda22cccbacff6352243c0ef4589c53
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.cpp
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.cpp
c1fe2634dc228640119849692cd1defb88bc2209 19-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "aaudio: fix intermittent hang and position error" into oc-dr1-dev
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.cpp
901f65deb49786f4dffd39ac965c0bb681392c0b 13-Jul-2017 jiabin <jiabin@google.com> Add parameters validation on AAudio MMap server

Bug: 63384314
Test: adb shell /system/bin/write_sine -m -pl -n4 \
&& adb shell /system/bin/write_sine -pl -n4 \
&& adb shell /system/bin/write_sine_callback -m -pl -n4 \
&& adb shell /system/bin/write_sine_callback -pl -n4 \
&& adb shell /system/bin/CtsNativeMediaAAudioTestCases32

Change-Id: I462f956e8fc25eb583699af6389e0f299243eafb
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.cpp
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.cpp
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.cpp
5ef003b750ae5188c36d6512584da442be125148 30-Jun-2017 Phil Burk <philburk@google.com> aaudio: disconnect when onTearDown() called

It will be called, for example, when switching from speaker to Bluetooth.

Bug: 62883778
Test: run a long app and switch to or from Bluetooth
Change-Id: Iafb9b52d85c30fee71de46abfb99a27a1daabf59
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.cpp
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.cpp
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.cpp
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.cpp
cf5f6d2825d9a8430a291042ca9c6f68e5b666d0 26-May-2017 Phil Burk <philburk@google.com> aaudio: reduce logspam, improve critical logs

This will make AAudio less annoying and easier to debug.

Bug: 62080950
Test: look in logcat
Change-Id: Id7ae26a212f83ea8be0b285bd20334eb48607be8
Signed-off-by: Phil Burk <philburk@google.com>
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.cpp
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.cpp
37dad7380c04cd4343999ffba012a0542482acea 23-May-2017 Phil Burk <philburk@google.com> aaudio: fix mixer volume to match AudioTrack

Bug: 62033564
Test: write_sine.cpp - play with MMAP and with Legacy and compare by ear

Change-Id: I4d142f872fabb732cab01bec8c17d821232ab2d1
Signed-off-by: Phil Burk <philburk@google.com>
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.cpp
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.cpp
e572f469de5dca1078a79d3d80e5b04f96ae7505 20-Apr-2017 Phil Burk <philburk@google.com> aaudio: apply volume in the MMAP data path

The volume scaling is in AudioStreamInternal and not the mixer
because we will need volume scaling in EXCLUSIVE mode too.

Bug: 37518243
Test: play a tone using NativeOboe app then press volume keys
Change-Id: Ibbac9770ea4493f8ade64681be86f109a92803cd
Signed-off-by: Phil Burk <philburk@google.com>
/frameworks/av/services/oboeservice/AAudioServiceEndpoint.cpp
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.cpp
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.cpp