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

AAudio: Connecting headphones does not trigger any event. S9 Exynos 9.0 #381

Closed
Themaister opened this issue Feb 6, 2019 · 5 comments
Closed
Assignees
Labels

Comments

@Themaister
Copy link

The documentation says that the error callbacks should be called when the "primary device" changes, however, it does not when attaching headphones. It does trigger when detaching headphones though ...

@philburk
Copy link
Collaborator

philburk commented Feb 8, 2019

We have seen this behavior on early versions of P release for AAudio on Pixel.

What device and Android version are you seeing this on?
Are you using OpenSL ES or AAudio?
Are the headphones using a 3.5 mm jack or USB-C?
Is it intermittent or consistent?

OpenSL ES will automatically switch the audio between headset and speakers. But it also can change the latency and disrupts the audio streams, which is why we try to force a disconnect in AAudio.

@Themaister
Copy link
Author

  • Samsung Galaxy S9 Exynos, Android 9.0.
  • AAudio.
  • 3.5mm jack.
  • Consistent.

OpenSL ES works fine.

@philburk philburk changed the title AAudio: Connecting a headphone plug does not trigger any event. AAudio: Connecting headphones does not trigger any event. S9 Exynos 9.0 Feb 9, 2019
@philburk philburk self-assigned this Feb 11, 2019
@svenoaks
Copy link

svenoaks commented Mar 8, 2019

This happens on same device for me too. Along with #380. It means when user plugs in headphones audio continues thru phone speakers.

@dturner
Copy link
Collaborator

dturner commented Jun 17, 2019

Possibly related internal bug b/111711159

@philburk
Copy link
Collaborator

This is not an Oboe bug. The problem is in the AudioPolicyManager.
We are documenting the issue and a workaround here:

https://github.com/google/oboe/blob/master/docs/notes/disconnect.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants