EHfive / pulseaudio-modules-bt

[Deprecated, see https://github.com/EHfive/pulseaudio-modules-bt/issues/154] Adds Sony LDAC, aptX, aptX HD, AAC codecs (A2DP Audio) support to PulseAudio on Linux
GNU General Public License v3.0
1.75k stars 86 forks source link

modules fail to load #79

Closed daenney closed 4 years ago

daenney commented 5 years ago

I'm trying to switch over to pulseaudio-modules-bt but I seem to get into trouble loading the new modules

~/D/u/bin $ pacman -Q pulseaudio-modules-bt-git
pulseaudio-modules-bt-git r141.3ecf1d7-1
~/D/u/bin $ pacman -Q pulseaudio
pulseaudio 12.2-2
~/D/u/bin $ pacman -Q libldac
libldac 2.0.2.3-2

The package contains the modules:

~/D/u/bin $ pacman -Ql pulseaudio-modules-bt-git
pulseaudio-modules-bt-git /usr/
pulseaudio-modules-bt-git /usr/lib/
pulseaudio-modules-bt-git /usr/lib/pulse-12.2/
pulseaudio-modules-bt-git /usr/lib/pulse-12.2/modules/
pulseaudio-modules-bt-git /usr/lib/pulse-12.2/modules/libbluez5-util.so
pulseaudio-modules-bt-git /usr/lib/pulse-12.2/modules/module-bluetooth-discover.so
pulseaudio-modules-bt-git /usr/lib/pulse-12.2/modules/module-bluetooth-policy.so
pulseaudio-modules-bt-git /usr/lib/pulse-12.2/modules/module-bluez5-device.so
pulseaudio-modules-bt-git /usr/lib/pulse-12.2/modules/module-bluez5-discover.so

The default config on Arch includes:

### Automatically load driver modules for Bluetooth hardware
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.endif

.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif

However, I don't see any bluez related sink, though bluetooth is active and a device is paired:

~/D/u/bin $ bluetoothctl
Agent registered
[CHG] Controller FC:77:74:A3:E5:11 Pairable: yes
[Daenney’s AirPods]# paired-devices
Device BC:B8:63:XX:XX:XX Daenney’s AirPods

If I look into the systemd journal for Pulse I see:

Sep 06 14:03:30 yunikoni pulseaudio[5157]: E: [pulseaudio] a2dp_aac.c: Invalid object type in AAC configuration
Sep 06 14:03:30 yunikoni pulseaudio[5157]: E: [pulseaudio] bluez5-util.c: Endpoint SetConfiguration(): invalid arguments
~ $ pactl list sinks | grep -i blue
~ $ 
daenney commented 5 years ago

I've tried this with both bluez and bluez-git, the result is the same

EHfive commented 5 years ago

Your headphone is not compatible with this module.

Plz post you result of avinfo. #31

daenney commented 5 years ago
$ avinfo BC:B8:63:XX:XX:XX
Connecting ... 
Stream End-Point #1: Audio Sink 
        Media Codec: SBC
                Channel Modes: Mono DualChannel Stereo JointStereo
                Frequencies: 16Khz 32Khz 44.1Khz 48Khz 
                Subbands: 4 8
                Blocks: 4 8 12 16 
                Bitpool Range: 2-250
Stream End-Point #2: Audio Sink 
        Media Codec: MPEG24
                Object Types: MPEG-2 AAC LC 
                Frequencies: 44.1kHz 48kHz 
                Channels: 1 2 
                Bitrate: 256000
                VBR: Yes

The device in particular are Apple AirPods

MateuszKubuszok commented 5 years ago

I might have similar problem. After I upgraded by Arch yesterday, my headset stopped connecting (at all) and when I tried to debug it, I also got error messages saying that I cannot load/initialize module-bluetooth-discover and module-bluetooth-policy. Perhaps there was a breaking change somewhere?

> avinfo XX:XX:XX:XX:XX:XX
Connecting ... 
Stream End-Point #1: Audio Sink 
    Media Codec: SBC
        Channel Modes: Mono DualChannel Stereo JointStereo
        Frequencies: 44.1Khz 48Khz 
        Subbands: 4 8
        Blocks: 4 8 12 16 
        Bitpool Range: 2-53
    Content Protection: SCMS-T
Stream End-Point #5: Audio Sink 
    Media Codec: Vendor Specific A2DP Codec
        Vendor ID 0x0000012d
        Vendor Specific Codec ID 0x00aa
        Vendor Specific Value (LDAC)
            Unknown: 3c 07
    Content Protection: SCMS-T
Stream End-Point #6: Audio Sink 
    Media Codec: Vendor Specific A2DP Codec
        Vendor ID 0x000000d7
        Vendor Specific Codec ID 0x0024
    Content Protection: SCMS-T
Stream End-Point #3: Audio Sink 
    Media Codec: Vendor Specific A2DP Codec
        Vendor ID 0x0000004f
        Vendor Specific Codec ID 0x0001
        Vendor Specific Value (aptX)
            Frequencies: 44.1kHz 48kHz 
            Channel modes: Stereo 
    Content Protection: SCMS-T
Stream End-Point #2: Audio Sink 
    Media Codec: MPEG24
        Object Types: MPEG-2 AAC LC MPEG-4 AAC LC 
        Frequencies: 44.1kHz 48kHz 
        Channels: 1 2 
        Bitrate: 320000
        VBR: Yes
    Content Protection: SCMS-T

> pactl load-module module-bluetooth-discover  
Failure: Module initialization failed

> pactl load-module module-bluetooth-policy
Failure: Module initialization failed

> journalctl -efu bluetooth.service
systemd[1]: Starting Bluetooth service...
bluetoothd[1495]: Bluetooth daemon 5.50
systemd[1]: Started Bluetooth service.
bluetoothd[1495]: Starting SDP server
bluetoothd[1495]: Bluetooth management interface 1.14 initialized
bluetoothd[1495]: a2dp-sink profile connect failed for 70:26:05:3A:0D:DB: Protocol not available
bluetoothd[1495]: a2dp-sink profile connect failed for 70:26:05:3A:0D:DB: Protocol not available
bluetoothd[1495]: a2dp-sink profile connect failed for 70:26:05:3A:0D:DB: Protocol not available
systemd[1]: Stopping Bluetooth service...
systemd[1]: bluetooth.service: Succeeded.
systemd[1]: Stopped Bluetooth service.
EHfive commented 5 years ago

@MateuszKubuszok No, it's not your case. Arch recently updates pulseaudio from 12.2 to 12.99 in stable branch, so you have to rebuild pulseaudio-modules-bt-git from PKGBUILD.

ekaradon commented 5 years ago

@EHfive I think we cannot anymore build from the current package as Arch is now using the pulseaudio 13.0-2 version. And so we have the following libraries updated:

[  5%] Linking C shared library libbluez5-util.so
/usr/bin/ld: cannot find -lpulsecommon-12.2
/usr/bin/ld: cannot find -lpulsecore-12.2
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/bluez5-util.dir/build.make:219: libbluez5-util.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:138: CMakeFiles/bluez5-util.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
==> ERROR: A failure occurred in build().
EHfive commented 5 years ago

@ekaradon Try makepkg --clean or just make sure previous cached sources is deleted. (A clean build)

ekaradon commented 5 years ago

Using the option was not enough but with the last update (9f17638..5022ac1) and by removing everything in the directory it did work. Thanks @EHfive!

dbernheisel commented 5 years ago

Works for me:

rm -rfv ~/.cache/yay/pulseaudio-modules-bt-git
yay pulseaudio-modules-bt-git
reboot
barraponto commented 5 years ago

If your package builder caches (just keeps) the build folder, git submodule update should fix it. (although I fixed it as mentioned above)

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.