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

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

Merge "ASoC: wcd934x: Avoid soundwire enable when codec is in power collapse"

parents 0deaed53 2498e397
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -2974,6 +2974,11 @@ static int __tavil_codec_enable_swr(struct snd_soc_dapm_widget *w, int event)
			tavil->swr.rx_8_count++;
			tavil->swr.rx_8_count++;
		ch_cnt = !!(tavil->swr.rx_7_count) + tavil->swr.rx_8_count;
		ch_cnt = !!(tavil->swr.rx_7_count) + tavil->swr.rx_8_count;


		if (wcd9xxx_get_current_power_state(tavil->wcd9xxx,
						WCD9XXX_DIG_CORE_REGION_1)
					!= WCD_REGION_POWER_COLLAPSE_REMOVE)
			goto done;

		swrm_wcd_notify(tavil->swr.ctrl_data[0].swr_pdev,
		swrm_wcd_notify(tavil->swr.ctrl_data[0].swr_pdev,
				SWR_DEVICE_UP, NULL);
				SWR_DEVICE_UP, NULL);
		swrm_wcd_notify(tavil->swr.ctrl_data[0].swr_pdev,
		swrm_wcd_notify(tavil->swr.ctrl_data[0].swr_pdev,
@@ -2994,6 +2999,7 @@ static int __tavil_codec_enable_swr(struct snd_soc_dapm_widget *w, int event)


		break;
		break;
	}
	}
done:
	dev_dbg(tavil->dev, "%s: %s: current swr ch cnt: %d\n",
	dev_dbg(tavil->dev, "%s: %s: current swr ch cnt: %d\n",
		__func__, w->name, ch_cnt);
		__func__, w->name, ch_cnt);