-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use all codecs available in blue-alsa
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# When building blue-alsa with more codecs, | ||
# each codec must be specified to be used. | ||
--- a/etc/init.d/bluetooth 2021-06-28 04:23:39.000000000 +0200 | ||
+++ b/etc/init.d/bluetooth 2024-12-20 14:47:01.932052590 +0100 | ||
@@ -15,12 +15,21 @@ | ||
PROG3=/usr/bin/bluez_mibt_classical | ||
PROG5=/usr/bin/bluez_mibt_ble | ||
|
||
+function bluealsa_get_codecs() { | ||
+ CODECS="" | ||
+ for NAME in `bluealsa --help | grep -i -A5 "Available BT audio codecs:" | grep "a2dp-sink:" | awk '{$1=""; print $0}' | tr -d ','` ; do | ||
+ CODECS="${CODECS} -c ${NAME}" | ||
+ done | ||
+} | ||
+ | ||
function bluealsa_start() { | ||
+ bluealsa_get_codecs | ||
+ | ||
procd_open_instance | ||
if [ $DEBUG = "1" ]; then | ||
- procd_set_param command "$PROG1" -i hci0 -p a2dp-sink -S | ||
+ procd_set_param command "$PROG1" -i hci0 -p a2dp-sink -S ${CODECS} | ||
else | ||
- procd_set_param command "$PROG1" -i hci0 -p a2dp-sink | ||
+ procd_set_param command "$PROG1" -i hci0 -p a2dp-sink ${CODECS} | ||
fi | ||
procd_append_param respawn 3600 | ||
procd_append_param respawn 5 |