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

No audio on Samsung Galaxy A21s when MMAP is enabled #1953

Closed
kus04e4ek opened this issue Jan 7, 2024 · 10 comments
Closed

No audio on Samsung Galaxy A21s when MMAP is enabled #1953

kus04e4ek opened this issue Jan 7, 2024 · 10 comments
Assignees
Labels
bug Samsung specific to Samsung devices

Comments

@kus04e4ek
Copy link

Android version(s): 12
Android device(s): Samsung Galaxy A21s
Oboe version: 1.8.1
App name used for testing: OboeTester

Short description
Completely silent when using built-in speakers with MMAP enabled. Bluetooth headphones work fine.

Steps to reproduce
Test Output with default options.

Device
ro.product.brand = samsung
ro.product.manufacturer = samsung
ro.product.model = SM-A217F
ro.product.device = a21s
ro.product.cpu.abi = arm64-v8a
ro.build.description = a21snsxx-user 12 SP1A.210812.016 A217FXXSADWI1 release-keys
ro.hardware = exynos850
ro.hardware.chipname = exynos850
ro.arch = exynos850
| grep aaudio = [aaudio.hw_burst_min_usec]: [2000]
[aaudio.mmap_exclusive_policy]: [2]
[aaudio.mmap_policy]: [2]

@kus04e4ek kus04e4ek added the bug label Jan 7, 2024
@kus04e4ek kus04e4ek changed the title No audio on Samsung Galaxy A21s No audio on Samsung Galaxy A21s when MMAP is enabled Jan 7, 2024
@kus04e4ek
Copy link
Author

Ran Data Paths.
data paths.zip

@robertwu1
Copy link
Collaborator

It's really strange because your device is only opening shared streams. Can you attach a bug report?

@philburk philburk added the Samsung specific to Samsung devices label Jan 24, 2024
@philburk
Copy link
Collaborator

It's really strange because your device is only opening shared streams.

It seems OboeTester is only requesting Shared streams and not Exclusive streams.
It was probably considered redundant because Shared streams are built on top of Exclusive streams.
So if Exclusive failed then Shared would fail.

@philburk philburk self-assigned this Jan 24, 2024
@philburk
Copy link
Collaborator

I created an internal bug for Samsung:
b/322234897 | P2 | Samsung A21S audio MMAP output is silent

@kus04e4ek
Copy link
Author

It looks like I can't reproduce it anymore. Ran Data Paths again and every test passed. I restarted my phone not too long ago, so maybe MMAP output just broke after some time of my phone being active?
data_paths.zip

@kus04e4ek
Copy link
Author

Also, I noticed that audio stream still gets exclusive sharing mode even if there is audio playing in the other app. I might understand exclusive sharing mode wrong, but isn't it supposed to work only if one audio stream is playing, so that it would be possible to directly write audio data to the output? If I understand the mode correctly, then it might be possible that the device just tells the app that exclusive sharing mode is obtained when it actually failed and the same happens with MMAP.

@kus04e4ek
Copy link
Author

kus04e4ek commented Jan 27, 2024

Also, I noticed that audio stream still gets exclusive sharing mode even if there is audio playing in the other app.

Audio stream didn't get exclusive sharing mode when I ran the app that requests exclusive sharing mode. But audio stream gets exclusive sharing mode when the other app requests shared sharing mode. Is this expected behavior?

@philburk
Copy link
Collaborator

The EXCLUSIVE mode is for exclusive access to the special MMAP path.
It is not exclusive for all audio. Other apps can play audio over the Legacy (non-MMAP) path even when your app have EXCLUSIVE MMAP access.

@philburk
Copy link
Collaborator

philburk commented Mar 7, 2024

I pinged Samsung.

@philburk
Copy link
Collaborator

Samsung was unable to reproduce this problem.

@kus04e4ek says they rebooted their phone and now MMAP output is working.
So I think the framework or HAL got into some broken state and was unable to recover without rebooting.
This is probably not specific to the A21S.

I will close this because we cannot reproduce the issue and do not have enough information to move forward.

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

No branches or pull requests

3 participants