Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df53ac3f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Enable multi-channel bit for SCO Tx with water mark level 1"

parents 804dcb3b d7cdbcd8
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -120,6 +120,18 @@ int btfm_slim_chrk_enable_port(struct btfmslim *btfmslim, uint8_t port_num,
			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, &reg_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 */
@@ -141,12 +153,19 @@ enable_disable_rxport:
		if (is_fm_port(port_num))
			reg_val = CHRK_SB_PGD_PORT_ENABLE |
					CHRK_SB_PGD_PORT_WM_L3;
		else if (port_num == CHRK_SB_PGD_PORT_TX_SCO)
			reg_val = CHRK_SB_PGD_PORT_ENABLE |
					CHRK_SB_PGD_PORT_WM_L1;
		else
			reg_val = CHRK_SB_PGD_PORT_ENABLE |
					CHRK_SB_PGD_PORT_WM_LB;
	} else
		reg_val = CHRK_SB_PGD_PORT_DISABLE;

	if (enable && port_num == CHRK_SB_PGD_PORT_TX_SCO)
		BTFMSLIM_INFO("programming SCO Tx with reg_val %d to reg 0x%x",
				reg_val, reg);

	ret = btfm_slim_write(btfmslim, reg, 1, &reg_val, IFD);
	if (ret)
		BTFMSLIM_ERR("failed to write (%d) reg 0x%x", ret, reg);