google / google/oboe

OboeTester should use setPreferredMixerAttributes() for USB audio tests

Open
#2,168 1 comment 0 reactions 1 assignee Claimed by @robertwu1 View on GitHub
Dominant language
C++
Stars
4.1k
Forks
639
Avg merge
2d 23h
Merged PRs (30d)
8

Description

CTS Verifier should use [setPreferredMixerAttributes()](https://developer.android.com/reference/android/media/AudioManager#setPreferredMixerAttributes(android.media.AudioAttributes,%20android.media.AudioDeviceInfo,%20android.media.AudioMixerAttributes)) to improve the reliability of USB tests for peripherals that support sample rates higher than 48000 Hz.

As an example, the Presonus device supports 96000 Hz but the Google adapter only supports 48000 Hz. When the test opens a stream on the Presonus devices when using the Legacy AOSP USB HAL then it may open the hardware at 96000 Hz. This will then require the use of a sample rate converter to match the test apps sample rate. That can significantly increase the latency of the streams.

setPreferredMixerAttributes() was added in API 34 (UDC)

The Latency test should always use the optimal MixerAttributes for lowest latency.

The Data Path USB Test could try different MixerAttributes, and try it on/off, to make sure it works properly.

See [b/398310497](http://b/398310497) | P2 | CTSV should use setPreferredMixerAttributes() for USB audio tests
for more context.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.