aaudio capture with noise on vivo x50pro+ (V2011A)
Android version(s): 10 Android device(s): vivo x50pro+ (V2011A) Oboe version: lastest App name used for testing: OboeTester (Please try to reproduce the issue using the OboeTester or an Oboe sample.)
Short description capture with noice
Steps to reproduce
- select "Record and play" test
- select aaudio + 48k+1channel+Generic(InPreset)
- Do "Record"
Problem and Question: If I set "Input margin" to 2, the capture works well. I see this setting actually call stream->waitForAvailableFrames, my question is if the issue cased by xrun happens? However, I always get 0 value of stream->getXRunCount(), is this because the device does not support the function or other possible reason?
Thanks a lot.
https://user-images.githubusercontent.com/13726257/209959288-2f8105ea-9215-427b-93df-0356637d6172.mp4
This conversation was moved from #1380
@xzhan96 wrote: I find aaudio on vivo V2011A has glitch, but if set Input Margin to 1, all works fine. I see the "Input Margin" setting actually calling AudioStream::waitForAvailableFrames.
Hi @philburk I find aaudio on vivo V2011A has glitch, but if set Input Margin to 1, all works fine. I see the "Input Margin" setting actually calling AudioStream::waitForAvailableFrames. My question is if it suitable for I always use AudioStream::waitForAvailableFrames? from the annotation, I think it should not has affect on delay?
I did a delay test on our App, it seems has much negative effects on delay. After using waitForAvailableFrames, even the first parameter |numFrames| is audioStream->getFramesPerBurst(), the delay becomes to 140+ms, vs. before delay only about 30ms.
@philburk responded: That is an important clue. That means the DSP position is slightly off from where AAudio thinks it is. The extra latency comes from the CPU reading ahead of the DSP pointer instead of behind it.
You might be able to see this if you run the round trip latency test and look at the result for each value of Input Margin. The latency should go up slightly each time. If it jumps down then that proves the problem is the incorrect DSP timestamp.
I will pass this information to VIVO.
Internal bug: b/267544972 | P2 | aaudio recording has noise on vivo x50pro+ (V2011A)
Please try this experiment: Build the latest OboeTester from GitHub using Android Studio. https://github.com/google/oboe/blob/main/apps/OboeTester/docs/Build.md Launch OboeTester Press ROUND TRIP LATENCY Press green bar to "Show Settings INPUT" Select GENERIC from InPreset menu. Press green bar to "Hide Settings INPUT" Press MEASURE to measure latency. Change Input Margin to "1" Press MEASURE to measure latency. Repeat for Input Margin 2,3,4.
What values do you get for latency for each value of Input Margin? It should increase every time. I suspect it my jump up or down in at some point?
@xzhan96 - can you please try the experiment in the previous comment.
@philburk sure, I will do the experiment next week.
Input Margin 0-4:

@philburk pls see above screen shots. It seems latency are not much different. However, when I do the RECORD AND PLAY test, the difference of timestamp.latency are very big, please see my attached video.
https://user-images.githubusercontent.com/13726257/223104163-4aed87d9-6492-407b-990d-dffb969fbd9e.mp4
@philburk hi, are the above attached videos enough?