Improve Bluetooth audio quality on headphones without aptX or LDAC

skanadian

Senior Member
Feb 3, 2009
133
57
0
Ontario
The AOSP and Lineage 17.1 commits for 10 make "Dual Channel" available in developer options, but the HD SBC toggle doesn't appear in bluetooth devices. Anyone know how to fix that, or have a commit I can target? @ValdikSS

edit: doublepost, for "10" not PIE!
 
Last edited:

bl4dy_pt

Senior Member
Oct 7, 2012
76
9
28
I've heard that Google's devices are set DRC on all audio output while Samsung's are not.
Please check if 'speaker_drc_enabled' is true or false in /vender/etc/audio_policy_configuration.xml. (Don't use Pie GSIs, they may have a bug that cannot disable DRC on bluetooth audio output)
This is very interesting,
I've tried to change it to false, but it goes back to true after reboot.

Any thoughts?

PS : I'm on pixel 4 andoid 10
 
Last edited:

abhifx

Senior Member
Feb 20, 2011
1,490
734
133
Chandigarh
The AOSP and Lineage 17.1 commits for Pie make "Dual Channel" available in developer options, but the HD SBC toggle doesn't appear in bluetooth devices. Anyone know how to fix that, or have a commit I can target? @ValdikSS

edit: doublepost
Interesting! So basically just cherry picking android 9 commits works on android 10? I thought the bluetooth stack changed a lot?
Or am i getting it wrong, the commits pending to be merged in android 10 is kind of working?
 
  • Like
Reactions: skanadian

skanadian

Senior Member
Feb 3, 2009
133
57
0
Ontario
Interesting! So basically just cherry picking android 9 commits works on android 10? I thought the bluetooth stack changed a lot?
Or am i getting it wrong, the commits pending to be merged in android 10 is kind of working?
I don't know why I wrote "for pie" ... I was testing the commits against AOSP android 10. The commits pending for 10 are kind of working, selecting "dual channel" in developer options works, but the toggle doesn't show up in bluetooth devices.

These are the commits in the lineage 17.1 branch; https://review.lineageos.org/q/topic:"ten-bt-sbc-hd-dualchannel"
 
Last edited:
  • Like
Reactions: abhifx

zyhk

Senior Member
May 9, 2020
84
26
18
This is very interesting,
I've tried to change it to false, but it goes back to true after reboot.

Any thoughts?

PS : I'm on pixel 4 andoid 10
I don't know the reason, but guess your vendor area has been protected against modifications. I think it could go well to replace original audio_policy_configuration.xml with modified one on TWRP recovery.

Don't forget to backup the original one for restoring it if it caused bootloop or like.

Edit:
See how to modify files under the vendor area. You need a magisk module to replace a string 'speaker_drc_enabled="true"' with 'speaker_drc_enabled="false"'.

Edit2:
I tried to make a magisk module to remove the DRC for Android 8, 9 and 10 in general even though the vendor area can be modified. Enjoy it if your "effective" audio_policy_configuration.xml is exactly "/vendor/etc/audio_policy_configuration.xml".
 

Attachments

Last edited:

zyhk

Senior Member
May 9, 2020
84
26
18
Android 10 ROMs available now

I don't know why I wrote "for pie" ... I was testing the commits against AOSP android 10. The commits pending for 10 are kind of working, selecting "dual channel" in developer options works, but the toggle doesn't show up in bluetooth devices.

These are the commits in the lineage 17.1 branch; https://review.lineageos.org/q/topic:"ten-bt-sbc-hd-dualchannel"
Anyway, there have been SBC HD capable Android 10 ROMs around now. I tested the Bless GSI ROM (BlissOS v12.10 based GSI) and confirmed that SBC HD was enabled via dev options by a bluetooth snoop log.
 

skanadian

Senior Member
Feb 3, 2009
133
57
0
Ontario
Anyway, there have been SBC HD capable Android 10 ROMs around now. I tested the Bless GSI ROM (BlissOS v12.10 based GSI) and confirmed that SBC HD was enabled via dev options by a bluetooth snoop log.
Yeah, it definitely works in dev options but toggling on every connect is a bit of a hassle. It would be nice to see a 10 commit that enables the toggle in settings > devices.
 

zyhk

Senior Member
May 9, 2020
84
26
18
Yeah, it definitely works in dev options but toggling on every connect is a bit of a hassle. It would be nice to see a 10 commit that enables the toggle in settings > devices.
There are two tunables in dev options, i.e. "Bluetooth Audio Codec (preferred)" and "SBC HD audio". It seems that we can set SBC HD as a default if we use them. My AAC&SBC capable earphones actually connect to my phone with SBC HD automatically.
 

bl4dy_pt

Senior Member
Oct 7, 2012
76
9
28
I don't know the reason, but guess your vendor area has been protected against modifications. I think it could go well to replace original audio_policy_configuration.xml with modified one on TWRP recovery.

Don't forget to backup the original one for restoring it if it caused bootloop or like.

Edit:
See how to modify files under the vendor area. You need a magisk module to replace a string 'speaker_drc_enabled="true"' with 'speaker_drc_enabled="false"'.

Edit2:
I tried to make a magisk module to remove the DRC for Android 8, 9 and 10 in general even though the vendor area can be modified. Enjoy it if your "effective" audio_policy_configuration.xml is exactly "/vendor/etc/audio_policy_configuration.xml".
Thanks buddy, will try now and report back :good:


Update: it worked :cowboy:

I can definitely hear a difference.

Do you know the rate of compression with DRC on?
 
Last edited:

zyhk

Senior Member
May 9, 2020
84
26
18
When enabled dual channel option, the airdot tws is muted, unlike the stereo option. Any solution?
Don't you use an Android 10 ROM? I think most Android 10 ROM's cannot use dual channel by a bug. At least Oreo&Pie ROM's and Bless GSI are OK.
 

cloneman1

Senior Member
Sep 23, 2010
148
6
38
Is it possible to check the bitrate that Bluetooth is currently connected at?

I don't have SBC XQ but I want to make sure my car is at least using 328kbps.