btfm: Don't program multi channel registers in wcn3990 for SCO
For SCO use cases, we should not program multi chanel
registers. Programming this leading to silence randomly
in SCO Rx/Tx.
CRs-Fixed: 2048423
Change-Id: I5e41591fb81b5bd3cf9358819c0a62a5cfe60e13
Signed-off-by: Satish Kodishala <skodisha@codeaurora.org>
diff --git a/drivers/bluetooth/btfm_slim_wcn3990.c b/drivers/bluetooth/btfm_slim_wcn3990.c
index a451ff3..77e2973 100644
--- a/drivers/bluetooth/btfm_slim_wcn3990.c
+++ b/drivers/bluetooth/btfm_slim_wcn3990.c
@@ -88,12 +88,12 @@
BTFMSLIM_DBG("port(%d) enable(%d)", port_num, enable);
if (rxport) {
- if (enable) {
- /* For SCO Rx, A2DP Rx */
+ if (enable && btfmslim->sample_rate == 48000) {
+ /* For A2DP Rx */
reg_val = 0x1;
port_bit = port_num - 0x10;
reg = CHRK_SB_PGD_RX_PORTn_MULTI_CHNL_0(port_bit);
- BTFMSLIM_DBG("writing reg_val (%d) to reg(%x)",
+ BTFMSLIM_DBG("writing reg_val (%d) to reg(%x) for A2DP",
reg_val, reg);
ret = btfm_slim_write(btfmslim, reg, 1, ®_val, IFD);
if (ret) {
@@ -120,18 +120,6 @@
BTFMSLIM_ERR("failed to write (%d) reg 0x%x", ret, reg);
goto error;
}
- } else if (port_num == CHRK_SB_PGD_PORT_TX_SCO) {
- /* SCO Tx */
- reg_val = 0x1 << CHRK_SB_PGD_PORT_TX_SCO;
- reg = CHRK_SB_PGD_TX_PORTn_MULTI_CHNL_0(port_num);
- BTFMSLIM_DBG("writing reg_val (%d) to reg(%x)",
- reg_val, reg);
- ret = btfm_slim_write(btfmslim, reg, 1, ®_val, IFD);
- if (ret) {
- BTFMSLIM_ERR("failed to write (%d) reg 0x%x",
- ret, reg);
- goto error;
- }
}
/* Enable Tx port hw auto recovery for underrun or overrun error */