Magisk-Modules-Alt-Repo / audio-misc-settings

A Magisk module for setting miscellaneous audio configuration values (media audio volume steps (100 steps), raising the resampling quality, disabling the effects framework, etc.)
GNU Affero General Public License v3.0
173 stars 12 forks source link

SBC Dual Channel not working #3

Closed sebastianjena closed 2 years ago

sebastianjena commented 2 years ago

Hello! I have Pixel 6 with Derpfest ROM, I got Soundcore Life P3 earbuds which support only SBC+AAC. In theory module was successfully installed (i see increased volume steps etc) but SBC bitrate in logcat is still ~320kbps. How can I force it to work?

If the ROM needs to support it, do u maybe have the knowledge which ones support it for Android 12?

yzyhk904 commented 2 years ago

Your ROM need to have a special SBC codec supporting the dual channel mode, not a typical SBC codec. There is no A12 ROM till now, but are many A11 ROM's (LineageOS 18.1, ArrowOS 11, etc.).

This module sets a property value enabling the SBC dual channel codec to raise its bitrate limit to about 600kbps only for EDR 2Mbps earphones (perhaps, entry class cheap ones. not EDR 3Mbps mid to high ones of which limit is fixed at about 550kbps).

By the way, you can raise the audio quality of your earphones if you disable "a2dp offload" in developer options because Pixel6 resamples twice (44.1kHz -> 48kHz -> 44.1kHz) in a2dp offloading. And I recommend disabling battery optimizations described in the README.

sebastianjena commented 2 years ago

Thanks for explanation. In theory I see commits on 12.0 branch of CRDroid, but there's only a ROM for Pixel 6 Pro for now. https://github.com/search?l=&o=desc&q=org%3Acrdroidandroid+sbc+repo%3A12.0&s=committer-date&type=Commits

Also I tried AICP and there was Dual Channel in dev settings (in channel mode menu when there is mono/stereo/etc)...but it was greyed out for some reason and I couldn't choose it in any way :( Maybe you would had any idea why it's greyed out and how to unlock it..

yzyhk904 commented 2 years ago

I wasn't aware of these recent commits because the gerrit of LineageOS sources showed dual channel patches in a review phase.

The dual channel mode can be effective only in the AOSP bluetooth stack, not in other stacks. So you need to disable "a2dp hardware offload" in dev settings on some devices (typically using a Snapdragon SoC, e.g., Pixel5, Pixel4, etc.). Maybe Pixel6's are included.

sebastianjena commented 2 years ago

Nice hint thank you. One more question: how does your module affect LDAC? (96kHz is used then)

yzyhk904 commented 2 years ago

I recommend using its 44.1kHz 32bit mode with jitter-reducer.sh in my another tool USB_SampleRate_Changer. (needless to say, to be DRC free and without a2dp offloading to avoid multiple resampling)

The audio quality of bluetooth a2dp is affected by jitter at the transmitter side very much. Don't forget disabling a battery manager and battery optimizations of app's described in the README.