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

Commit b64d53d9 authored by Yamit Mehta's avatar Yamit Mehta
Browse files

ASoC: msm: qdsp6v2: add support for source tracking feature



Add mixer controls and port id for "QUATERNARY_MI2S" interface
to support source tracking over i2s in external codec.

CRs-Fixed: 1062738
Change-Id: I2ec164315180f571f229cff29790e9db3c87a033
Signed-off-by: default avatarYamit Mehta <ymehta@codeaurora.org>
parent 527b50b5
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -6327,6 +6327,9 @@ static int msm_audio_sound_focus_derive_port_id(struct snd_kcontrol *kcontrol,
	} else if (!strcmp(kcontrol->id.name + strlen(prefix),
					"TERT_MI2S")) {
		*port_id = AFE_PORT_ID_TERTIARY_MI2S_TX;
	} else if (!strcmp(kcontrol->id.name + strlen(prefix),
					"QUATERNARY_MI2S")) {
		*port_id = AFE_PORT_ID_QUATERNARY_MI2S_TX;
	} else {
		pr_err("%s: mixer ctl name=%s, could not derive valid port id\n",
			__func__, kcontrol->id.name);
@@ -6531,6 +6534,21 @@ static const struct snd_kcontrol_new msm_source_tracking_controls[] = {
		.info	= msm_source_tracking_info,
		.get	= msm_audio_source_tracking_get,
	},
	{
		.access = SNDRV_CTL_ELEM_ACCESS_READWRITE,
		.iface  = SNDRV_CTL_ELEM_IFACE_MIXER,
		.name   = "Sound Focus Audio Tx QUATERNARY_MI2S",
		.info   = msm_sound_focus_info,
		.get    = msm_audio_sound_focus_get,
		.put    = msm_audio_sound_focus_put,
	},
	{
		.access = SNDRV_CTL_ELEM_ACCESS_READ,
		.iface  = SNDRV_CTL_ELEM_IFACE_MIXER,
		.name   = "Source Tracking Audio Tx QUATERNARY_MI2S",
		.info   = msm_source_tracking_info,
		.get    = msm_audio_source_tracking_get,
	},
};

static int spkr_prot_put_vi_lch_port(struct snd_kcontrol *kcontrol,