mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
bluetooth: rework the info_valid logic to be more tolerant
This commit is contained in:
parent
f1daa282f0
commit
e83621724d
1 changed files with 2 additions and 3 deletions
|
|
@ -114,15 +114,14 @@ void pa_bluetooth_device_free(pa_bluetooth_device *d) {
|
|||
static pa_bool_t device_is_loaded(pa_bluetooth_device *d) {
|
||||
pa_assert(d);
|
||||
|
||||
return d->device_info_valid && d->audio_sink_info_valid && d->headset_info_valid;
|
||||
return d->device_info_valid && (d->audio_sink_info_valid || d->headset_info_valid);
|
||||
}
|
||||
|
||||
static pa_bool_t device_is_audio(pa_bluetooth_device *d) {
|
||||
pa_assert(d);
|
||||
|
||||
pa_assert(d->device_info_valid);
|
||||
pa_assert(d->audio_sink_info_valid);
|
||||
pa_assert(d->headset_info_valid);
|
||||
pa_assert(d->audio_sink_info_valid || d->headset_info_valid);
|
||||
|
||||
return d->device_info_valid > 0 &&
|
||||
(d->audio_sink_info_valid > 0 || d->headset_info_valid > 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue