Browse Source

Revert "ASoC: disable source tracking get functionality for sdm855"

This reverts commit 85b6208522c6a9ecbba4f571b33056a31f62eca4
(ASoC: disable source tracking get functionality for sm8150).
Enable source tracking get functionality as the feature is
completely enabled.

Change-Id: I099fae3155f486f1fe89dbdad97c8cb1029f14df
Signed-off-by: Meng Wang <[email protected]>
Meng Wang 7 years ago
parent
commit
92edfde1e9
1 changed files with 18 additions and 1 deletions
  1. 18 1
      asoc/msm-pcm-routing-v2.c

+ 18 - 1
asoc/msm-pcm-routing-v2.c

@@ -14173,7 +14173,24 @@ static int msm_source_tracking_info(struct snd_kcontrol *kcontrol,
 static int msm_voice_source_tracking_get(struct snd_kcontrol *kcontrol,
 					 struct snd_ctl_elem_value *ucontrol)
 {
-	return -EINVAL;
+	int ret = 0;
+	struct source_tracking_param sourceTrackingData;
+
+	memset(&sourceTrackingData, 0, sizeof(struct source_tracking_param));
+
+	ret = voc_get_source_tracking(&sourceTrackingData);
+	if (ret) {
+		pr_err("%s: Error getting Source Tracking Params, err=%d\n",
+			  __func__, ret);
+
+		ret = -EINVAL;
+		goto done;
+	}
+	memcpy(ucontrol->value.bytes.data, (void *)&sourceTrackingData,
+		sizeof(struct source_tracking_param));
+
+done:
+	return ret;
 }
 
 static int msm_audio_get_copp_idx_from_port_id(int port_id, int session_type,