Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions skeleton/SYSTEM/tg5040/etc/bluetooth/bt_init.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ start_hci_attach() {
start_bt() {
rfkill.elf unblock bluetooth

# Fix for bluetooth stuttering by disabling wifi power management
ip link set wlan0 up 2>/dev/null
iw dev wlan0 set power_save off 2>/dev/null

if [ -d "/sys/class/bluetooth/hci0" ];then
echo "Bluetooth init has been completed!!"
else
Expand All @@ -54,7 +58,7 @@ start_bt() {
a=`ps | grep bluealsa | grep -v grep`
[ -z "$a" ] && {
# bluealsa -p a2dp-source --keep-alive=-1 &
bluealsa -p a2dp-source &
bluealsa -p a2dp-source --a2dp-volume &
sleep 1
# Power on adapter
bluetoothctl power on 2>/dev/null
Expand All @@ -76,6 +80,10 @@ start_bt() {
ble_start() {
rfkill.elf unblock bluetooth

# Fix for bluetooth stuttering by disabling wifi power management
ip link set wlan0 up 2>/dev/null
iw dev wlan0 set power_save off 2>/dev/null

if [ -d "/sys/class/bluetooth/hci0" ];then
echo "Bluetooth init has been completed!!"
else
Expand Down Expand Up @@ -149,4 +157,4 @@ case "$1" in
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
esac