#!/system/bin/sh
echo "Initialize the PCM interface on the Marvell-8787 for Bluetooth SCO operation"
# wait for bluetoothd to get initialized and the chip will be be ready.
sleep 3 
hcitool -i hci0 cmd 0x3F 0x2A 0x00 0x01
hcitool -i hci0 cmd 0x3F 0x1D 0x01
hcitool -i hci0 cmd 0x3F 0x07 0x02

# Zydeco uses TI Multichannel Buffered Serial Port (McBSP) settings in OMAP and Marvell 8787. 
# Need to set Marvell 8787 PCM interface to short sync mode.
# Marvell short frame sync is the same as their PCM mode 1 in TI McBSP
# Original config cmd = hcitool -i hci0 cmd 0x3F 0x28 0x03 0x01 0x03
hcitool -i hci0 cmd 0x3F 0x28 0x03 0x00 0x03
hcitool -i hci0 cmd 0x3F 0x29 0x08 0x00
echo "BT PCM Init Done." 
