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

Commit 3c177cf9 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: qdspqv2: add check for TDM clock programming"

parents 601c4261 a039a83e
Loading
Loading
Loading
Loading
+19 −10
Original line number Diff line number Diff line
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -5126,14 +5126,18 @@ static int msm_dai_q6_dai_tdm_remove(struct snd_soc_dai *dai)
				dev_err(dai->dev, "fail to disable AFE group 0x%x\n",
					group_id);
			}
			if (!(tdm_dai_data->afe_ebit_unsupported &&
			     !tdm_dai_data->clk_set.clk_freq_in_hz)) {
				rc = msm_dai_q6_tdm_set_clk(tdm_dai_data,
							    dai->id, false);
				if (IS_ERR_VALUE(rc)) {
				dev_err(dai->dev, "%s: fail to disable AFE clk 0x%x\n",
					dev_err(dai->dev,
					"%s: fail to disable AFE clk 0x%x\n",
					__func__, dai->id);
				}
			}
		}
	}

	return 0;
}
@@ -5767,6 +5771,8 @@ static int msm_dai_q6_tdm_prepare(struct snd_pcm_substream *substream,
				if (atomic_read(group_ref) == 0) {
					afe_port_group_enable(group_id,
						NULL, false);
				if (!(dai_data->afe_ebit_unsupported &&
				     !dai_data->clk_set.clk_freq_in_hz))
					msm_dai_q6_tdm_set_clk(dai_data,
							       dai->id, false);
				}
@@ -5882,6 +5888,8 @@ static void msm_dai_q6_tdm_shutdown(struct snd_pcm_substream *substream,
					"%s: failed to disable grp 0x%x\n",
					__func__, group_id);
			}
			if (!(dai_data->afe_ebit_unsupported &&
				!dai_data->clk_set.clk_freq_in_hz)) {
				rc = msm_dai_q6_tdm_set_clk(dai_data,
							    dai->id, false);
				if (IS_ERR_VALUE(rc)) {
@@ -5890,6 +5898,7 @@ static void msm_dai_q6_tdm_shutdown(struct snd_pcm_substream *substream,
					__func__, dai->id);
				}
			}
		}
		if ((dai_data->num_group_ports > 1) &&
		    (dai_data->sec_port_enable)) {
			if (atomic_read(sec_group_ref) == 0) {