From db60477b9537fb2df3e8d02c36bc8a91141bb6cf Mon Sep 17 00:00:00 2001 From: orangepi-xunlong <258384131@qq.com> Date: Mon, 21 Mar 2022 11:55:20 +0800 Subject: [PATCH] Update sun50iw6.conf --- .../config/sources/families/sun50iw6.conf | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/external/config/sources/families/sun50iw6.conf b/external/config/sources/families/sun50iw6.conf index ca31a96..6a112b4 100644 --- a/external/config/sources/families/sun50iw6.conf +++ b/external/config/sources/families/sun50iw6.conf @@ -45,21 +45,30 @@ esac family_tweaks_s() { - if [[ -f $SDCARD/lib/systemd/system/ap6256-bluetooth.service ]]; then + if [[ -f $SDCARD/lib/systemd/system/ap6256-bluetooth.service ]]; then - # install and enable Bluetooth - chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools >/dev/null 2>&1" - chroot $SDCARD /bin/bash -c "systemctl --no-reload enable ap6256-bluetooth.service >/dev/null 2>&1" - [[ $BRANCH == legacy ]] && chroot $SDCARD /bin/bash -c "systemctl --no-reload enable ap6256-wifi.service >/dev/null 2>&1" - fi + # install and enable Bluetooth + chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools >/dev/null 2>&1" + chroot $SDCARD /bin/bash -c "systemctl --no-reload enable ap6256-bluetooth.service >/dev/null 2>&1" + [[ $BRANCH == legacy ]] && chroot $SDCARD /bin/bash -c "systemctl --no-reload enable ap6256-wifi.service >/dev/null 2>&1" + fi - if [[ -f $SDCARD/lib/systemd/system/ap6255-bluetooth.service ]]; then + if [[ -f $SDCARD/lib/systemd/system/ap6255-bluetooth.service ]]; then + + # install and enable Bluetooth + chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools >/dev/null 2>&1" + chroot $SDCARD /bin/bash -c "systemctl --no-reload enable ap6255-bluetooth.service >/dev/null 2>&1" + [[ $BRANCH == legacy ]] && chroot $SDCARD /bin/bash -c "systemctl --no-reload enable ap6255-wifi.service >/dev/null 2>&1" + fi + + if [[ $BUILD_DESKTOP == yes && $BOARD == orangepi3-lts ]]; then + + sed -i "s/auto-profiles = yes/auto-profiles = no/" ${SDCARD}/usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf + echo "load-module module-alsa-sink device=hw:0,0 sink_name=AudioCodec-Playback sink_properties=\"device.description='Audio Codec'\"" >> ${SDCARD}/etc/pulse/default.pa + echo "load-module module-alsa-sink device=hw:1,0 sink_name=HDMI-Playback sink_properties=\"device.description='HDMI Audio'\"" >> ${SDCARD}/etc/pulse/default.pa + + fi - # install and enable Bluetooth - chroot $SDCARD /bin/bash -c "apt-get -y -qq install rfkill bluetooth bluez bluez-tools >/dev/null 2>&1" - chroot $SDCARD /bin/bash -c "systemctl --no-reload enable ap6255-bluetooth.service >/dev/null 2>&1" - [[ $BRANCH == legacy ]] && chroot $SDCARD /bin/bash -c "systemctl --no-reload enable ap6255-wifi.service >/dev/null 2>&1" - fi } family_tweaks_bsp()