Created
April 26, 2017 14:55
-
-
Save MarkusH/2885e8b55ffec2e73585e30bb15f73b5 to your computer and use it in GitHub Desktop.
QC35 PulseAudio A2DP / HFP+HSP switcher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
MAC=XX_XX_XX_XX_XX_XX | |
NEW_SINK=bluez_sink.$MAC.a2dp_sink | |
pactl set-card-profile bluez_card.$MAC a2dp_sink | |
pactl set-default-sink $NEW_SINK | |
sink_inputs=$(pactl list | grep -P "Sink Input #\d+" | grep -Po "\d+") | |
for sink_input in $sink_inputs ; do | |
pactl move-sink-input $sink_input $NEW_SINK | |
done | |
kdialog --title "Bluetooth Headset QC35 change" --passivepopup "Microphone of Bluetooth headset QC35 disabled." 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
MAC=XX_XX_XX_XX_XX_XX | |
NEW_SINK=bluez_sink.$MAC.headset_head_unit | |
pactl set-card-profile bluez_card.$MAC headset_head_unit | |
pactl set-default-sink $NEW_SINK | |
sink_inputs=$(pactl list | grep -P "Sink Input #\d+" | grep -Po "\d+") | |
for sink_input in $sink_inputs ; do | |
pactl move-sink-input $sink_input $NEW_SINK | |
done | |
kdialog --title "Bluetooth Headset QC35 change" --passivepopup "Microphone of Bluetooth headset QC35 enabled." 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment