switch module for technics bt headphone
This commit is contained in:
14
bt-a2dp-hfp-switch
Executable file
14
bt-a2dp-hfp-switch
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
a2dp=`pactl list | grep Active | grep a2dp_sink`
|
||||
card=`pactl list | grep "Name: bluez_card." | cut -d ' ' -f 2`
|
||||
|
||||
if [ -n "$a2dp" ]; then
|
||||
echo "Switching $card to handsfree..."
|
||||
pactl set-card-profile $card handsfree_head_unit
|
||||
echo "...done"
|
||||
else
|
||||
echo "Switching $card to a2dp..."
|
||||
pactl set-card-profile $card a2dp_sink
|
||||
echo "...done"
|
||||
fi
|
||||
Reference in New Issue
Block a user