You are not logged in.

#1 2019-01-05 19:09:48

laborat
Member
Registered: 2019-01-05
Posts: 4

PulseAudio and Bluetooth headset: auto-select AD2P profile?

I have a Bluetooth headset, which has two sound profiles available: HSP (which I don't want) and AD2P (which I do want). When I turn on the headset, PulseAudio seems to randomly pick one of these two profiles, resulting in a 50% chance of getting terrible quality until I manually open pavucontrol and switch to the correct profile. Is it possible to tell PulseAudio to ignore the HSP profile and always pick the AD2P profile? If it isn't, could I write an udev rule that automatically runs pacmd to switch to the correct profile once the headset connects?

Offline

#2 2019-01-15 14:53:03

laborat
Member
Registered: 2019-01-05
Posts: 4

Re: PulseAudio and Bluetooth headset: auto-select AD2P profile?

I managed to figure it out. For future reference: create a file /etc/udev/rules.d/headset.rules containing just the following line:

ACTION=="add", SUBSYSTEM=="bluetooth", RUN+="sudo -u user pactl --server unix:/run/user/1000/pulse/native set-card-profile bluez_card.xx_xx_xx_xx_xx_xx a2dp_sink"

where user is your username and the xx give your headset's device identifier.

Offline

#3 2019-01-15 15:00:10

2ManyDogs
Forum Moderator
Registered: 2012-01-15
Posts: 4,645

Re: PulseAudio and Bluetooth headset: auto-select AD2P profile?

Please remember to mark your thread [SOLVED] (edit the title of your first post).


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

Board footer

Powered by FluxBB