Miui 9.5.3.0 And Bluetooth Audio Codec

Discussion in 'Xiaomi Mi 6' started by SSDHarry, Mar 31, 2018.

  1. SSDHarry

    SSDHarryMembers

    Feb 22, 2014
    11
    0
    13
    Male
    #1SSDHarry,Mar 31, 2018
    Last edited: Apr 2, 2018
    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
     
  2. dacow

    dacowMembers

    Oct 27, 2017
    2
    0
    13
    Uh oh, getting a Pioneer HU to listen to music from my phone via Bluethooth. Has this always been an issue?
     
  3. SSDHarry

    SSDHarryMembers

    Feb 22, 2014
    11
    0
    13
    Male
    #3SSDHarry,Apr 3, 2018
    Last edited: Apr 3, 2018
    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.
     
  4. morback

    morbackMembers

    Mar 11, 2018
    11
    0
    3
    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...
     
  5. SSDHarry

    SSDHarryMembers

    Feb 22, 2014
    11
    0
    13
    Male
    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