mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
bluetooth: Do not create a card profile for unsupported profiles
Check whether a Bluetooth profile is supported both by the remote device and the local host before creating a card profile for it. This is useful when some of the media profiles have not been registered with bluetoothd because ex., oFono is not running and the headset backend is not available. Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/638>
This commit is contained in:
parent
ab47d9394b
commit
f7acc2ad7d
1 changed files with 3 additions and 0 deletions
|
|
@ -2198,6 +2198,9 @@ static int add_card(struct userdata *u) {
|
|||
if (pa_hashmap_get(data.profiles, pa_bluetooth_profile_to_string(profile)))
|
||||
continue;
|
||||
|
||||
if (!pa_bluetooth_device_supports_profile(d, profile))
|
||||
continue;
|
||||
|
||||
cp = create_card_profile(u, profile, data.ports);
|
||||
pa_hashmap_put(data.profiles, cp->name, cp);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue