mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
bluez5: allow setting initial profile to off
This is useful if the session manager wants to set the profile itself, and has special handling for the off profile.
This commit is contained in:
parent
029539831d
commit
0a55085b14
1 changed files with 3 additions and 0 deletions
|
|
@ -1107,6 +1107,8 @@ static void set_initial_profile(struct impl *this)
|
|||
/* If default profile is set to HSP/HFP, first try those and exit if found. */
|
||||
if (this->bt_dev->settings != NULL) {
|
||||
const char *str = spa_dict_lookup(this->bt_dev->settings, "bluez5.profile");
|
||||
if (spa_streq(str, "off"))
|
||||
goto off;
|
||||
if (spa_streq(str, "headset-head-unit") && set_initial_hsp_hfp_profile(this))
|
||||
return;
|
||||
}
|
||||
|
|
@ -1129,6 +1131,7 @@ static void set_initial_profile(struct impl *this)
|
|||
if (set_initial_hsp_hfp_profile(this))
|
||||
return;
|
||||
|
||||
off:
|
||||
spa_log_debug(this->log, "initial profile off");
|
||||
|
||||
this->profile = DEVICE_PROFILE_OFF;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue