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

Commit 6c4de733 authored by Laxminath Kasam's avatar Laxminath Kasam
Browse files

asoc: sdm660_cdc: Add L10 and L1 to on-demand supply list



As L7B regulator used as micbias regulator for audio,
SDM710 PMIC regulator require L10 and L1 also to be enabled
along with L7B. Add L10 and L1 to on-demand supply list
of audio regulators.

CRs-Fixed: 2287834
Change-Id: I8beab1bba8a054e3366a06b7a12299d83c90fe0f
Signed-off-by: default avatarLaxminath Kasam <lkasam@codeaurora.org>
parent fc4d749d
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
@@ -87,6 +87,9 @@ static bool spkr_boost_en = true;

static char on_demand_supply_name[][MAX_ON_DEMAND_SUPPLY_NAME_LENGTH] = {
	"cdc-vdd-mic-bias",
	"",
	"cdc-vdda18-l10",
	"cdc-vdd-l1",
};

static struct wcd_mbhc_register
@@ -3448,6 +3451,16 @@ static const struct snd_soc_dapm_widget msm_anlg_cdc_dapm_widgets[] = {
		msm_anlg_cdc_codec_enable_on_demand_supply,
		SND_SOC_DAPM_PRE_PMU |
		SND_SOC_DAPM_POST_PMD),
	SND_SOC_DAPM_SUPPLY("VDDA18_L10_REGULATOR", SND_SOC_NOPM,
		ON_DEMAND_VDDA18_L10, 0,
		msm_anlg_cdc_codec_enable_on_demand_supply,
		SND_SOC_DAPM_PRE_PMU |
		SND_SOC_DAPM_POST_PMD),
	SND_SOC_DAPM_SUPPLY("VDD_L1_REGULATOR", SND_SOC_NOPM,
		ON_DEMAND_VDD_L1, 0,
		msm_anlg_cdc_codec_enable_on_demand_supply,
		SND_SOC_DAPM_PRE_PMU |
		SND_SOC_DAPM_POST_PMD),

	SND_SOC_DAPM_MICBIAS_E("MIC BIAS Internal1",
		MSM89XX_PMIC_ANALOG_MICB_1_EN, 7, 0,
@@ -4137,6 +4150,20 @@ static int msm_anlg_cdc_soc_probe(struct snd_soc_codec *codec)
	atomic_set(&sdm660_cdc->on_demand_list[ON_DEMAND_MICBIAS].ref,
		   0);

	msm_anlg_cdc_update_micbias_regulator(
				sdm660_cdc,
				on_demand_supply_name[ON_DEMAND_VDD_L1],
				&sdm660_cdc->on_demand_list[ON_DEMAND_VDD_L1]);
	atomic_set(&sdm660_cdc->on_demand_list[ON_DEMAND_VDD_L1].ref,
		   0);

	msm_anlg_cdc_update_micbias_regulator(
			sdm660_cdc,
			on_demand_supply_name[ON_DEMAND_VDDA18_L10],
			&sdm660_cdc->on_demand_list[ON_DEMAND_VDDA18_L10]);
	atomic_set(&sdm660_cdc->on_demand_list[ON_DEMAND_VDDA18_L10].ref,
		   0);

	sdm660_cdc->fw_data = devm_kzalloc(codec->dev,
					sizeof(*(sdm660_cdc->fw_data)),
					GFP_KERNEL);
@@ -4183,6 +4210,13 @@ static int msm_anlg_cdc_soc_remove(struct snd_soc_codec *codec)
	sdm660_cdc_priv->on_demand_list[ON_DEMAND_MICBIAS].supply = NULL;
	atomic_set(&sdm660_cdc_priv->on_demand_list[ON_DEMAND_MICBIAS].ref,
		   0);
	sdm660_cdc_priv->on_demand_list[ON_DEMAND_VDD_L1].supply = NULL;
	atomic_set(&sdm660_cdc_priv->on_demand_list[ON_DEMAND_VDD_L1].ref,
		   0);
	sdm660_cdc_priv->on_demand_list[ON_DEMAND_VDDA18_L10].supply = NULL;
	atomic_set(&sdm660_cdc_priv->on_demand_list[ON_DEMAND_VDDA18_L10].ref,
		   0);

	wcd_mbhc_deinit(&sdm660_cdc_priv->mbhc);

	return 0;
+2 −0
Original line number Diff line number Diff line
@@ -121,6 +121,8 @@ enum {
enum {
	ON_DEMAND_MICBIAS = 0,
	ON_DEMAND_SPKDRV,
	ON_DEMAND_VDDA18_L10,
	ON_DEMAND_VDD_L1,
	ON_DEMAND_SUPPLIES_MAX,
};