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

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

Merge "ASoC: msm: apq8009: enable codec mclk before enabling sclk"

parents 84c98349 f03b164d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -690,6 +690,7 @@ static int ext_mi2s_clk_ctl(struct snd_pcm_substream *substream, bool enable)
	int ret = 0;
	int port_id = 0;
	struct snd_soc_pcm_runtime *rtd = substream->private_data;
	struct snd_soc_codec *codec = rtd->codec;

	port_id = apq8009_get_port_id(rtd->dai_link->be_id);
	if (port_id < 0) {
@@ -698,6 +699,7 @@ static int ext_mi2s_clk_ctl(struct snd_pcm_substream *substream, bool enable)
	}

	if (enable) {
		apq8009_enable_extcodec_ext_clk(codec, 1, true);
		if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
			mi2s_rx_clk.enable = enable;
			mi2s_rx_clk.clk_id = apq8009_get_clk_id(port_id);
@@ -717,6 +719,7 @@ static int ext_mi2s_clk_ctl(struct snd_pcm_substream *substream, bool enable)
			pr_err("%s:afe_set_lpass_clock failed ret=%d\n",
					__func__, ret);
	} else {
		apq8009_enable_extcodec_ext_clk(codec, 0, true);
		if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
			mi2s_rx_clk.enable = enable;
			mi2s_rx_clk.clk_id = apq8009_get_clk_id(port_id);