Add bluetooth to audio options
This commit is contained in:
parent
3a1fa0d3d6
commit
ce61514d33
3 changed files with 22 additions and 1 deletions
|
@ -143,6 +143,8 @@ EOF
|
|||
then
|
||||
cp ${PKG_DIR}/sources/asound/${DEVICE}/* ${INSTALL}/usr/config/
|
||||
fi
|
||||
|
||||
cp ${PKG_DIR}/sources/asound/asound.conf.bluealsa ${INSTALL}/usr/config/
|
||||
|
||||
sed -i "s#@DEVICENAME@#${DEVICE}#g" ${INSTALL}/usr/config/system/configs/system.cfg
|
||||
|
||||
|
|
11
packages/jelos/sources/asound/asound.conf.bluealsa
Normal file
11
packages/jelos/sources/asound/asound.conf.bluealsa
Normal file
|
@ -0,0 +1,11 @@
|
|||
pcm.!default {
|
||||
type asym
|
||||
capture.pcm cards.pcm.default
|
||||
playback.pcm bluealsa
|
||||
hint.description "Bluetooth Audio Device"
|
||||
}
|
||||
|
||||
ctl.!default {
|
||||
type bluealsa
|
||||
hint.description "Bluetooth Audio Device"
|
||||
}
|
|
@ -8,6 +8,7 @@ function list_audio_devices() {
|
|||
echo "DEFAULT (SYSTEM PROVIDED)"
|
||||
echo "DEFAULT HDMI"
|
||||
echo "CUSTOM (UNMANAGED)"
|
||||
echo "BLUETOOTH"
|
||||
for SDEVICE in $(find /proc/asound/card*/pcm*/info)
|
||||
do
|
||||
TYPE=$(awk '/^stream:/ {print $2}' ${SDEVICE})
|
||||
|
@ -28,7 +29,7 @@ function set_audio_device() {
|
|||
then
|
||||
if [ "$(get_setting system.rg353v)" = "1" ]
|
||||
then
|
||||
cp /usr/config/asound.conf.RG353V /storage/.config
|
||||
cp /usr/config/asound.conf.RG353V /storage/.config/asound.conf
|
||||
exit 0
|
||||
else
|
||||
if [ -e "/usr/config/asound.conf" ]
|
||||
|
@ -47,6 +48,13 @@ function set_audio_device() {
|
|||
elif [ "${SELECTION}" == "CUSTOM (UNMANAGED)" ]
|
||||
then
|
||||
exit 0
|
||||
elif [ "${SELECTION}" == "BLUETOOTH" ]
|
||||
then
|
||||
if [ -e "/usr/config/asound.conf.bluealsa" ]
|
||||
then
|
||||
cp /usr/config/asound.conf.bluealsa /storage/.config/asound.conf
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
for SDEVICE in $(find /proc/asound/card*/pcm*/info)
|
||||
do
|
||||
|
|
Loading…
Reference in a new issue