mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
bluetooth: Set to off instead of failing module load
If the profile setup fails during module load, the fallback should be setting the profile to off, exactly as it is done in card_set_profile().
This commit is contained in:
parent
9b9e53d144
commit
3ddff2f3e5
1 changed files with 9 additions and 2 deletions
|
|
@ -2647,11 +2647,18 @@ int pa__init(pa_module* m) {
|
|||
|
||||
if (u->profile != PROFILE_OFF)
|
||||
if (init_profile(u) < 0)
|
||||
goto fail;
|
||||
goto off;
|
||||
|
||||
if (u->sink || u->source)
|
||||
if (start_thread(u) < 0)
|
||||
goto fail;
|
||||
goto off;
|
||||
|
||||
return 0;
|
||||
|
||||
off:
|
||||
stop_thread(u);
|
||||
|
||||
pa_assert_se(pa_card_set_profile(u->card, "off", false) >= 0);
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue