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

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

Merge "soundwire: don't disable clock during suspend"

parents 61a4f416 116d26d1
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -1454,11 +1454,6 @@ static int swrm_suspend(struct device *dev)
			pm_runtime_disable(dev);
			pm_runtime_set_suspended(dev);
			pm_runtime_enable(dev);
		} else {
			if (swrm->clk && swrm->handle) {
				swrm->clk(swrm->handle, false);
				swrm->state = SWR_MSTR_DOWN;
			}
		}
	}
	if (ret == -EBUSY) {
@@ -1483,11 +1478,6 @@ static int swrm_resume(struct device *dev)

	dev_dbg(dev, "%s: system resume, state: %d\n", __func__, swrm->state);
	if (!pm_runtime_enabled(dev) || !pm_runtime_suspend(dev)) {
		if (swrm->clk && swrm->handle &&
		    swrm->state == SWR_MSTR_DOWN) {
			swrm->clk(swrm->handle, true);
			swrm->state = SWR_MSTR_UP;
		}
		ret = swrm_runtime_resume(dev);
		if (!ret) {
			pm_runtime_mark_last_busy(dev);
+22 −4
Original line number Diff line number Diff line
@@ -310,6 +310,7 @@ int msm895x_wsa881x_init(struct snd_soc_component *component)
	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
	struct snd_soc_card *card = codec->component.card;
	struct msm8952_asoc_mach_data *pdata = snd_soc_card_get_drvdata(card);
	struct snd_soc_dapm_context *dapm = &codec->dapm;
	struct msm895x_auxcodec_prefix_map codec_prefix_map[MAX_AUX_CODECS] = {
	{ "wsa881x.20170211", "SpkrRight" },
	{ "wsa881x.20170212", "SpkrLeft" },
@@ -347,6 +348,14 @@ int msm895x_wsa881x_init(struct snd_soc_component *component)
	if (pdata && pdata->codec_root)
		wsa881x_codec_info_create_codec_entry(pdata->codec_root,
						      codec);
	if (!strcmp(codec_prefix_map[i].codec_prefix, "SpkrLeft")) {
		snd_soc_dapm_ignore_suspend(dapm, "SpkrLeft IN");
		snd_soc_dapm_ignore_suspend(dapm, "SpkrLeft SPKR");
	} else if (!strcmp(codec_prefix_map[i].codec_prefix, "SpkrRight")) {
		snd_soc_dapm_ignore_suspend(dapm, "SpkrRight IN");
		snd_soc_dapm_ignore_suspend(dapm, "SpkrRight SPKR");
	}

	return 0;
}

@@ -1876,11 +1885,14 @@ int msm_audrx_init(struct snd_soc_pcm_runtime *rtd)
	snd_soc_dapm_ignore_suspend(dapm, "Digital Mic3");
	snd_soc_dapm_ignore_suspend(dapm, "Digital Mic4");
	snd_soc_dapm_ignore_suspend(dapm, "Digital Mic5");
	snd_soc_dapm_ignore_suspend(dapm, "Analog Mic4");
	snd_soc_dapm_ignore_suspend(dapm, "Analog Mic6");
	snd_soc_dapm_ignore_suspend(dapm, "Analog Mic7");
	snd_soc_dapm_ignore_suspend(dapm, "Analog Mic8");
	snd_soc_dapm_ignore_suspend(dapm, "MADINPUT");
	snd_soc_dapm_ignore_suspend(dapm, "MAD_CPE_INPUT");

	snd_soc_dapm_ignore_suspend(dapm, "EAR");
	snd_soc_dapm_ignore_suspend(dapm, "HEADPHONE");
	snd_soc_dapm_ignore_suspend(dapm, "LINEOUT1");
	snd_soc_dapm_ignore_suspend(dapm, "LINEOUT2");
	snd_soc_dapm_ignore_suspend(dapm, "LINEOUT3");
@@ -1896,26 +1908,32 @@ int msm_audrx_init(struct snd_soc_pcm_runtime *rtd)
	snd_soc_dapm_ignore_suspend(dapm, "DMIC3");
	snd_soc_dapm_ignore_suspend(dapm, "DMIC4");
	snd_soc_dapm_ignore_suspend(dapm, "DMIC5");
	snd_soc_dapm_ignore_suspend(dapm, "DMIC6");
	snd_soc_dapm_ignore_suspend(dapm, "Digital Mic6");
	snd_soc_dapm_ignore_suspend(dapm, "ANC EAR");
	snd_soc_dapm_ignore_suspend(dapm, "ANC HEADPHONE");
	if (!strcmp(dev_name(codec_dai->dev), "tomtom_codec")) {
		snd_soc_dapm_ignore_suspend(dapm, "DMIC6");
		snd_soc_dapm_ignore_suspend(dapm, "Digital Mic6");
		snd_soc_dapm_ignore_suspend(dapm, "SPK_OUT");
		snd_soc_dapm_ignore_suspend(dapm, "HEADPHONE");
	} else if (!strcmp(dev_name(codec_dai->dev), "tasha_codec")) {
		snd_soc_dapm_ignore_suspend(dapm, "Digital Mic0");
		snd_soc_dapm_ignore_suspend(dapm, "DMIC0");
		snd_soc_dapm_ignore_suspend(dapm, "SPK1 OUT");
		snd_soc_dapm_ignore_suspend(dapm, "SPK2 OUT");
		snd_soc_dapm_ignore_suspend(dapm, "HPHL");
		snd_soc_dapm_ignore_suspend(dapm, "HPHR");
		snd_soc_dapm_ignore_suspend(dapm, "ANC HPHL");
		snd_soc_dapm_ignore_suspend(dapm, "ANC HPHR");
		snd_soc_dapm_ignore_suspend(dapm, "ANC LINEOUT1");
		snd_soc_dapm_ignore_suspend(dapm, "ANC LINEOUT2");
	}


	snd_soc_dapm_sync(dapm);

	snd_soc_dai_set_channel_map(codec_dai, ARRAY_SIZE(tx_ch),
				    tx_ch, ARRAY_SIZE(rx_ch), rx_ch);


	err = msm_afe_set_config(codec);
	if (err) {
		pr_err("%s: Failed to set AFE config %d\n", __func__, err);