Can BlueZ use AAC codec with A2DP?

cancel
Showing results for 
Search instead for 
Did you mean: 

Can BlueZ use AAC codec with A2DP?

Jump to solution
1,412 Views
Takashi_Kashiwagi
Senior Contributor I

Hi Community.

I have using 8MMINILPD4-EVK with 4.14.78-sumo.

I tryed pairing with iPhone via A2DP and btusb, it's OK. but codec is still SBC. I want to use AAC.

I think it would be possible to change the BlueZ settings, but does anyone know the correct settings?

The connection log is as follows. BlueZ seems to recognize AAC, but it looks like it is going to connect with SBC.

root@imx8mmevk:~# sudo hcidump avdtp
HCI sniffer - Bluetooth packet analyzer ver 5.49
device: hci0 snap_len: 1500 filter: 0x400
< AVDTP(s): Discover cmd: transaction 3 nsp 0x00
> AVDTP(s): Discover rsp: transaction 3 nsp 0x00
ACP SEID 1 - Audio Source
ACP SEID 2 - Audio Source
ACP SEID 3 - Audio Source
ACP SEID 4 - Audio Source
ACP SEID 5 - Audio Source
ACP SEID 6 - Audio Source
< AVDTP(s): All Capabilities cmd: transaction 4 nsp 0x00
ACP SEID 1
> AVDTP(s): All Capabilities rsp: transaction 4 nsp 0x00
Media Transport
Media Codec - SBC
44.1kHz
JointStereo
16 Blocks
8 Subbands
Loudness
Bitpool Range 2-250
Delay Reporting
< AVDTP(s): All Capabilities cmd: transaction 5 nsp 0x00
ACP SEID 2
> AVDTP(s): All Capabilities rsp: transaction 5 nsp 0x00
Media Transport
Media Codec - SBC
44.1kHz
JointStereo
16 Blocks
8 Subbands
Loudness
Bitpool Range 2-250
Delay Reporting
< AVDTP(s): All Capabilities cmd: transaction 6 nsp 0x00
ACP SEID 3
> AVDTP(s): All Capabilities rsp: transaction 6 nsp 0x00
Media Transport
Media Codec - MPEG-2,4 AAC
MPEG-2 AAC LC
44.1kHz
2 Channels
256000bps VBR
Delay Reporting
< AVDTP(s): All Capabilities cmd: transaction 7 nsp 0x00
ACP SEID 4
> AVDTP(s): All Capabilities rsp: transaction 7 nsp 0x00
Media Transport
Media Codec - MPEG-2,4 AAC
MPEG-2 AAC LC
44.1kHz
2 Channels
256000bps VBR
Delay Reporting
< AVDTP(s): All Capabilities cmd: transaction 8 nsp 0x00
ACP SEID 5
> AVDTP(s): All Capabilities rsp: transaction 8 nsp 0x00
Media Transport
Media Codec - non-A2DP (Unknown)
00 80 00 84 00 84 E2 00
Delay Reporting
< AVDTP(s): All Capabilities cmd: transaction 9 nsp 0x00
ACP SEID 6
> AVDTP(s): All Capabilities rsp: transaction 9 nsp 0x00
Media Transport
Media Codec - non-A2DP (Unknown)
00 80 00 84 00 84 E2 00
Delay Reporting
< AVDTP(s): Set config cmd: transaction 10 nsp 0x00
ACP SEID 1 - INT SEID 4
Media Transport
Media Codec - SBC
44.1kHz
JointStereo
16 Blocks
8 Subbands
Loudness
Bitpool Range 2-53
> AVDTP(s): Set config rsp: transaction 10 nsp 0x00
< AVDTP(s): Open cmd: transaction 11 nsp 0x00
ACP SEID 1
> AVDTP(s): Open rsp: transaction 11 nsp 0x00

Best Regards,

T.Kashiwagi

Tags (2)
1 Solution
942 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

Unfortunately, this problem is more related to the BlueZ codec we do not have this type of information. I have found some external driver of PulseAudio that has the support of the AAC codec. However, we cannot guarantee if this will work. I apologize for the inconveniences this could give you.

https://github.com/EHfive/pulseaudio-modules-bt

Best regards,

Diego.

View solution in original post

3 Replies
943 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

Unfortunately, this problem is more related to the BlueZ codec we do not have this type of information. I have found some external driver of PulseAudio that has the support of the AAC codec. However, we cannot guarantee if this will work. I apologize for the inconveniences this could give you.

https://github.com/EHfive/pulseaudio-modules-bt

Best regards,

Diego.

942 Views
Takashi_Kashiwagi
Senior Contributor I

Hi Diego

Thank you for responding.

I will try to install the pulseaudio-modules-bt !!

Best Regards,

T.Kashiwagi

0 Kudos
942 Views
Takashi_Kashiwagi
Senior Contributor I

Hi all

I'll write to the point I understand so far.

  • bitbake pulseaudio-modules-bt
    • you can create bb files by recipetool as follows.
    • recipetool create -o pulseaudio-modules-bt.bb -S 765766c4efc6c71b353247a9875f19fce9ba1e1b https://github.com/EHfive/pulseaudio-modules-bt.git

    • And you needs to modify CMakeList.txt for ninja (replace $ -> $$ and set ${PulseAudio_LIBDIR} to correct path).
    • With the settings above, "bitbake pulseaudio-modules-bt" creates * .so files, but an error occurs because the pulse audio and output file name are the same.
    • I replaced the file in the target board by scp command , but still no sound........

Best Regards,

T.Kashiwagi

0 Kudos