Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry pick PR #1399: [android] Refine audio output device querying #1403

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

cobalt-github-releaser-bot
Copy link
Collaborator

Refer to the original PR: #1399

SbMediaGetAudioOutputCount() was hard coded to return 1. This worked when SbMediaGetAudioConfiguration() was hard coded to return HDMI, and breaks 5.1 playbacks on some devices after
SbMediaGetAudioConfiguration() is refined to return configurations for all audio outputs (including non-HDMI devices) in the system.

For example, when the first output is non-HDMI stereo, and the second output is HDMI with 5.1 support, the second output won't be checked in IsAudioOutputSupported() because SbMediaGetAudioOutputCount() returns 1, and 5.1 streams will be incorrectly rejected.

Now SbMediaGetAudioOutputCount() tentatively returns 16 on Android TV, and IsAudioOutputSupported() will break the loop when SbMediaGetAudioConfiguration() returns false. This minimizes the changes required while still allows 5.1 playbacks.

Follow up changes should be made to remove SbMediaGetAudioOutputCount() completely once this is verified on all platforms.

b/284140486
b/297426689

`SbMediaGetAudioOutputCount()` was hard coded to return 1. This worked
when `SbMediaGetAudioConfiguration()` was hard coded to return HDMI, and
breaks 5.1 playbacks on some devices after
`SbMediaGetAudioConfiguration()` is refined to return configurations for
all audio outputs (including non-HDMI devices) in the system.

For example, when the first output is non-HDMI stereo, and the second
output is HDMI with 5.1 support, the second output won't be checked in
`IsAudioOutputSupported()` because `SbMediaGetAudioOutputCount()`
returns 1, and 5.1 streams will be incorrectly rejected.

Now `SbMediaGetAudioOutputCount()` tentatively returns 16 on Android TV,
and `IsAudioOutputSupported()` will break the loop when
`SbMediaGetAudioConfiguration()` returns false. This minimizes the
changes required while still allows 5.1 playbacks.

Follow up changes should be made to remove
`SbMediaGetAudioOutputCount()` completely once this is verified on all
platforms.

b/284140486
b/297426689

(cherry picked from commit f692f5e)
@kaidokert kaidokert merged commit b6e23f7 into 24.lts.1+ Aug 25, 2023
326 checks passed
@kaidokert kaidokert deleted the 24.lts.1+-1399 branch August 25, 2023 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants