Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Forti

macrumors regular
Original poster
Nov 14, 2018
174
282
Gdynia, Poland
Hi!

So, for Catalina and others we had to download the "bluetooth explorer" to force aptx/aac audio codec for bluetooth headsets.

Currently, on Big Sur - the developer tools for Xcode 12 doesn't have such a tool, and the one from Xcode 11 is not working.

Any ideas how to solve/force it?
 
  • Like
Reactions: discoHR

robotica

macrumors 65816
Jul 10, 2007
1,213
1,308
Edinburgh
Did you find a way to veryify which codec is being used? I asked a similar question last month.
When I option click bluetooth it no longer tells me which codec is currently being used. Quite frustrating.
 

discoHR

macrumors newbie
Oct 2, 2020
9
1
Did you find a way to veryify which codec is being used? I asked a similar question last month.
When I option click bluetooth it no longer tells me which codec is currently being used. Quite frustrating.
You can still check the codec in Console app. Type bluetoothd in Console's search bar, change ANY to PROCESS and click the Start button. Then start playing something. The codec will be shown like "codec = X" where X is a number (0 = SBC, 2 = AAC, sorry don't know other values). You will also see the bitrate and other stream info.
 
Last edited:
  • Love
Reactions: robotica

robotica

macrumors 65816
Jul 10, 2007
1,213
1,308
Edinburgh
Ok we are getting somewhere now :) Thanks for you tip about checking in the Console.
I can't see anything exactly like codec =, but I think this info might be in this part of the console logs.
any idea?

Sending {
BTCodecLatency = "0.014";
BTDeviceAddress = "00-16-77-2d-ee-99";
BTDeviceAutoRoutingEnabled = 1;
BTDeviceCategory = 1;
BTDeviceDoAPUUID = "572F5C71-B6C9-400E-B270-DDF4025510A4";
BTDeviceHFPCodecID = 2;
BTDeviceInEarDetection = 0;
BTDeviceInEarEnabled = 1;
BTDeviceInEarPrimaryBudSide = 0;
BTDeviceInEarStatusPrimary = 0;
BTDeviceInEarStatusSecondary = 0;
BTDeviceLEAMaxPacketSize = 0;
BTDeviceLatency = "0.01";
BTDeviceManufacturer = 82;
BTDeviceModelUID = "82 46";
BTDeviceName = "PXC 550";
BTDeviceRightChannel = 0;
BTDeviceSupportsA2DP = 1;
BTDeviceSupportsAbsoluteVolume = 1;
BTDeviceSupportsDoAP = 0;
BTDeviceSupportsInput = 1;
BTDeviceSupportsOutput = 1;
BTDeviceSupportsSCO = 1;
BTDeviceSupportsStereo = 0;
BTDeviceTurnOffDSP = 1;
BTDeviceisAppleAccessoryServer = 0;
BTMethod = BTDeviceConnected;
} to core audio
 

robotica

macrumors 65816
Jul 10, 2007
1,213
1,308
Edinburgh
[updateAudioState] sampleRate:48000.000000 isSystemSleeping:0 currentProtocol:A2DP state:Active inputActive:0 outputActive:1

This is the only other part which potentially looks useful

I think this means that Its using standard A2DP which would suggest that apple has removed APTX from Big Sur :(
 
  • Wow
Reactions: ignatius345

discoHR

macrumors newbie
Oct 2, 2020
9
1
Could be I remembered it wrong. Try bluetoothaudiod (any) or bitrate (any) instead. The line looks like the one below, it even shows AAC is used.

ACMP4AACBaseEncoder.cpp:650:Initialize: (0x7f842a008840) @@@@ 'aac ' encoder configuration: srIn = 48000, srOut = 48000, chans = 2, bitRateFormat = 3, bitrate = 192000, quality (complexity) = 64, VBRQ = -1, speechOptimization = 0, packetSizeLimit = 5456 (bits), packetBitSizeMin = 256 (bits), mMaxPacketSize = 1536 (bytes), userBandwidth = 0, delayMode = 0, mCodecDelay = 2112, drcConfiguration = 0, mPrePostFillMask = 0x0

Was APTX enabled on your Mac before upgrading to Big Sur? It's not enabled by default. Not sure how to do it without Bluetooth Explorer.
 

GumaRodak

macrumors 6502a
Mar 14, 2015
535
322
there is an easy terminal command...you dont have to download any utilities

for aptx:
sudo defaults write bluetoothaudiod "Enable AptX codec" -bool true

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

for verification:
sudo defaults read bluetoothaudiod

was working in catalina so i hope it works in big sur too... :) altought i dont know how to verify in bluetooth connected device.
before i pressed opt+click on bluetooth icon to see the streamed codec...in big sur i dont know how to do it :)
 
Last edited:

discoHR

macrumors newbie
Oct 2, 2020
9
1
Thanks, will try it when XM3 arrives. Currently using XM4 but they dropped APTX support.
 

robotica

macrumors 65816
Jul 10, 2007
1,213
1,308
Edinburgh
@GumaRodak I tried the below command but it does not seem to work on Big Sur :(

sudo defaults read bluetoothaudiod

Edit: Tried the first command and that worked, then the second command worked :) Thanks

I sure hope they bring back an easy way to verify it in the GUI, it was great the way it worked before.
 
Last edited:

Forti

macrumors regular
Original poster
Nov 14, 2018
174
282
Gdynia, Poland
there is an easy terminal command...you dont have to download any utilities

for aptx:
sudo defaults write bluetoothaudiod "Enable AptX codec" -bool true

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

for verification:
sudo defaults read bluetoothaudiod

was working in catalina so i hope it works in big sur too... :) altought i dont know how to verify in bluetooth connected device.
before i pressed opt+click on bluetooth icon to see the streamed codec...in big sur i dont know how to do it :)


For everyone in future here - this indeed does the job done. Thanks mate!
 

humblyfar

macrumors newbie
Jan 23, 2021
1
0
For everyone in future here - this indeed does the job done. Thanks mate!
im not familiar with using the command prompt so I have no idea how to do this. What exactly do I do after opening the terminal app?
 

chucker23n1

macrumors 604
Dec 7, 2014
7,429
9,600
@GumaRodak I tried the below command but it does not seem to work on Big Sur :(

sudo defaults read bluetoothaudiod

Edit: Tried the first command and that worked, then the second command worked :) Thanks

I sure hope they bring back an easy way to verify it in the GUI, it was great the way it worked before.
Hm.

Big Sur 11.2.1 (20D74). Did the defaults dance:

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

Then:

> sudo defaults read bluetoothaudiod
{
"Enable AAC codec" = 1;
}

However, according to Console (filtered by "process:bluetoothd" and "codec"), "eSCO" is still used as the codec.

Sounds awful compared to iPhone.

Is it possible that my late-2013 Mac doesn't support newer codecs?
 

k_7

macrumors newbie
Mar 4, 2021
1
1
AptX works for me on M1 mini 11.2.2
use older codex tools and graph button to check active codec

Bildschirmfoto 2021-03-05 um 09.09.04.png
 
  • Like
Reactions: zoltm

4dam

macrumors newbie
Mar 19, 2021
1
0
AptX works for me on M1 mini 11.2.2
use older codex tools and graph button to check active codec

View attachment 1738989

Hi, I've just registered to post. I've got a work MBP 16" 2019 (i7, 32Gb) that came with Catalina and I recently upgrade to Big Sur (11.2.1) and the sound quality has been bugging me. It's noticeably worse than before.
I also purchased an Air M1 but haven't really noticed an issue on there, but I've not listened to a lot of music on that machine.

Could you tell me what this app is called and where to get it please?
 
Last edited:

AltarOfSpuds

macrumors newbie
Mar 29, 2021
9
1
Could be I remembered it wrong. Try bluetoothaudiod (any) or bitrate (any) instead. The line looks like the one below, it even shows AAC is used.

ACMP4AACBaseEncoder.cpp:650:Initialize: (0x7f842a008840) @@@@ 'aac ' encoder configuration: srIn = 48000, srOut = 48000, chans = 2, bitRateFormat = 3, bitrate = 192000, quality (complexity) = 64, VBRQ = -1, speechOptimization = 0, packetSizeLimit = 5456 (bits), packetBitSizeMin = 256 (bits), mMaxPacketSize = 1536 (bytes), userBandwidth = 0, delayMode = 0, mCodecDelay = 2112, drcConfiguration = 0, mPrePostFillMask = 0x0

Was APTX enabled on your Mac before upgrading to Big Sur? It's not enabled by default. Not sure how to do it without Bluetooth Explorer.
This didn't work for me on Big Sur 11.2.3. Instead, I searched Console for ANY format. Both bitrate and codec turned up nothing useful: I tried this with both Chrome Browser and VLC, and got the same result (ANY format):coreaudiod startIO activeIO:0 (output) sampleRate:48000.000000 format:2 mode:0

I assume that format: 2 means AptX is enabled. Also I have previously turned on AAC and AptX using:
sudo defaults write bluetoothaudiod "Enable AptX codec" -bool true && sudo defaults write bluetoothaudiod "Enable AAC codec" -bool true
 

zorinlynx

macrumors 604
May 31, 2007
7,570
14,987
Florida, USA
I'm curious, what benefits does using AptX have over AAC? I know both are better than SBC but just wondering why someone would want to force AptX.
 

AltarOfSpuds

macrumors newbie
Mar 29, 2021
9
1
I'm curious, what benefits does using AptX have over AAC? I know both are better than SBC but just wondering why someone would want to force AptX.
This page has a lot of details about it: https://www.soundguys.com/understanding-bluetooth-codecs-15352/

It's a mixed bag and a lot depends on your specific devices. AptX has lower complexity, which improves latency, and supports higher data rates. Some devices only support one or the other, so AptX might be your only option.

Personally, either codec should be fine, and probably won't be the weakest link in your audio pipeline. There's many things that influence your user experience, including source quality, device compatibility (including quirks), stability of connection (walking around, vs stationary), your own discernment. Try both and see if you can even tell: I'd guess no, but you might prefer one for other reasons, like stability or having less quirks.
 

JippaLippa

macrumors 6502a
Jan 14, 2013
956
897
Does this string means the activation was a success?
(this appears after writing the "sudo defaults read bluetoothaudiod" command)

Screenshot 2021-04-02 at 18.15.06.png


Thank you.

(btw I use the native macOS Apple Music app to play all files, both physical and streamed)
 
Last edited:

AltarOfSpuds

macrumors newbie
Mar 29, 2021
9
1
Does this string means the activation was a success?
(this appears after writing the "sudo defaults read bluetoothaudiod" command)

View attachment 1752664

Thank you.
I think so, but the actual choice a given program makes still is a mystery to me, since it also depends on your headphones. I think the only way to really know it to play some audio, and check the Console application for clues as to what codecs are actually being used. It was previously stated/shown in the Option-key Bluetooth icon, but that's absent in Big Sur.
 

JippaLippa

macrumors 6502a
Jan 14, 2013
956
897
I think so, but the actual choice a given program makes still is a mystery to me, since it also depends on your headphones. I think the only way to really know it to play some audio, and check the Console application for clues as to what codecs are actually being used. It was previously stated/shown in the Option-key Bluetooth icon, but that's absent in Big Sur.
My headphones are AAC certified.
How could I exactly check the codec that's being used in the terminal?

By the way I find this lack of a possibility to check (and change) the bluetooth codec in Big Sur totally absurd, especially since the use of bluetooth headphones and liquid music is becoming pretty much a mainstream affair...
It's especially infuriating if we consider this feature was available in previous versions of macOS.
 

AltarOfSpuds

macrumors newbie
Mar 29, 2021
9
1
My headphones are AAC certified.
How could I exactly check the codec that's being used in the terminal?

By the way I find this lack of a possibility to check (and change) the bluetooth codec in Big Sur totally absurd, especially since the use of bluetooth headphones and liquid music is becoming pretty much a mainstream affair...
It's especially infuriating if we consider this feature was available in previous versions of macOS.
Yep, frustrating.First turn off any audio, then start Console.app, select your device name on the right. Then in the search area, type format (any: format will appear in bar). Now push the start button. Next, play some music and see what shows up. Earlier posts in this thread discuss what you can see in this app, but your mileage may vary.
The best/only clue I ever saw was coreaudiod . . . format:2, which I think means AptX was used (actually it might be AAC)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.