Update for opi3b compatibility

v1.1.1: uwe5622
v2.1: ap6256
This commit is contained in:
baiywt
2024-04-18 17:03:19 +08:00
parent d91089989f
commit 947e6bc1e5
4 changed files with 10 additions and 12 deletions

View File

@@ -350,13 +350,17 @@ prepare_board() {
amixer -c 0 cset name='Playback Path' HP > /dev/null 2>&1
amixer -c 0 cset name='Capture MIC Path' 'Main Mic' > /dev/null 2>&1
if [[ $BOARD == orangepi3b ]]; then
rfkill unblock all
/usr/bin/hciattach_opi -n -s 1500000 /dev/ttyBT0 sprd &
elif [[ $BOARD == orangepicm4 ]]; then
bt_status=$(cat /proc/device-tree/wireless-bluetooth/status)
wifi_chip=$(cat /proc/device-tree/wireless-wlan/wifi_chip_type)
if [[ "${wifi_chip}" == "ap6256" && "${bt_status}" == "okay" ]]; then
rfkill unblock all
brcm_patchram_plus --bd_addr_rand --enable_hci --no2bytes --use_baudrate_for_download --tosleep 200000 \
--baudrate 1500000 --patchram /lib/firmware/BCM4345C0.hcd /dev/ttyS1 &
else
rfkill unblock all
/usr/bin/hciattach_opi -n -s 1500000 /dev/ttyBT0 sprd &
fi
;;
orangepi3plus)

View File

@@ -0,0 +1 @@
ACTION=="add", SUBSYSTEM=="sdio", SUBSYSTEMS=="sdio", ENV{SDIO_ID}=="0000:0000", RUN+="/sbin/modprobe -a sprdwl_ng sprdbt_tty"