Skip to content

Instantly share code, notes, and snippets.

@jfollmann
Created February 27, 2019 11:20
Show Gist options
  • Save jfollmann/ce31a00dacd695482ca27c5feabd81ad to your computer and use it in GitHub Desktop.
Save jfollmann/ce31a00dacd695482ca27c5feabd81ad to your computer and use it in GitHub Desktop.
Auto-switching Bluetooth profiles to re-initialize PulseAudio
#https://askubuntu.com/questions/145935/get-rid-of-0-5s-latency-when-playing-audio-over-bluetooth-with-a2dp
#!/bin/bash
BLUEZCARD=`pactl list cards short | egrep -o bluez.*[[:space:]]`
#pactl set-card-profile $BLUEZCARD a2dp_sink
#pactl set-card-profile $BLUEZCARD headset_head_unit
pactl set-card-profile $BLUEZCARD a2dp_sink
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment