mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-11 04:27:56 -05:00
pipewire-pulse: Expose bluetooth headset autoswitch config as a message
Makes it easier for libpulse-based clients to modify this setting if they want.
This commit is contained in:
parent
703380d62d
commit
ed59342d28
4 changed files with 69 additions and 8 deletions
|
|
@ -984,10 +984,22 @@ static void manager_metadata(void *data, struct pw_manager_object *o,
|
|||
else
|
||||
client->default_force_mono_audio = spa_streq(default_, "true");
|
||||
}
|
||||
|
||||
if (spa_streq(key, METADATA_BLUETOOTH_HEADSET_AUTOSWITCH)) {
|
||||
client->have_bluetooth_headset_autoswitch = true;
|
||||
|
||||
if (spa_json_str_object_find(value, strlen(value),
|
||||
"default", default_, sizeof(default_)) < 0)
|
||||
client->default_bluetooth_headset_autoswitch = false;
|
||||
else
|
||||
client->default_bluetooth_headset_autoswitch = spa_streq(default_, "true");
|
||||
}
|
||||
}
|
||||
if (subject == PW_ID_CORE && o == client->metadata_sm_settings) {
|
||||
if (spa_streq(key, METADATA_FEATURES_AUDIO_MONO))
|
||||
client->force_mono_audio = spa_streq(value, "true");
|
||||
if (spa_streq(key, METADATA_BLUETOOTH_HEADSET_AUTOSWITCH))
|
||||
client->bluetooth_headset_autoswitch = spa_streq(value, "true");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue