• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[MAGISK] [MODULE] SBC XQ Bluetooth Audio Codec and DRC Deactivator (Android 10)

Search This thread

ferry_ip

Member
Jan 5, 2021
9
8
Bandung
PREMISE
Standard Bluetooth (BT) audio codec SBC is incorporated into all BT stereo audio devices as mandatory. It can work at arbitrary high bitrates but BT documents, however, recommend 328 kbit/s (44.1kHz/16bit) for high quality mode. This mode provides just acceptable audio quality.
Meanwhile a guy under the nick ValdikSS wrote the patch for Android and another guy, Pali Rohár for Linux; these patches unlock higher bitrates of SBC encoder. That patches then called as "SBC XQ".
It turned out that almost all modern BT headphones, speakers, receivers; support SBC bitrates up to 730 kbit/s just out of the box. And SBC XQ helps to encode BT audio on Android smartphones at the following bitrates:

(1) 452.0 kbit/s for 44.1kHz/16bit (BT EDR 2) Magisk_SBCXQ_452_A10.zip
(2) 551.2 kbit/s for 44.1kHz/16bit (BT EDR 3) Magisk_SBCXQ_551_A10.zip

Audio quality of SBC XQ BT EDR2 is comparable to aptX HD. And for BT EDR3 devices SBC XQ slightly surpasses aptX HD. It will be impossible to tell them apart in a blind listening test.

SBC XQ MODULES
SBC XQ has very simple concept. Higher bitrate, better quality. These modules will increase your SBC bitrate from 364kbit/s to 452kbit/s or 551kbit/s and perform high quality audio for traditional (budget) SBC BT audio receivers. These modules will replace your BT stack (libbluetooth.so arm and arm64). So, if it is not work, your BT will completely go off. In other word, your default SBC bitrate has been updated successfully, if your BT audio receiver function normally.
Obviously, you can only enable 1 Module at a time 452kbit/s or 551kbit/s.

Complete source of SBC XQ

Modification Sources

OPTIONAL MODULE
Dynamic Range Control (DRC) Deactivator Magisk_DRC_Deactivator_v1.00.zip
I found this Module from XDA, made by @zyhk
Basically it will set "drc_enabled = true" to "drc_enabled = false".
The original one, patch audio_policy_configuration.xml in vendor/etc folder.
My mod version will patch in vendor/etc/audio folder also.

ALL MODULES HAS BEEN TESTED
Source:
Xiaomi Redmi Note 8, MIUI v12.0.6 Global, Android 10
Receiver:
MPow X4.0 ANC (Bluetooth Headphone)
Clarion PE-4217N-A (Car HeadUnit)


JUST FEEL THE DIFFERENCE

DONATE

a cup of coffee will be nice :)
 

Attachments

  • Magisk_DRC_Deactivator_v1.00.zip
    11.4 KB · Views: 139
  • Magisk_SBCXQ_452_A10.zip
    4.3 MB · Views: 120
  • Magisk_SBCXQ_551_A10.zip
    4.3 MB · Views: 226
Last edited:

mindyabiznis

Senior Member
Oct 16, 2011
370
53
This breaks Bluetooth for me, pixel 5 running protonAOSP and protonkernel.

After rebooting Bluetooth won't turn on, tries for about 10 seconds and then turns back off
 

seffparker

Senior Member
Jul 23, 2012
58
28
I have tried the both bit-rate versions on my Xiaomi POCO F1 MIUI 12 Android 10.

The Bluetooth connection works and devices are audible. Tested on the following peripheral devices:
  1. SONY SBH24
  2. SONY XB-01
  3. Noise Air Buds Mini

No cracks or nothing. But, not able to scientifically tell the bit-rate or audio-quality is increased.

Pulled the HCI snoop-log. How to read the HCI log in Linux or Android?

[EDIT #1]: Decoded the HCI log using the command `hcidump -r btsnoop_hci.log`. It has the following lines:

Code:
      AVDTP(s): Set config cmd: transaction 2 nsp 0x00
        ACP SEID 1 - INT SEID 1
        Media Transport
        Media Codec - SBC
          44.1kHz
          JointStereo
          16 Blocks
          8 Subbands
          Loudness
          Bitpool Range 2-53
Its the standard negotiation for SBC codec I believe. Can anyone confirm the bitrate is increased?
 
Last edited:

tomiasx22

Member
Feb 4, 2020
29
2
1. I tried Magisk_SBCXQ_551_A10.zip on Mi A3 Android ONE (11)
Bluetooth "works", no interruptions, but I cannot state if audio quality is better.
Someone wrote about differences in Android 10 and 11, but do you think this module may generally work on Android 11, or that's "placebo effect" and fortunately it didn't corrupt my Bluetooth?
2. Another question is depth, my phone supports 24bit (probably Sync in my Ford Focus 2019 also..) Can I in any way set it from 16bit to 24bit?
3. Interesting is that with module installed gabeldorsche mode is still active when I reenter the settings.. but does it work in fact?
4. Can installed module in any way influence battery draining?

Sorry for 2 more questions:
5. I noticed that even after uninstalling module from magisk sometimes there is problem with switching from 3G to LTE /H+ when I change area (eg leave the garage hall)
6. Can I in any way check in my Mi A3 (Android ONE 11) which bitrate is set as default for SBC?
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 3
    PREMISE
    Standard Bluetooth (BT) audio codec SBC is incorporated into all BT stereo audio devices as mandatory. It can work at arbitrary high bitrates but BT documents, however, recommend 328 kbit/s (44.1kHz/16bit) for high quality mode. This mode provides just acceptable audio quality.
    Meanwhile a guy under the nick ValdikSS wrote the patch for Android and another guy, Pali Rohár for Linux; these patches unlock higher bitrates of SBC encoder. That patches then called as "SBC XQ".
    It turned out that almost all modern BT headphones, speakers, receivers; support SBC bitrates up to 730 kbit/s just out of the box. And SBC XQ helps to encode BT audio on Android smartphones at the following bitrates:

    (1) 452.0 kbit/s for 44.1kHz/16bit (BT EDR 2) Magisk_SBCXQ_452_A10.zip
    (2) 551.2 kbit/s for 44.1kHz/16bit (BT EDR 3) Magisk_SBCXQ_551_A10.zip

    Audio quality of SBC XQ BT EDR2 is comparable to aptX HD. And for BT EDR3 devices SBC XQ slightly surpasses aptX HD. It will be impossible to tell them apart in a blind listening test.

    SBC XQ MODULES
    SBC XQ has very simple concept. Higher bitrate, better quality. These modules will increase your SBC bitrate from 364kbit/s to 452kbit/s or 551kbit/s and perform high quality audio for traditional (budget) SBC BT audio receivers. These modules will replace your BT stack (libbluetooth.so arm and arm64). So, if it is not work, your BT will completely go off. In other word, your default SBC bitrate has been updated successfully, if your BT audio receiver function normally.
    Obviously, you can only enable 1 Module at a time 452kbit/s or 551kbit/s.

    Complete source of SBC XQ

    Modification Sources

    OPTIONAL MODULE
    Dynamic Range Control (DRC) Deactivator Magisk_DRC_Deactivator_v1.00.zip
    I found this Module from XDA, made by @zyhk
    Basically it will set "drc_enabled = true" to "drc_enabled = false".
    The original one, patch audio_policy_configuration.xml in vendor/etc folder.
    My mod version will patch in vendor/etc/audio folder also.

    ALL MODULES HAS BEEN TESTED
    Source:
    Xiaomi Redmi Note 8, MIUI v12.0.6 Global, Android 10
    Receiver:
    MPow X4.0 ANC (Bluetooth Headphone)
    Clarion PE-4217N-A (Car HeadUnit)


    JUST FEEL THE DIFFERENCE

    DONATE

    a cup of coffee will be nice :)
    1
    Sounds great what about Android 11 and 12?
    Anyway a good work.Cheers!!!
    1
    Sounds great what about Android 11 and 12?
    Anyway a good work.Cheers!!!
    waiting for my crappy phone got A11 update 😁
    1
    waiting for my crappy phone got A11 update 😁
    It doesnt matter for me i test it on my Android 11 Redmi 9 and gibe feedback soon.Cheers!!!
    1
    This breaks Bluetooth for me, pixel 5 running protonAOSP and protonkernel.

    After rebooting Bluetooth won't turn on, tries for about 10 seconds and then turns back off
    I'm sorry it doesn't work for you.. I never test it, on custom ROM