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

Commit ca172d02 authored by Phani Kumar Uppalapati's avatar Phani Kumar Uppalapati
Browse files

ASoC: msm: Add external echo reference support for audio path



If the audio mixing is done within codec, then echo reference
needs to be obtained from the mixed output in the codec.
Add support to get the external echo reference from SLIMBUS_1_TX
afe port.

Change-Id: I046172c02dc2eac5d1b8156abca3e4ca960d78f4
Signed-off-by: default avatarPhani Kumar Uppalapati <phaniu@codeaurora.org>
parent 8e6fdb81
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -1583,9 +1583,14 @@ static int msm_routing_ec_ref_rx_put(struct snd_kcontrol *kcontrol,
		msm_route_ec_ref_rx = 7;
		ec_ref_port_id = AFE_PORT_ID_SECONDARY_MI2S_RX;
		break;
	case 8:
		msm_route_ec_ref_rx = 8;
	case 9:
		msm_route_ec_ref_rx = 9;
		ec_ref_port_id = SLIMBUS_5_RX;
		break;
	case 10:
		msm_route_ec_ref_rx = 10;
		ec_ref_port_id = SLIMBUS_1_TX;
		break;
	default:
		msm_route_ec_ref_rx = 0; /* NONE */
		pr_err("%s EC ref rx %ld not valid\n",
@@ -1604,9 +1609,9 @@ static int msm_routing_ec_ref_rx_put(struct snd_kcontrol *kcontrol,
static const char *const ec_ref_rx[] = { "None", "SLIM_RX", "I2S_RX",
	"PRI_MI2S_TX", "SEC_MI2S_TX",
	"TERT_MI2S_TX", "QUAT_MI2S_TX", "SEC_I2S_RX", "PROXY_RX",
	"SLIM_5_RX"};
	"SLIM_5_RX", "SLIM_1_TX"};
static const struct soc_enum msm_route_ec_ref_rx_enum[] = {
	SOC_ENUM_SINGLE_EXT(9, ec_ref_rx),
	SOC_ENUM_SINGLE_EXT(11, ec_ref_rx),
};

static const struct snd_kcontrol_new ext_ec_ref_mux_ul1 =
@@ -5551,6 +5556,7 @@ static const struct snd_soc_dapm_route intercon[] = {
	{"AUDIO_REF_EC_UL1 MUX", "SEC_MI2S_TX" , "SEC_MI2S_TX"},
	{"AUDIO_REF_EC_UL1 MUX", "TERT_MI2S_TX" , "TERT_MI2S_TX"},
	{"AUDIO_REF_EC_UL1 MUX", "QUAT_MI2S_TX" , "QUAT_MI2S_TX"},
	{"AUDIO_REF_EC_UL1 MUX", "SLIM_1_TX" , "SLIMBUS_1_TX"},

	{"AUDIO_REF_EC_UL2 MUX", "PRI_MI2S_TX" , "PRI_MI2S_TX"},
	{"AUDIO_REF_EC_UL2 MUX", "SEC_MI2S_TX" , "SEC_MI2S_TX"},