mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-17 08:56:49 -05:00
bluez5: add a dummy AVRCP player as a workaround
Some devices (Bose Mini Soundlink II, Air 1 Plus, ...) don't enable AVRCP volume control, or fail to enable it before a hardware button is pressed. However, these devices appear to enable it, if an AVRCP player is present. As a workaround, register a dummy AVRCP player for each adapter. It only displays the current transport acquisition state as playing/stopped, but just its presence appears to be enough to make devices behave. Multiple AVRCP players interfere with each other, as BlueZ uses the one registered earliest as the default player. So add also a config option for disabling this. (It's not common to have mpris-proxy etc. running, so defaulting to true should be OK.) See pipewire#1157
This commit is contained in:
parent
336caa9db3
commit
4b831021fb
6 changed files with 514 additions and 0 deletions
|
|
@ -314,10 +314,12 @@ static inline const char *spa_bt_profile_name (enum spa_bt_profile profile) {
|
|||
|
||||
struct spa_bt_monitor;
|
||||
struct spa_bt_backend;
|
||||
struct spa_bt_player;
|
||||
|
||||
struct spa_bt_adapter {
|
||||
struct spa_list link;
|
||||
struct spa_bt_monitor *monitor;
|
||||
struct spa_bt_player *dummy_player;
|
||||
char *path;
|
||||
char *alias;
|
||||
char *address;
|
||||
|
|
@ -332,6 +334,7 @@ struct spa_bt_adapter {
|
|||
int powered;
|
||||
unsigned int endpoints_registered:1;
|
||||
unsigned int application_registered:1;
|
||||
unsigned int player_registered:1;
|
||||
unsigned int has_battery_provider;
|
||||
unsigned int battery_provider_unavailable;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue