Merge branch 'btaudio-main' into btaudio

This commit is contained in:
Wansti 2022-11-16 22:53:49 +00:00
commit 7b28b25c76
2 changed files with 13 additions and 8 deletions

View file

@ -5,7 +5,8 @@ pcm.!default {
hint.description "Bluetooth Audio Device"
}
# Leave mixer at default card for now
ctl.!default {
type bluealsa
hint.description "Bluetooth Audio Device"
type hw
card 0
}

View file

@ -27,12 +27,16 @@ function list_audio_devices() {
echo "DEFAULT HDMI"
echo "CUSTOM (UNMANAGED)"
echo "--------"
BTDEVICES=$(bluetoothctl paired-devices)
while read -r BTDEV
do
echo "${BTDEV}"
done <<< "${BTDEVICES}"
echo "--------"
BTACTIVE=$(systemctl is-active bluetooth)
if [ "${BTACTIVE}" == "active" ]
then
BTDEVICES=$(bluetoothctl paired-devices)
while read -r BTDEV
do
echo "${BTDEV}"
done <<< "${BTDEVICES}"
echo "--------"
fi
for SDEVICE in $(find /proc/asound/card*/pcm*/info)
do
TYPE=$(awk '/^stream:/ {print $2}' ${SDEVICE})