Loading sound/soc/codecs/wcd9xxx-common.c +24 −7 Original line number Diff line number Diff line Loading @@ -1007,10 +1007,12 @@ static void wcd9xxx_clsh_state_hph_lo(struct snd_soc_codec *codec, (req_state == WCD9XXX_CLSH_STATE_LO)) { wcd9xxx_dynamic_bypass_buck_ctrl_lo(codec, false); wcd9xxx_enable_buck(codec, clsh_d, true); wcd9xxx_ncp_bypass_enable(codec, true); if (req_state & WCD9XXX_CLSH_STATE_HPH_ST) { wcd9xxx_set_fclk_get_ncp(codec, clsh_d, NCP_FCLK_LEVEL_8); if (req_state & WCD9XXX_CLSH_STATE_HPH_ST) { wcd9xxx_ncp_bypass_enable(codec, true); wcd9xxx_set_fclk_put_ncp(codec, clsh_d, NCP_FCLK_LEVEL_5); wcd9xxx_enable_clsh_block(codec, clsh_d, true); wcd9xxx_chargepump_request(codec, true); wcd9xxx_enable_anc_delay(codec, true); Loading Loading @@ -1045,9 +1047,15 @@ static void wcd9xxx_clsh_state_hph_lo(struct snd_soc_codec *codec, } if ((req_state == WCD9XXX_CLSH_STATE_LO) || ((clsh_d->state & (~req_state)) == WCD9XXX_CLSH_STATE_LO)) { wcd9xxx_ncp_bypass_enable(codec, false); if ((clsh_d->state & (~req_state)) == WCD9XXX_CLSH_STATE_LO) { wcd9xxx_set_fclk_get_ncp(codec, clsh_d, NCP_FCLK_LEVEL_5); wcd9xxx_set_fclk_put_ncp(codec, clsh_d, NCP_FCLK_LEVEL_8); wcd9xxx_ncp_bypass_enable(codec, false); } if (req_state & WCD9XXX_CLSH_STATE_HPH_ST) { usleep_range(BUCK_SETTLE_TIME_US, Loading Loading @@ -1087,10 +1095,12 @@ static void wcd9xxx_clsh_state_ear_lo(struct snd_soc_codec *codec, if (is_enable) { wcd9xxx_dynamic_bypass_buck_ctrl(codec, false); wcd9xxx_enable_buck(codec, clsh_d, true); wcd9xxx_ncp_bypass_enable(codec, true); if (req_state & WCD9XXX_CLSH_STATE_EAR) { wcd9xxx_set_fclk_get_ncp(codec, clsh_d, NCP_FCLK_LEVEL_8); wcd9xxx_ncp_bypass_enable(codec, true); wcd9xxx_set_fclk_put_ncp(codec, clsh_d, NCP_FCLK_LEVEL_5); wcd9xxx_enable_clsh_block(codec, clsh_d, true); wcd9xxx_chargepump_request(codec, true); wcd9xxx_enable_anc_delay(codec, true); Loading @@ -1098,8 +1108,15 @@ static void wcd9xxx_clsh_state_ear_lo(struct snd_soc_codec *codec, CLSH_COMPUTE_EAR, true); } } else { wcd9xxx_set_fclk_put_ncp(codec, clsh_d, NCP_FCLK_LEVEL_8); wcd9xxx_ncp_bypass_enable(codec, false); if ((clsh_d->state & (~req_state)) == WCD9XXX_CLSH_STATE_LO) { wcd9xxx_set_fclk_get_ncp(codec, clsh_d, NCP_FCLK_LEVEL_5); wcd9xxx_set_fclk_put_ncp(codec, clsh_d, NCP_FCLK_LEVEL_8); } if (req_state & WCD9XXX_CLSH_STATE_LO) { snd_soc_update_bits(codec, WCD9XXX_A_NCP_STATIC, 0x20, 0x00); Loading Loading
sound/soc/codecs/wcd9xxx-common.c +24 −7 Original line number Diff line number Diff line Loading @@ -1007,10 +1007,12 @@ static void wcd9xxx_clsh_state_hph_lo(struct snd_soc_codec *codec, (req_state == WCD9XXX_CLSH_STATE_LO)) { wcd9xxx_dynamic_bypass_buck_ctrl_lo(codec, false); wcd9xxx_enable_buck(codec, clsh_d, true); wcd9xxx_ncp_bypass_enable(codec, true); if (req_state & WCD9XXX_CLSH_STATE_HPH_ST) { wcd9xxx_set_fclk_get_ncp(codec, clsh_d, NCP_FCLK_LEVEL_8); if (req_state & WCD9XXX_CLSH_STATE_HPH_ST) { wcd9xxx_ncp_bypass_enable(codec, true); wcd9xxx_set_fclk_put_ncp(codec, clsh_d, NCP_FCLK_LEVEL_5); wcd9xxx_enable_clsh_block(codec, clsh_d, true); wcd9xxx_chargepump_request(codec, true); wcd9xxx_enable_anc_delay(codec, true); Loading Loading @@ -1045,9 +1047,15 @@ static void wcd9xxx_clsh_state_hph_lo(struct snd_soc_codec *codec, } if ((req_state == WCD9XXX_CLSH_STATE_LO) || ((clsh_d->state & (~req_state)) == WCD9XXX_CLSH_STATE_LO)) { wcd9xxx_ncp_bypass_enable(codec, false); if ((clsh_d->state & (~req_state)) == WCD9XXX_CLSH_STATE_LO) { wcd9xxx_set_fclk_get_ncp(codec, clsh_d, NCP_FCLK_LEVEL_5); wcd9xxx_set_fclk_put_ncp(codec, clsh_d, NCP_FCLK_LEVEL_8); wcd9xxx_ncp_bypass_enable(codec, false); } if (req_state & WCD9XXX_CLSH_STATE_HPH_ST) { usleep_range(BUCK_SETTLE_TIME_US, Loading Loading @@ -1087,10 +1095,12 @@ static void wcd9xxx_clsh_state_ear_lo(struct snd_soc_codec *codec, if (is_enable) { wcd9xxx_dynamic_bypass_buck_ctrl(codec, false); wcd9xxx_enable_buck(codec, clsh_d, true); wcd9xxx_ncp_bypass_enable(codec, true); if (req_state & WCD9XXX_CLSH_STATE_EAR) { wcd9xxx_set_fclk_get_ncp(codec, clsh_d, NCP_FCLK_LEVEL_8); wcd9xxx_ncp_bypass_enable(codec, true); wcd9xxx_set_fclk_put_ncp(codec, clsh_d, NCP_FCLK_LEVEL_5); wcd9xxx_enable_clsh_block(codec, clsh_d, true); wcd9xxx_chargepump_request(codec, true); wcd9xxx_enable_anc_delay(codec, true); Loading @@ -1098,8 +1108,15 @@ static void wcd9xxx_clsh_state_ear_lo(struct snd_soc_codec *codec, CLSH_COMPUTE_EAR, true); } } else { wcd9xxx_set_fclk_put_ncp(codec, clsh_d, NCP_FCLK_LEVEL_8); wcd9xxx_ncp_bypass_enable(codec, false); if ((clsh_d->state & (~req_state)) == WCD9XXX_CLSH_STATE_LO) { wcd9xxx_set_fclk_get_ncp(codec, clsh_d, NCP_FCLK_LEVEL_5); wcd9xxx_set_fclk_put_ncp(codec, clsh_d, NCP_FCLK_LEVEL_8); } if (req_state & WCD9XXX_CLSH_STATE_LO) { snd_soc_update_bits(codec, WCD9XXX_A_NCP_STATIC, 0x20, 0x00); Loading