Enabling AAC and AptX over Bluetooth on MacOS

I recently purchased a pair of Sony MDR-1000X Bluetooth noise-cancelling headphones. Although I usually prefer Sennheiser headphones (my previous pair of NC headphones was the Sennheiser Momentum Wireless 2 (aka HD-1)), I went with the Sony due to their support of the AAC codec, as my primary devices are all Apple.

By default on OS X and MacOS, the headphones will connect with the SBC codec when playing audio. (And occasionally a fallback to the low-quality SCO streaming codec for some voice-chat apps like Cisco Jabber) The OS does support aptX and AAC over bluetooth, but you have to jump through some hoops to enable them. Why? who knows. My best guess is that it is becuase SBC is the universally supported (and required) codec for the A2DP Bluetooth audio profile, and using that maximizes compatibility and minimizes customer complaints. If you can’t reliably detect what a headset supports, then the lowest common denominator is the safe choice.

AirPods however do automatically use the AAC codec without the user having to set any options.


Update 4 Dec 2017:

Thanks to Anders Carling in the comments, looks like there is a much easier way to check and update these settings.

Open Terminal and enter “sudo defaults read bluetoothaudiod” and type in your password when prompted. You should then see the current settings:

"AAC Bitrate" = 128;
"AAC CBR" = 0;
"Apple Bitpool Max" = 64;
"Apple Bitpool Min" = 2;
"Apple Initial Bitpool" = 40;
"Disable HFP" = 0;
"Enable AAC codec" = 1;
"Enable AptX codec" = 0;

If you get an error “Domain bluetoothaudiod does not exist”, that means none of these settings have been set before, update the setting as shown below and you’ll be able to read the setting as outlined above.

To update these settings in the Terminal:

to enable AptX:

sudo defaults write bluetoothaudiod "Enable AptX codec" -bool true

to enable AAC:

sudo defaults write bluetoothaudiod "Enable AAC codec" -bool true

To disable either one, just change “-bool true” to “-bool false” at the end of the command.


Here’s the original method, still handy in case you want a GUI to toggle the settings:

To enable aptX or AAC support, you need to get a copy of Apple’s Bluetooth Explorer development utility.

Go to the Apple developer downloads page – you will need to register a developer account if you don’t already have one.

Search for “Additional Tools for Xcode” – at the time of this writing, the latest released version is for Xcode 9.0. This will download a .dmg file that contains “Bluetooth Explorer.app” – this is the only file you need, move it anywhere, and you can delete the rest.

If you’re already logged in to the developer site, you can also use this direct link for the 9.0 version:

https://download.developer.apple.com/Developer_Tools/Additional_Tools_for_Xcode_9/Additional_Tools_for_Xcode_9.dmg

For older versions you’ll get “Hardware IO Tools for Xcode 7.3”

Run Bluetooth Explorer, then go to Tools>Audio Options. Select “Enable AAC”. If you have an aptX-only device you can enable that here as well. If your headset is already connected, disconnect and reconnect. You don’t need to re-pair the device.

Once you’re reconnected, you can verify which codec you’re connecting with by enabling the Bluetooth menu bar icon (System Preferences >Bluetooth>Show Bluetooth in menu bar), then holding down option and clicking the Bluetooth menu bar icon and navigating to the headphones entry.

That’s it. You’ll be running the improved wireless codec, and should notice a definite improvement.

 


Posted

in

by

Tags:

Comments

46 responses to “Enabling AAC and AptX over Bluetooth on MacOS”

  1. Ed Mund Avatar
    Ed Mund

    I appreciate you documenting this so clearly… I went through the motions for my aptX Sennheiser HD1 Earphones… Still no aptX

    Using Bluetooth Explorer, Tools, Bluetooth Staus: “Active Audio Codec: ” Nothing shown.

    Like

    1. areilly Avatar

      I had the older version of the HD1 and it worked for me – as far as I know the HD1 didn’t have any major changes. The only thing I can think of is to make sure there is a music app playing, and that there aren’t any chat/calling apps running that might be forcing the codec down to something else. I just updated the post with an alternate method from another commenter that you could try to see if it makes a difference.

      Like

  2. User Avatar
    User

    Thank you

    Like

  3. Anders Carling Avatar

    I did some digging and found where the relevant setting is stored.

    Using Terminal, it can be checked by running:
    sudo defaults read bluetoothaudiod

    And set by running:
    sudo defaults write bluetoothaudiod “Enable AAC codec” -bool true

    Reconnecting the headphones seems to be enough to pick up the change.

    Like

  4. Mark Wadham Avatar
    Mark Wadham

    The defaults command doesn’t seem to work in 10.13.2

    $ sudo defaults read bluetoothaudiod
    2017-12-07 20:15:26.382 defaults[12912:1035323]
    Domain bluetoothaudiod does not exist

    Like

    1. areilly Avatar

      I just updated to 10.13.2 and I’m seeing the same, looks like it’s been moved or renamed.

      Like

      1. Anders Carling Avatar

        I’ve tested both checking and updating the “Enable AAC codec” setting under 10.13.2 and it still works here.

        Mark: That would be the output have you never changed any of the bluetoothaudiod settings, so might just be that? Have you tried enabling AAC and checking again?

        areilly: Are you sure you didn’t just miss “sudo” – it’s required as the setting, for no obvious reason, is stored in the root users Library folder (i.e. in /var/root/Library/Preferences/bluetoothaudiod.plist).

        Like

      2. areilly Avatar

        I see what happened now, I originally tried it on a machine that I just just wiped and done a fresh install of 10.13.2, and got the “Domain bluetoothaudiod does not exist” since it had not been set yet, like you mentioned in another comment.

        Like

  5. LBrown Avatar
    LBrown

    When entering the terminal command I’m given “Domain bluetoothaudiod does not exist.” I tried searching/downloading Additional Tools for Xcode on the Developer site, but the only download available as of 12/09/17 was Xcode itself. Likewise, it wasn’t available on the App Store. Any help would be appreciated.

    Like

    1. areilly Avatar

      Go to https://developer.apple.com/download/more/ and search for “additional” – the latest is “Additional Tools for Xcode 9”. Once you’re first logged in to the developer site, you can also try this direct link: https://download.developer.apple.com/Developer_Tools/Additional_Tools_for_Xcode_9/Additional_Tools_for_Xcode_9.dmg

      Like

    2. Anders Carling Avatar

      “Domain bluetoothaudiod does not exist.” is what you would get if you check your current settings before you’ve updated any of the settings. You should be able to use the sudo defaults write command to update the setting just fine anyway.

      You should then be able to confirm that you are actually using AAC / AptX by option-clicking the Bluetooth menu bar icon, as outlined in the bottom of the blog post.

      Like

  6. fvw Avatar
    fvw

    Thanks for this! It looks like my beatsX are not picking up the AAC codec despite enabling it on my mac.

    This is what i get in terminal once i enter “sudo defaults read bluetoothaudiod”:

    “Enable AAC codec” = 1;
    “Enable AptX codec” = 1;

    I removed my beatsX from my device completely, reconnected it, but when look at the active codec it still shows as “not active”

    any tips?

    Like

    1. areilly Avatar

      Make sure there’s some kind of music app playing – MacOS will turn off or switch codecs depending on the app that is accessing the audio device. If you have a voice chat open at the same time as iTunes, it will sometimes downgrade the codec for the voice chat app.

      Like

      1. Subbu Avatar

        It works.

        Like

  7. Chris Avatar
    Chris

    Any reason not to bump the AAC bandwidth to max?

    Like

    1. areilly Avatar

      I was never able to get a clear answer on that. I tried changing it, but the bluetooth transmission rates didn’t seem to change, and I didn’t hear a difference.

      Like

  8. Enzo Avatar
    Enzo

    Frustrating, I’ve tried all, no success.
    I downloaded the bt explorer, it appears different from the one shown in the image. Do all the steps, my SONY HTRT40 is aac bt capable, but the Mac refuses to connect through AAC. Funny thing is that I connect my iPad Air, and sound is great, Idk for sure if ipad is using AAC, but I guess so because sound from my android and my Mac sound horrible and I can be for sure in the Mac is using SBC, is there a way I can verify this on the iPad?

    Like

    1. Jake Avatar
      Jake

      Harder to find out on iOS but if you have a Mac it’s possible:

      Here we go:

      Connect your iOS device to your Mac, answer Trust on the iOS device if you haven’t done this before.
      Open Console.app.
      Select your iOS device on the left sidebar.
      Type bluetooth in the top-right search bar, press Enter and select Subsystem instead of All.
      Now, start playing to your bluetooth headphones on the iOS device (codec activates only when you output sound).
      Press Cmd+F and search for Starting a2dp send thread in your console messages.
      You’ll see used codec in codec: field. Values are the same as specified in Bluetooth specs. Basically 0 = SBC, 2 = AAC.

      Stolen from:

      https://stackoverflow.com/questions/22639691/how-to-determine-which-codecs-a-bluetooth-device-supports-over-a2dp/42190656

      Like

  9. Jake Avatar
    Jake

    I hear a HUGE difference between SBC and AAC through Apple Music. Thanks for this post!

    PS — how do you like the 1000X? I was thinking of picking up the WH1000xm2 myself.

    Like

  10. Winston Avatar
    Winston

    hey guys,

    trying to go through this process on my work computer (which, unfortunately, doesn’t give me access to terminal so using the original method) for my new beoplay E8’s which support AAC but not aptX.

    for some reason, when i open up the ‘audio options’ pop-up in bluetooth explorer, i don’t have an ‘enable AAC’ box to toggle (everything else matches the screenshots in the article exactly). is there a way to make it visible or am i stuck with SBC?

    currently running OS 10.12.6

    thanks!
    winston

    Like

    1. Winston Avatar
      Winston

      never mind – had an old version of bluetooth explorer 🙂 thanks anyway!

      Like

  11. LWeiLi Avatar
    LWeiLi

    YESSSSS THANKS

    Like

  12. Ralph Avatar
    Ralph

    So what I just found out (because frustratingly none of this worked):

    If you have a headset instead of “just headphones”, you need to change the audio input to something different, don’t use the one from your headset. If that is turned on, MacOS will always choose SBC as a codec for the bluetooth audio connection. Once you redirect that to “internal microphone”, our Mac will choose the better codec. AAAARGH.

    Like

    1. Henrik Avatar
      Henrik

      This! Switching the input away from my Sony MDR-XB950BT to the Macbook Pro microphone fixed it! I was locked to SCO sound output, now I’m in a much better place with SBC. I’m still not getting AAC, but anything is better than that horrible SCO.

      Like

      1. Ariel Avatar
        Ariel

        Have the same headset and I have been making it work like that (switching the input to the internal mic), but I´m still trying to find a way to use the headphones mic and not lose sound quality, does anyone know a way around it?

        Like

  13. steve Avatar
    steve

    Thank You aptx is now an option

    Like

  14. Miguel Hiraldo Avatar
    Miguel Hiraldo

    Ahhh! Thanks! Was using my Mid 2010 MacBook Pro with my MiniBlink (a Bluetooth DAC device with GREAT sound) connected to my stereo (Naim) and was getting very compressed sound as i was only able to get Aptx.
    As soon as i downloaded the Bluetooth Explorer and clicked on the AAC the sound was much better. Now, does someone know how to maximize the SBC Codec so that the Bit Pool can be extended to 80 (instead of the default maximum of 64)? I read it makes a huge difference but as hard as tried to enter the commands (found on some other page in the web) on the mac terminal app, i was not able to change the parameters in Bluetooth Explorer.

    Like

  15. Cemal Avatar
    Cemal

    I did the ( bluetoothaudiod “Enable AptX codec” -bool true ) but nothing happened.

    What happened?

    Like

  16. Mike Avatar
    Mike

    I tried both the GUI using bluetooth explorer and the terminal command using SUDO to activate aac.
    It DOES show “Apple Initial Bitpool” = 64; & “Enable AAC codec” = 1; which means the AAC is activated.

    BUUUTTT, sadly every time I right click on the bluetooth icon to see the codec being used, it still always says SBC when audio is playing via my bluetooth earbuds.
    I’m on MacOS High Sierra.

    PLEASE HELP!!

    Like

  17. vadikgo Avatar
    vadikgo

    Why to set AAC Bitrate to 128? Apple Music encoded with 256Kbs bitrate.

    Like

  18. Vlad Avatar
    Vlad

    Just off microphone

    Like

  19. Brendan Avatar
    Brendan

    I’m able to enable the AAC codec for music like Spotify, but whenever I need to use the microphone the driver still switches to SCO and the quality goes to garbage.

    Like

  20. Calum Avatar
    Calum

    For my Sony MDR ZX770BN I’ve managed to get it working using the BT Explorer but it only sticks with the AAC codec for about 20 seconds and then goes back to SCO. I then made sure the input was the internal mic, and it switched to AAC but then, again, switched back to SCO after about 20 seconds. So frustrating. Anyone else experienced this?

    Like

  21. Motti Shneor Avatar
    Motti Shneor

    This is great, and I managed to have my Bowers&Wilkins PX to play using AAC from iTunes application. However – that only survived until I quit the “Bluetooth Explorer” application, in which time, they somehow switched to using aptX. Strangely – this happened without even disconnect-reconnect of the bluetooth device. My question: Can this change be done permanently, using “sudo defaults write” ? where are these defaults stored? Another question – why would aptX sound distinctively inferior to AAC when playing the same piece in iTunes? The file itself is encoded using AAC – can it be the recompression?

    Like

  22. Motti Shneor Avatar
    Motti Shneor

    I forgot to write – on my iMac (mid 2015) and MacOS 10.14.2 – “sudo defaults read bluetoothaudiod” yields “unknown domain”. Should I first “write” and only then “read” ?

    Like

  23. sjlee Avatar
    sjlee

    Also correct domain name is “com.apple.bluetoothaudiod”.

    Like

  24. Paul Avatar
    Paul

    What a huge improvement in the way Bluetooth audio sounds! Thank you for the much easier instructions via Terminal, as opposed to having jump thru hoops in Apple’s dev program. You would think Apple would make better audio quality a default, but those days have passed.

    Like

  25. Softwareinform Avatar

    Thanks for sharing

    Like

  26. Mr Abbas Avatar

    I did some digging and found where the relevant setting is stored.

    Using Terminal, it can be checked by running:
    sudo defaults read bluetoothaudiod

    And set by running:
    sudo defaults write bluetoothaudiod “Enable AAC codec” -bool true

    Reconnecting the headphones seems to be enough to pick up the change.

    Like

  27. Keely J Jones Avatar

    What a huge improvement in the way Bluetooth audio sounds! Thank you for the much easier instructions via Terminal, as opposed to having jump thru hoops in Apple’s dev program. You would think Apple would make better audio quality a default, but those days have passed.

    Like

  28. SO Avatar
    SO

    This works for me EXCEPT when i turn off my headphones & turn them on again they fall back to SBC, the only way to get them to use aptX again is turn off bluetooth on the mac and turn it back on again. (or press disconnect and reconnect again on the mac’s bluetooth options)
    I have a pair of August EP650.
    would you know how to sort this out so that when i just turn on the headphones it automatically uses aptx instead of having to do the extra steps each time?

    Like

  29. Dragonrest Avatar

    I’m using macbook pro 2014 and this tutorial worked, thanks for the information

    Like

  30. Pronadjimeru MP3 Avatar

    what a valuable information you gave us, this also solve my problem thanks mate !

    Like

  31. Michael Johnson Avatar
    Michael Johnson

    I’m not getting any sound at all from my bluetooth headphones. None. The Bluetooth manager shows that the headphones are connected, but no sound comes out no matter what app I’m using. The headphones work fine over bluetooth with my iPhone and iPad, just not my Mac. Frustrating AF. Please help.

    Like

  32. avtubehub Avatar

    works on macbook pro m1, thanks!

    Like

Leave a comment

Blog at WordPress.com.