From 7f561eb9a0b320da536130e1b4d43df398070b2c Mon Sep 17 00:00:00 2001 From: Pig Monkey Date: Thu, 28 Mar 2019 20:19:23 -0700 Subject: [PATCH] auto-switch between hsp/hsf and a2dp bluetooth policies --- roles/bluetooth/tasks/main.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/roles/bluetooth/tasks/main.yml b/roles/bluetooth/tasks/main.yml index d33c6cf..790d72b 100644 --- a/roles/bluetooth/tasks/main.yml +++ b/roles/bluetooth/tasks/main.yml @@ -21,6 +21,15 @@ notify: - restart pulse as user +- name: Auto-switch between HSP/HSF and A2DP + lineinfile: + dest: /etc/pulse/default.pa + regex: "^load-module module-bluetooth-policy" + state: present + line: "load-module module-bluetooth-policy auto_switch=2" + notify: + - restart pulse as user + - name: Do not auto power on the bluetooth device command: gsettings set org.blueman.plugins.powermanager auto-power-on false become: yes