btfm: set watermark level to 3 for wcn3990 slimbus FM slave ports
Without this, we hear silence or delay in sound during FM playback in following use cases - 1. Switching between FM and media applications like YouTube 2. Changing volume during FM FTM Change-Id: I51072ab70e6bc34e1ed10222ee289d987ed9ffbf Signed-off-by: Rupesh Tatiya <rtatiya@codeaurora.org>
This commit is contained in:
parent
048c70075f
commit
6737311d22
1 changed files with 17 additions and 7 deletions
|
@ -69,6 +69,14 @@ error:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int is_fm_port(uint8_t port_num)
|
||||||
|
{
|
||||||
|
if (port_num == CHRK_SB_PGD_PORT_TX1_FM ||
|
||||||
|
port_num == CHRK_SB_PGD_PORT_TX2_FM)
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int btfm_slim_chrk_enable_port(struct btfmslim *btfmslim, uint8_t port_num,
|
int btfm_slim_chrk_enable_port(struct btfmslim *btfmslim, uint8_t port_num,
|
||||||
uint8_t rxport, uint8_t enable)
|
uint8_t rxport, uint8_t enable)
|
||||||
|
@ -88,9 +96,7 @@ int btfm_slim_chrk_enable_port(struct btfmslim *btfmslim, uint8_t port_num,
|
||||||
goto enable_disable_txport;
|
goto enable_disable_txport;
|
||||||
|
|
||||||
/* Multiple Channel Setting - only for FM Tx */
|
/* Multiple Channel Setting - only for FM Tx */
|
||||||
if (port_num == CHRK_SB_PGD_PORT_TX1_FM ||
|
if (is_fm_port(port_num)) {
|
||||||
port_num == CHRK_SB_PGD_PORT_TX2_FM) {
|
|
||||||
|
|
||||||
reg_val = (0x1 << CHRK_SB_PGD_PORT_TX1_FM) |
|
reg_val = (0x1 << CHRK_SB_PGD_PORT_TX1_FM) |
|
||||||
(0x1 << CHRK_SB_PGD_PORT_TX2_FM);
|
(0x1 << CHRK_SB_PGD_PORT_TX2_FM);
|
||||||
reg = CHRK_SB_PGD_TX_PORTn_MULTI_CHNL_0(port_num);
|
reg = CHRK_SB_PGD_TX_PORTn_MULTI_CHNL_0(port_num);
|
||||||
|
@ -116,10 +122,14 @@ enable_disable_txport:
|
||||||
reg = CHRK_SB_PGD_PORT_TX_CFGN(port_num);
|
reg = CHRK_SB_PGD_PORT_TX_CFGN(port_num);
|
||||||
|
|
||||||
enable_disable_rxport:
|
enable_disable_rxport:
|
||||||
if (enable)
|
if (enable) {
|
||||||
/* Set water mark to 1 and enable the port */
|
if (is_fm_port(port_num))
|
||||||
reg_val = CHRK_SB_PGD_PORT_ENABLE | CHRK_SB_PGD_PORT_WM_LB;
|
reg_val = CHRK_SB_PGD_PORT_ENABLE |
|
||||||
|
CHRK_SB_PGD_PORT_WM_L3;
|
||||||
else
|
else
|
||||||
|
reg_val = CHRK_SB_PGD_PORT_ENABLE |
|
||||||
|
CHRK_SB_PGD_PORT_WM_LB;
|
||||||
|
} else
|
||||||
reg_val = CHRK_SB_PGD_PORT_DISABLE;
|
reg_val = CHRK_SB_PGD_PORT_DISABLE;
|
||||||
|
|
||||||
ret = btfm_slim_write(btfmslim, reg, 1, ®_val, IFD);
|
ret = btfm_slim_write(btfmslim, reg, 1, ®_val, IFD);
|
||||||
|
|
Loading…
Add table
Reference in a new issue