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

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

Merge "ASoC: wcd9xxx: Set chopper settings for UHQA mode"

parents 0cb863e2 05546ecb
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3473,6 +3473,7 @@ static int taiko_hphl_dac_event(struct snd_soc_dapm_widget *w,
						 WCD9XXX_CLSH_EVENT_PRE_DAC);
		} else {
			wcd9xxx_enable_high_perf_mode(codec, &taiko_p->clsh_d,
						WCD9XXX_NON_UHQA_MODE,
						WCD9XXX_CLSAB_STATE_HPHL,
						WCD9XXX_CLSAB_REQ_ENABLE);
		}
@@ -3514,6 +3515,7 @@ static int taiko_hphr_dac_event(struct snd_soc_dapm_widget *w,
						 WCD9XXX_CLSH_EVENT_PRE_DAC);
		} else {
			wcd9xxx_enable_high_perf_mode(codec, &taiko_p->clsh_d,
						WCD9XXX_NON_UHQA_MODE,
						WCD9XXX_CLSAB_STATE_HPHR,
						WCD9XXX_CLSAB_REQ_ENABLE);
		}
@@ -3692,6 +3694,7 @@ static int taiko_hph_pa_event(struct snd_soc_dapm_widget *w,
						 WCD9XXX_CLSH_EVENT_POST_PA);
		} else {
			wcd9xxx_enable_high_perf_mode(codec, &taiko->clsh_d,
						WCD9XXX_NON_UHQA_MODE,
						req_clsab_state,
						WCD9XXX_CLSAB_REQ_DISABLE);
		}
+4 −0
Original line number Diff line number Diff line
@@ -4051,6 +4051,7 @@ static int tomtom_hphl_dac_event(struct snd_soc_dapm_widget *w,
						 WCD9XXX_CLSH_EVENT_PRE_DAC);
		} else {
			wcd9xxx_enable_high_perf_mode(codec, &tomtom_p->clsh_d,
						tomtom_p->uhqa_mode,
						WCD9XXX_CLSAB_STATE_HPHL,
						WCD9XXX_CLSAB_REQ_ENABLE);
		}
@@ -4078,6 +4079,7 @@ static int tomtom_hphl_dac_event(struct snd_soc_dapm_widget *w,
						 WCD9XXX_CLSH_EVENT_POST_PA);
		} else {
			wcd9xxx_enable_high_perf_mode(codec, &tomtom_p->clsh_d,
						tomtom_p->uhqa_mode,
						WCD9XXX_CLSAB_STATE_HPHL,
						WCD9XXX_CLSAB_REQ_DISABLE);
		}
@@ -4109,6 +4111,7 @@ static int tomtom_hphr_dac_event(struct snd_soc_dapm_widget *w,
						 WCD9XXX_CLSH_EVENT_PRE_DAC);
		} else {
			wcd9xxx_enable_high_perf_mode(codec, &tomtom_p->clsh_d,
						tomtom_p->uhqa_mode,
						WCD9XXX_CLSAB_STATE_HPHR,
						WCD9XXX_CLSAB_REQ_ENABLE);
		}
@@ -4130,6 +4133,7 @@ static int tomtom_hphr_dac_event(struct snd_soc_dapm_widget *w,
						 WCD9XXX_CLSH_EVENT_POST_PA);
		} else {
			wcd9xxx_enable_high_perf_mode(codec, &tomtom_p->clsh_d,
						tomtom_p->uhqa_mode,
						WCD9XXX_CLSAB_STATE_HPHR,
						WCD9XXX_CLSAB_REQ_DISABLE);
		}
+4 −3
Original line number Diff line number Diff line
@@ -546,7 +546,7 @@ static void wcd9xxx_chargepump_request(struct snd_soc_codec *codec, bool on)

void wcd9xxx_enable_high_perf_mode(struct snd_soc_codec *codec,
				struct wcd9xxx_clsh_cdc_data *clsh_d,
				u8 req_state, bool req_type)
				u8 uhqa_mode, u8 req_state, bool req_type)
{
	dev_dbg(codec->dev, "%s: users fclk8 %d, fclk5 %d", __func__,
			clsh_d->ncp_users[NCP_FCLK_LEVEL_8],
@@ -558,6 +558,7 @@ void wcd9xxx_enable_high_perf_mode(struct snd_soc_codec *codec,
					WCD9XXX_A_RX_HPH_BIAS_PA__POR);
		snd_soc_write(codec, WCD9XXX_A_RX_HPH_L_PA_CTL, 0x48);
		snd_soc_write(codec, WCD9XXX_A_RX_HPH_R_PA_CTL, 0x48);
		if (uhqa_mode)
			snd_soc_update_bits(codec, WCD9XXX_A_RX_HPH_CHOP_CTL,
						0x20, 0x00);
		wcd9xxx_chargepump_request(codec, true);
+3 −1
Original line number Diff line number Diff line
@@ -44,6 +44,8 @@
#define WCD9XXX_CLSAB_REQ_ENABLE  true
#define WCD9XXX_CLSAB_REQ_DISABLE false

#define WCD9XXX_NON_UHQA_MODE	0

#define WCD9XXX_DMIC_SAMPLE_RATE_DIV_2    0x0
#define WCD9XXX_DMIC_SAMPLE_RATE_DIV_3    0x1
#define WCD9XXX_DMIC_SAMPLE_RATE_DIV_4    0x2
@@ -183,7 +185,7 @@ extern void wcd9xxx_clsh_fsm(struct snd_soc_codec *codec,

extern void wcd9xxx_enable_high_perf_mode(struct snd_soc_codec *codec,
				struct wcd9xxx_clsh_cdc_data *clsh_d,
				u8 req_state, bool req_type);
				u8 uhqa_mode, u8 req_state, bool req_type);

extern void wcd9xxx_clsh_init(struct wcd9xxx_clsh_cdc_data *clsh,
			      struct wcd9xxx_resmgr *resmgr);