It does but only while the device is connected.
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)
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?
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 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.
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.
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
I can definitely hear a difference.
Do you know the rate of compression with DRC on?
When enabled dual channel option, the airdot tws is muted, unlike the stereo option. Any solution?
Oh i see., indeed i am in Android 10. Any workaround? Tx broDon'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.
Connection:
48:27:ea:d2:cc:7d (Galaxy A3 (2017)) → localhost ()
Supported codecs:
Audio SBC (16000 32000 44100 48000 | Mono DualChannel Stereo JointStereo | block: 4 8 12 16 | subbands: 4 8 | allocation: SNR Loudness | bitpool: 2..64)
Used for audio:
Audio SBC (44100 | DualChannel | block: 16 | subbands: 8 | allocation: Loudness | bitpool: 2..53)
Latest SBC Bitpool value: 53
In the new version of the specification there is no bitrate limitation. It is assumed that modern headphones released after 2015 with EDR can support bitrates up to 730 kbps.The decoder of the SNK shall support all possible bitpool values that do not result in the excess of the maximum bit rate. This profile limits the available maximum bit rate to 320kb/s for mono, and 512kb/s for two-channel modes.
[b]These modifications are designed only for test and should not be applied to the main ROM repository![/b]
[b]If you're a ROM developer, please provide flashable modified bluetooth library if possible![/b]
These modifications should be applied to stock Android bluetooth stacks Bluedroid (Android 5) and Fluoride (Android 6-7). Qualcomm-modified stack is not supported.
[b]1. Replace Joint Stereo with Dual Channel in standard SBC configuration[/b]
[url="https://android.googlesource.com/platform/external/bluetooth/bluedroid/+/master/btif/co/bta_av_co.c#99"][i]android/platform/external/bluetooth/bluedroid/btif/co/bta_av_co.c:99[/i][/url]
[code]const tA2D_SBC_CIE btif_av_sbc_default_config =
{
BTIF_AV_SBC_DEFAULT_SAMP_FREQ, /* samp_freq */
A2D_SBC_IE_CH_MD_JOINT, /* ch_mode */
A2D_SBC_IE_BLOCKS_16, /* block_len */
A2D_SBC_IE_SUBBAND_8, /* num_subbands */
A2D_SBC_IE_ALLOC_MD_L, /* alloc_mthd */
BTA_AV_CO_SBC_MAX_BITPOOL, /* max_bitpool */
A2D_SBC_IE_MIN_BITPOOL /* min_bitpool */
};
if (src_cap.ch_mode & A2D_SBC_IE_CH_MD_JOINT)
pref_cap.ch_mode = A2D_SBC_IE_CH_MD_JOINT;
else if (src_cap.ch_mode & A2D_SBC_IE_CH_MD_STEREO)
pref_cap.ch_mode = A2D_SBC_IE_CH_MD_STEREO;
else if (src_cap.ch_mode & A2D_SBC_IE_CH_MD_DUAL)
pref_cap.ch_mode = A2D_SBC_IE_CH_MD_DUAL;
else if (src_cap.ch_mode & A2D_SBC_IE_CH_MD_MONO)
pref_cap.ch_mode = A2D_SBC_IE_CH_MD_MONO;
#define DEFAULT_SBC_BITRATE 328
/* 2DH5 payload size of 679 bytes - (4 bytes L2CAP Header + 12 bytes AVDTP Header) */
#define MAX_2MBPS_AVDTP_MTU 663
/* SBC SRC codec capabilities */
static const tA2DP_SBC_CIE a2dp_sbc_caps = {
A2DP_SBC_IE_SAMP_FREQ_44, /* samp_freq */
(A2DP_SBC_IE_CH_MD_MONO | A2DP_SBC_IE_CH_MD_JOINT), /* ch_mode */
(A2DP_SBC_IE_BLOCKS_16 | A2DP_SBC_IE_BLOCKS_12 | A2DP_SBC_IE_BLOCKS_8 |
A2DP_SBC_IE_BLOCKS_4), /* block_len */
A2DP_SBC_IE_SUBBAND_8, /* num_subbands */
A2DP_SBC_IE_ALLOC_MD_L, /* alloc_method */
A2DP_SBC_IE_MIN_BITPOOL, /* min_bitpool */
A2DP_SBC_MAX_BITPOOL, /* max_bitpool */
BTAV_A2DP_CODEC_BITS_PER_SAMPLE_16 /* bits_per_sample */
};
/* Default SBC codec configuration */
const tA2DP_SBC_CIE a2dp_sbc_default_config = {
A2DP_SBC_IE_SAMP_FREQ_44, /* samp_freq */
A2DP_SBC_IE_CH_MD_JOINT, /* ch_mode */
A2DP_SBC_IE_BLOCKS_16, /* block_len */
A2DP_SBC_IE_SUBBAND_8, /* num_subbands */
A2DP_SBC_IE_ALLOC_MD_L, /* alloc_method */
A2DP_SBC_IE_MIN_BITPOOL, /* min_bitpool */
A2DP_SBC_MAX_BITPOOL, /* max_bitpool */
BTAV_A2DP_CODEC_BITS_PER_SAMPLE_16 /* bits_per_sample */
};
static bool select_best_channel_mode(uint8_t ch_mode, tA2DP_SBC_CIE* p_result,
btav_a2dp_codec_config_t* p_codec_config) {
if (ch_mode & A2DP_SBC_IE_CH_MD_JOINT) {
p_result->ch_mode = A2DP_SBC_IE_CH_MD_JOINT;
p_codec_config->channel_mode = BTAV_A2DP_CODEC_CHANNEL_MODE_STEREO;
return true;
}
if (ch_mode & A2DP_SBC_IE_CH_MD_STEREO) {
p_result->ch_mode = A2DP_SBC_IE_CH_MD_STEREO;
p_codec_config->channel_mode = BTAV_A2DP_CODEC_CHANNEL_MODE_STEREO;
return true;
}
if (ch_mode & A2DP_SBC_IE_CH_MD_DUAL) {
p_result->ch_mode = A2DP_SBC_IE_CH_MD_DUAL;
p_codec_config->channel_mode = BTAV_A2DP_CODEC_CHANNEL_MODE_STEREO;
return true;
}
if (ch_mode & A2DP_SBC_IE_CH_MD_MONO) {
p_result->ch_mode = A2DP_SBC_IE_CH_MD_MONO;
p_codec_config->channel_mode = BTAV_A2DP_CODEC_CHANNEL_MODE_MONO;
return true;
}
return false;
}
#define A2DP_SBC_DEFAULT_BITRATE 328
#define MAX_2MBPS_AVDTP_MTU 663