[pulseaudio-discuss] [PATCH] bluetooth: policy: Set initial profile hook to early

Luiz Augusto von Dentz luiz.dentz at gmail.com
Wed Jun 27 08:18:07 UTC 2018


Hi,

On Tue, Jun 26, 2018 at 2:45 PM, Luiz Augusto von Dentz
<luiz.dentz at gmail.com> wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz at intel.com>
>
> This ensures restore module to be last since in case of setting profile
> the last would win.
> ---
>  src/modules/bluetooth/module-bluetooth-policy.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/modules/bluetooth/module-bluetooth-policy.c b/src/modules/bluetooth/module-bluetooth-policy.c
> index 4d3126f65..bf035781e 100644
> --- a/src/modules/bluetooth/module-bluetooth-policy.c
> +++ b/src/modules/bluetooth/module-bluetooth-policy.c
> @@ -463,7 +463,8 @@ int pa__init(pa_module *m) {
>          u->source_output_unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_SOURCE_OUTPUT_UNLINK_POST], PA_HOOK_NORMAL,
>                                                         (pa_hook_cb_t) source_output_unlink_hook_callback, u);
>
> -        u->card_init_profile_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_CARD_CHOOSE_INITIAL_PROFILE], PA_HOOK_NORMAL,
> +        /* Set early priority sot the hook is run before restore so user selection can still be restored */
> +        u->card_init_profile_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_CARD_CHOOSE_INITIAL_PROFILE], PA_HOOK_EARLY,
>                                             (pa_hook_cb_t) card_init_profile_hook_callback, u);
>
>          u->card_unlink_slot = pa_hook_connect(&m->core->hooks[PA_CORE_HOOK_CARD_UNLINK], PA_HOOK_NORMAL,
> --
> 2.17.1

Just ignore this, from the discussion in the other thread it looks
like having only bluetooth-policy taking action would be better.


-- 
Luiz Augusto von Dentz


More information about the pulseaudio-discuss mailing list