bluetooth: Add avrcp_absolute_volume module flag for disablement

Not all peers might work fine with Absolute Volume, provide the user
with an option to disable it without impairing other AVRCP-related
commands like media status and playback controls.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/239>
This commit is contained in:
Marijn Suijten 2021-04-22 21:59:37 +02:00 committed by PulseAudio Marge Bot
parent 25426bc029
commit d9db47bdb5
4 changed files with 51 additions and 6 deletions

View file

@ -133,6 +133,7 @@ struct pa_bluetooth_device {
bool valid;
bool autodetect_mtu;
bool codec_switching_in_progress;
bool avrcp_absolute_volume;
uint32_t output_rate_refresh_interval_ms;
/* Device information */
@ -204,6 +205,7 @@ pa_hook* pa_bluetooth_discovery_hook(pa_bluetooth_discovery *y, pa_bluetooth_hoo
const char *pa_bluetooth_profile_to_string(pa_bluetooth_profile_t profile);
bool pa_bluetooth_profile_should_attenuate_volume(pa_bluetooth_profile_t profile);
bool pa_bluetooth_profile_is_a2dp(pa_bluetooth_profile_t profile);
static inline bool pa_bluetooth_uuid_is_hsp_hs(const char *uuid) {
return pa_streq(uuid, PA_BLUETOOTH_UUID_HSP_HS) || pa_streq(uuid, PA_BLUETOOTH_UUID_HSP_HS_ALT);