Player type AAudio are always initialized with AUDIO_USAGE_MEDIA. Added
fix to initialize with assigned usage.
Bug: 143578354
Test: ran native application with usage of AUDIO_USAGE_NOTIFICATION
Test: atest CtsNativeMediaAAudioTestCases
Change-Id: I170e0b55d7f90b59d9b5129b22f4a9080957994b
Merged-In: I170e0b55d7f90b59d9b5129b22f4a9080957994b
This change moves almost everything from libaadio.so to
separate libaaudio_internal.so library. This is done to
avoid exporting symbols which apps are not allowed to use
but have them available for platform libraries by exporting
them from libaaudio_internal.so
Bug: http://b/69603741
Test: make
Merged-In: If93118ed2c266faf2964abf21e17b0b13df493d2
Change-Id: If93118ed2c266faf2964abf21e17b0b13df493d2
In previous attempt it was mistakenly applied to cc_library_header
instead of the actual library. Do it correctly this time.
The intention of this change is to hide unintentionally
exported symbols from the library.
Bug: http://b/69603741
Test: make
Change-Id: I47967abea0b39aec05e80823c9eb3fe53f9fa591
This change moves almost everything from libaadio.so to
separate libaaudio_internal.so library. This is done to
avoid exporting symbols which apps are not allowed to use
but have them available for platform libraries by exporting
them from libaaudio_internal.so
Bug: http://b/69603741
Test: make
Merged-In: If93118ed2c266faf2964abf21e17b0b13df493d2
Change-Id: If93118ed2c266faf2964abf21e17b0b13df493d2
This will allow AAudio to track the DSP better when
the DSP has variable timing, such as when resampling.
Keep track of the maximum lateness.
Do not assume it is only one burst.
Account for the lateness on the input streams
so we don't try to read the data before the DSP
has written it.
Bug: 123643363
Test: record through iRig UA using Oboe Tester
Test: see bug for details
Change-Id: I49eb852c6d0324e8a26ee912da5108021ec113fe
Close a stream at the same time the callback
is trying to stop the stream. This replicates
a hang that was detected in SynthMark.
Bug: 134963902
Test: this is a test
Change-Id: I7c87ecfefa2498fd1f4f9a1e406118c42a78545b
Unlock and lock around the join() because the callback
thread that we are joining may be blocked by the lock.
Check for DISCONNECTED state so the error callback is
also joined correctly.
Remove unnecessary waitForStateChange that could cause
a timeout delay on DISCONNECT.
Bug: 134963902
Test: test_stop_hang (see bug report)
Change-Id: I5080fa655da35b3221234a2bcafb6ccd71d3ca27
Correct an error that caused the timing window to jump
forward in time by one burst when a late timestamp was detected.
Bug: 133513175
Bug: 122680738
Bug: 123643363
Test: aaudio_loopback -tm -s20
Change-Id: I65c05d2ab123bcd347cb900de055c49c0c9beada
Two fixes for multichannel playback over USB from
AAudio legacy streams:
1: AAudio use a channel index mask and not a positional mask
when channel count is greater than 2.
2: audio policy gives priority to an output mixer which can support
the requested channel mask without downmixing
Bug: 131685020
Test: play multichannel audio over USB
Change-Id: I13f2da48d47fcf81f522096d90ba59a89379cffb
AAudioService would fail if a null client was passed.
Two null checks were added. One where we know the null
client first appears. And one where the client is first used
in case other calls are passing null.
Bug: 116230453
Test: Bug has a POC apk that triggers the bug.
Test: Look for messages like:
Test: AAudio : BnAAudioService::onTransact() client is NULL!
Change-Id: Id9c4fc154226ab40df97335da8bc9361cfc99a73
This will more accurately track the read or write
position of the DSP.
The client sometimes aggregates multiple hardware bursts
to avoid waking up too often. This can make it look like the DSP has
processed a larger amount of memory than it really has.
With this change, the timing model will advance in sync with the hardware.
Bug: 117834966
Bug: 130911274
Test: see bug for repro steps
Change-Id: Id22f1f313e02f0514665ee5ac144cab4684e3bc1
Reduce log spam and error logging as part of the Green Log effort.
Replace logging of addresses with integer IDs.
Bug: 36785118
Bug: 122073229
Bug: 130569151
Test: Open an AAudio stream at 44100 and look at logcat.
Test: adb shell write_sine_callback -pl -r44100
Test: adb logcat | grep -i aaudio | grep " E "
Test: Should see no "E" logs from AAudio.
Test: Should see no addresses from AAudio.
Change-Id: I1d4e0bc349095f818fad52603d2bb8e7317d3681
Merged-In: I1d4e0bc349095f818fad52603d2bb8e7317d3681
(cherry picked from commit 7ba46558fb)
This can cause a stream to get suspended if not processed.
Bug: 129140370
Test: this is a test
Test: test_full_queue
Change-Id: Ib8961ad708cb258c08a956c6ced813f23c437fc4
Clip setBufferSizeInFrames() to at least one burst
for Legacy streams to avoid underruns.
Bug: 129545119
Test: Look at BufferSize when you run this.
Test: adb shell write_sine_callback -pn -n0
Test: It should not glitch.
Change-Id: Id82862d59122ba2d9dd98dff579b5c147e40fab5
The opt-out was not published in the map.txt
Test: atest CtsNativeMediaAAudioTestCases
Change-Id: Ie4dec4abd9c569e2459dd02f9f372e30dd42267f
Signed-off-by: Kevin Rocard <krocard@google.com>
The opt-out was only present in the java API but not on the native ones.
Test: atest test_attributes
Change-Id: I1b84f1a428508e00de65e615b59405b9ee2ba009
Signed-off-by: Kevin Rocard <krocard@google.com>
This is useful when there are multiple audio devices in the system.
Test: use aaudio_loopback on a TV device with USB soundcard connected
specify -d<HDMI out device id> -D<USB in device id>
Change-Id: I60e84132f5974db6f4314c58f76705018e22b7db
Was colliding with -z option for capacity.
Also print data size in output buffer.
Test: adb shell write_sine_callback -pl -n2 -h8 -s10
Change-Id: If64f0876d3a2e1a95426dddf122693dbf3a314cd
Allow -n to specify buffer size for -tm test.
It was being forced to the size of the input buffer.
Test: aaudio_loopback -tm -s20 -n2
Change-Id: I4b71238f17bb87c22602bf86e2b91cfa41e3ae55