Miui 9.5.3.0 And Bluetooth Audio Codec


Feb 22, 2014
12
0
13
#1
I want to use my Mi6 on my car radio (Pioneer MVH-S300BT) by connecting via bluetooth. The connection is successful, but the bluetooth audio codec that the phone selects by default (AAC) doesn't give a sound. It only works when I go into the developer options and select the SBC codec by hand. This is annoying, since you need to follow all the steps everytime you want to connect both devices (it always starts the default AAC). I was wonderig if it is possibe to change some setting so the phone stays perminentsly on the SBC?
I found this on a forum about changing the priority use of bluetooth audio codec:

Devices running Android 8.0 that support A2DP automatically gain the additional codec support. Device manufacturers may need to obtain separate licenses and binary blobs for some proprietary audio codecs. In addition to SBC, Android 8.0 supports the following codecs:


  • AAC
  • aptX
  • aptX HD
  • LDAC

Device manufacturers can choose which codecs their devices attempt to use first. Set the codec priorities by changing the following values in the file res/values/config.xml:


<!-- Configuring priorities of A2DP source codecs. Larger value means
higher priority. Value -1 means the codec is disabled.
Value 0 is reserved and should not be used here. Enabled codecs
should have priorities in the interval [1, 999999], and each
priority value should be unique. -->
<integer name="a2dp_source_codec_priority_sbc">1001</integer>
<integer name="a2dp_source_codec_priority_aac">2001</integer>
<integer name="a2dp_source_codec_priority_aptx">3001</integer>
<integer name="a2dp_source_codec_priority_aptx_hd">4001</integer>
<integer name="a2dp_source_codec_priority_ldac">5001</integer>

However, I could not apply this option since I was unable to find the file having these settings.

Therefore I hope someone here on the forum can help me finding the solution
 
Last edited:
Feb 22, 2014
12
0
13
#3
I just recently bought the Pioneer radio. Before I used 2 different fm-transmitters to connect to by bluetooth, without any problem. I also tried to connect an old Huawei phone to the Pioneer, it worked fine. Like with the SBC codec on my Mi6. So that gave me the impression that changing the bluetooth audiocodec to SBC would fix the problem. However, the Mi6 switches back to AAC everytime I reconnect the devices. So I hope for a solution to permanently switch to the SBC codec.
 
Last edited:
Mar 11, 2018
12
0
3
#4
Hi
I am in this exact situation with a Mi Mix 2, xiaomi.eu stable 9.5.2.0.
The thing is my other phone (OP5T) also use AAC codec and it works. That means AAC codec is broken with MIUI?!
I will ask on forums or Reddit if it is possible to get a magisk module which forces use of SBC as a temporary fix, or if someone could create a simple APK wich makes the change just by launching it...
 
Feb 22, 2014
12
0
13
#5
Hi
I am in this exact situation with a Mi Mix 2, xiaomi.eu stable 9.5.2.0.
The thing is my other phone (OP5T) also use AAC codec and it works. That means AAC codec is broken with MIUI?!
I will ask on forums or Reddit if it is possible to get a magisk module which forces use of SBC as a temporary fix, or if someone could create a simple APK wich makes the change just by launching it...
Indeed, I did not expect that I was the only one. It is great that you will take the extra step towards Reddit. I hope that someone will have the magic bullit to solve this codec-issue. Thanks
 
Jun 5, 2018
1
0
1
#7
I have other problems with Bluetooth on my Mi6, the sound is always stuttering, no matter what device I play music on. It only works for a few hours without stuttering if I reset all my network settings... Too bad
 
Feb 22, 2014
12
0
13
#8
Someone replied to my question and came with a rather simple but effective solution. This is most simple solution that worked for me:

You need root, edit your build.prop (using text editor, some app from the play store, etc) and change the following key: persist.vendor.bt.a2dp_offload_cap, by removing -aac from the string.

For example my value was: persist.bt.a2dp_offload_cap=sbc-aptx-aptxhd-aac

and now it has: persist.bt.a2dp_offload_cap=sbc-aptx-aptxhd

That was enough to make sure it defaults to sbc with no need to change the developer options with each connection.


Here you can find further details from ythis intelligent guy
https://forum.xda-developers.com/mi-6/help/miui-9-5-3-0-bluetooth-audio-codec-t3774888