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

Commit 6767814d authored by Shiv Maliyappanahalli's avatar Shiv Maliyappanahalli
Browse files

ASoC: msm: qdsp6v2: enable audio over display port



Add support in cpu dai, routing and native afe driver to enable
audio over display port.

Change-Id: I4cd5b738caab4d40c1c118d3111c3f4af740c84e
Signed-off-by: default avatarShiv Maliyappanahalli <smaliyap@codeaurora.org>
parent ab26d098
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -470,6 +470,11 @@ Example:
		qcom,msm-dai-q6-dev-id = <8>;
	};

	dai_dp: qcom,msm-dai-q6-dp {
		compatible = "qcom,msm-dai-q6-hdmi";
		qcom,msm-dai-q6-dev-id = <24608>;
	};

	qcom,msm-dai-q6 {
		compatible = "qcom,msm-dai-q6";
		qcom,msm-dai-q6-sb-0-rx {
@@ -784,7 +789,7 @@ Example:
				"msm-voip-dsp", "msm-pcm-voice", "msm-pcm-loopback",
				"msm-compress-dsp", "msm-pcm-hostless", "msm-pcm-afe",
				"msm-lsm-client", "msm-pcm-routing", "msm-pcm-lpa";
		asoc-cpu = <&dai_pri_auxpcm>, <&dai_hdmi>,
		asoc-cpu = <&dai_pri_auxpcm>, <&dai_hdmi>, <&dai_dp>,
				<&dai_mi2s0>, <&dai_mi2s1>, <&dai_mi2s2>, <&dai_mi2s3>,
				<&sb_0_rx>, <&sb_0_tx>, <&sb_1_rx>, <&sb_1_tx>,
				<&sb_3_rx>, <&sb_3_tx>, <&sb_4_rx>, <&sb_4_tx>,
@@ -793,6 +798,7 @@ Example:
				<&incall_record_rx>, <&incall_record_tx>, <&incall_music_rx>,
				<&incall_music_2_rx>;
		asoc-cpu-names = "msm-dai-q6-auxpcm.1", "msm-dai-q6-hdmi.8",
				"msm-dai-q6-dp.24608",
				"msm-dai-q6-mi2s.0", "msm-dai-q6-mi2s.1",
				"msm-dai-q6-mi2s.2", "msm-dai-q6-mi2s.3",
				"msm-dai-q6-dev.16384", "msm-dai-q6-dev.16385",
@@ -1157,7 +1163,7 @@ Example:
				<&bt_sco_tx>,<&int_fm_rx>,<&int_fm_tx>,<&afe_pcm_rx>,
				<&afe_pcm_tx>,<&afe_proxy_rx>,<&afe_proxy_tx>,
				<&incall_record_rx>,<&incall_record_tx>,<&incall_music_rx>,
				<&incall_music2_rx>;
				<&incall_music2_rx>,<&dai_dp>;
		asoc-cpu-names = "msm-dai-q6-auxpcm.1","msm-dai-q6-auxpcm.2",
				"msm-dai-q6-hdmi.8","msm-dai-q6-mi2s.0",
				"msm-dai-q6-dev.16384","msm-dai-q6-dev.16385",
@@ -1171,7 +1177,7 @@ Example:
				"msm-dai-q6-dev.225","msm-dai-q6-dev.241",
				"msm-dai-q6-dev.240","msm-dai-q6-dev.32771",
				"msm-dai-q6-dev.32772","msm-dai-q6-dev.32773",
				"msm-dai-q6-dev.32770";
				"msm-dai-q6-dev.32770","msm-dai-q6-dp.24608";
		asoc-codec = <&stub>;
		asoc-codec-names = "msm-stub-codec.1";
	};
+3 −0
Original line number Diff line number Diff line
@@ -804,6 +804,7 @@ struct adm_cmd_connect_afe_port_v5 {
#define INT_FM_TX 0x3005
#define RT_PROXY_PORT_001_RX	0x2000
#define RT_PROXY_PORT_001_TX	0x2001
#define DISPLAY_PORT_RX	0x6020

#define AFE_PORT_INVALID 0xFFFF
#define SLIMBUS_INVALID AFE_PORT_INVALID
@@ -953,6 +954,8 @@ struct adm_cmd_connect_afe_port_v5 {
#define AFE_PORT_ID_SLIMBUS_MULTI_CHAN_8_RX      0x4010
/* SLIMbus Tx port on channel 8. */
#define AFE_PORT_ID_SLIMBUS_MULTI_CHAN_8_TX      0x4011
/* AFE Rx port for audio over Display port */
#define AFE_PORT_ID_HDMI_OVER_DP_RX              0x6020
/*USB AFE port */
#define AFE_PORT_ID_USB_RX                       0x7000
#define AFE_PORT_ID_USB_TX                       0x7001
+4 −2
Original line number Diff line number Diff line
@@ -173,14 +173,16 @@ enum {
	IDX_AFE_PORT_ID_QUATERNARY_TDM_TX_6,
	IDX_AFE_PORT_ID_QUATERNARY_TDM_RX_7,
	IDX_AFE_PORT_ID_QUATERNARY_TDM_TX_7,
	/* IDX 118->122 */
	/* IDX 118->121 */
	IDX_SLIMBUS_7_RX,
	IDX_SLIMBUS_7_TX,
	IDX_SLIMBUS_8_RX,
	IDX_SLIMBUS_8_TX,
	/* IDX 123-> 124 */
	/* IDX 122-> 123 */
	IDX_AFE_PORT_ID_USB_RX,
	IDX_AFE_PORT_ID_USB_TX,
	/* IDX 124 */
	IDX_DISPLAY_PORT_RX,
	AFE_MAX_PORTS
};

+116 −36
Original line number Diff line number Diff line
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2016, 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
@@ -32,53 +32,82 @@ enum {
	STATUS_MAX
};

struct msm_hdmi_ca {
struct msm_ext_disp_ca {
	bool set_ca;
	u32 ca;
};

static struct msm_hdmi_ca hdmi_ca = { false, 0x0 };

struct msm_dai_q6_hdmi_dai_data {
	DECLARE_BITMAP(status_mask, STATUS_MAX);
	u32 rate;
	u32 channels;
	struct msm_ext_disp_ca ca;
	union afe_port_config port_config;
};

static int msm_dai_q6_hdmi_format_put(struct snd_kcontrol *kcontrol,
static int msm_dai_q6_ext_disp_format_put(struct snd_kcontrol *kcontrol,
					  struct snd_ctl_elem_value *ucontrol)
{

	struct msm_dai_q6_hdmi_dai_data *dai_data = kcontrol->private_data;
	int value = ucontrol->value.integer.value[0];

	if (!dai_data) {
		pr_err("%s: dai_data is NULL\n", __func__);
		return -EINVAL;
	}

	dai_data->port_config.hdmi_multi_ch.datatype = value;
	pr_debug("%s: value = %d\n", __func__, value);

	return 0;
}

static int msm_dai_q6_hdmi_format_get(struct snd_kcontrol *kcontrol,
static int msm_dai_q6_ext_disp_format_get(struct snd_kcontrol *kcontrol,
					  struct snd_ctl_elem_value *ucontrol)
{

	struct msm_dai_q6_hdmi_dai_data *dai_data = kcontrol->private_data;

	if (!dai_data) {
		pr_err("%s: dai_data is NULL\n", __func__);
		return -EINVAL;
	}

	ucontrol->value.integer.value[0] =
		dai_data->port_config.hdmi_multi_ch.datatype;
	pr_debug("%s: value = %ld\n",
		 __func__, ucontrol->value.integer.value[0]);

	return 0;
}

static int msm_dai_q6_hdmi_ca_put(struct snd_kcontrol *kcontrol,
static int msm_dai_q6_ext_disp_ca_put(struct snd_kcontrol *kcontrol,
				      struct snd_ctl_elem_value *ucontrol)
{
	hdmi_ca.ca = ucontrol->value.integer.value[0];
	hdmi_ca.set_ca = true;
	struct msm_dai_q6_hdmi_dai_data *dai_data = kcontrol->private_data;

	if (!dai_data) {
		pr_err("%s: dai_data is NULL\n", __func__);
		return -EINVAL;
	}

	dai_data->ca.ca = ucontrol->value.integer.value[0];
	dai_data->ca.set_ca = true;
	pr_debug("%s: ca = %d\n", __func__, dai_data->ca.ca);
	return 0;
}

static int msm_dai_q6_hdmi_ca_get(struct snd_kcontrol *kcontrol,
static int msm_dai_q6_ext_disp_ca_get(struct snd_kcontrol *kcontrol,
				struct snd_ctl_elem_value *ucontrol)
{
	ucontrol->value.integer.value[0] = hdmi_ca.ca;
	struct msm_dai_q6_hdmi_dai_data *dai_data = kcontrol->private_data;

	if (!dai_data) {
		pr_err("%s: dai_data is NULL\n", __func__);
		return -EINVAL;
	}

	ucontrol->value.integer.value[0] = dai_data->ca.ca;
	pr_debug("%s: ca = %d\n", __func__, dai_data->ca.ca);
	return 0;
}

@@ -97,12 +126,22 @@ static const struct soc_enum hdmi_config_enum[] = {

static const struct snd_kcontrol_new hdmi_config_controls[] = {
	SOC_ENUM_EXT("HDMI RX Format", hdmi_config_enum[0],
				 msm_dai_q6_hdmi_format_get,
				 msm_dai_q6_hdmi_format_put),
				 msm_dai_q6_ext_disp_format_get,
				 msm_dai_q6_ext_disp_format_put),
	SOC_SINGLE_MULTI_EXT("HDMI RX CA", SND_SOC_NOPM, 0,
				 HDMI_RX_CA_MAX, 0, 1,
				 msm_dai_q6_hdmi_ca_get,
				 msm_dai_q6_hdmi_ca_put),
				 msm_dai_q6_ext_disp_ca_get,
				 msm_dai_q6_ext_disp_ca_put),
};

static const struct snd_kcontrol_new display_port_config_controls[] = {
	SOC_ENUM_EXT("Display Port RX Format", hdmi_config_enum[0],
				 msm_dai_q6_ext_disp_format_get,
				 msm_dai_q6_ext_disp_format_put),
	SOC_SINGLE_MULTI_EXT("Display Port RX CA", SND_SOC_NOPM, 0,
				 HDMI_RX_CA_MAX, 0, 1,
				 msm_dai_q6_ext_disp_ca_get,
				 msm_dai_q6_ext_disp_ca_put),
};

/* Current implementation assumes hw_param is called once
@@ -200,9 +239,9 @@ static int msm_dai_q6_hdmi_prepare(struct snd_pcm_substream *substream,
	struct msm_dai_q6_hdmi_dai_data *dai_data = dev_get_drvdata(dai->dev);
	int rc = 0;

	if (hdmi_ca.set_ca)
	if (dai_data->ca.set_ca)
		dai_data->port_config.hdmi_multi_ch.channel_allocation =
								 hdmi_ca.ca;
							      dai_data->ca.ca;

	if (!test_bit(STATUS_PORT_STARTED, dai_data->status_mask)) {
		rc = afe_port_start(dai->id, &dai_data->port_config,
@@ -236,8 +275,8 @@ static int msm_dai_q6_hdmi_dai_probe(struct snd_soc_dai *dai)
	struct snd_soc_dapm_route intercon;
	struct snd_soc_dapm_context *dapm;

	if (!dai) {
		pr_err("%s: dai not found\n", __func__);
	if (!dai || !dai->driver) {
		pr_err("%s: dai or dai->driver is NULL\n", __func__);
		return -EINVAL;
	}
	dai_data = kzalloc(sizeof(struct msm_dai_q6_hdmi_dai_data),
@@ -252,19 +291,33 @@ static int msm_dai_q6_hdmi_dai_probe(struct snd_soc_dai *dai)

	msm_dai_q6_hdmi_set_dai_id(dai);

	if (dai->driver->id == HDMI_RX) {
		kcontrol = &hdmi_config_controls[0];

		rc = snd_ctl_add(dai->component->card->snd_card,
				 snd_ctl_new1(kcontrol, dai_data));

		kcontrol = &hdmi_config_controls[1];
		rc = snd_ctl_add(dai->component->card->snd_card,
				 snd_ctl_new1(kcontrol, dai_data));
	} else if (dai->driver->id == DISPLAY_PORT_RX) {
		kcontrol = &display_port_config_controls[0];
		rc = snd_ctl_add(dai->component->card->snd_card,
				 snd_ctl_new1(kcontrol, dai_data));

		kcontrol = &display_port_config_controls[1];
		rc = snd_ctl_add(dai->component->card->snd_card,
				 snd_ctl_new1(kcontrol, dai_data));
	} else {
		dev_err(dai->dev, "%s: Invalid id:%d\n",
			__func__, dai->driver->id);
		kfree(dai_data);
		dev_set_drvdata(dai->dev, NULL);
		return -EINVAL;
	}

	dapm = snd_soc_component_get_dapm(dai->component);
	memset(&intercon, 0 , sizeof(intercon));
	if (!rc && dai && dai->driver) {
	if (!rc) {
		if (dai->driver->playback.stream_name &&
			dai->driver->playback.aif_name) {
			dev_dbg(dai->dev, "%s add route for widget %s",
@@ -334,6 +387,27 @@ static struct snd_soc_dai_driver msm_dai_q6_hdmi_hdmi_rx_dai = {
	.remove = msm_dai_q6_hdmi_dai_remove,
};

static struct snd_soc_dai_driver msm_dai_q6_display_port_rx_dai[] = {
	{
		.playback = {
			.stream_name = "Display Port Playback",
			.aif_name = "DISPLAY_PORT",
			.rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000 |
				 SNDRV_PCM_RATE_192000,
			.formats = SNDRV_PCM_FMTBIT_S16_LE |
				   SNDRV_PCM_FMTBIT_S24_LE,
			.channels_min = 2,
			.channels_max = 8,
			.rate_max =     192000,
			.rate_min =     48000,
		},
		.ops = &msm_dai_q6_hdmi_ops,
		.id = DISPLAY_PORT_RX,
		.probe = msm_dai_q6_hdmi_dai_probe,
		.remove = msm_dai_q6_hdmi_dai_remove,
	},
};

static const struct snd_soc_component_driver msm_dai_hdmi_q6_component = {
	.name		= "msm-dai-q6-hdmi",
};
@@ -362,6 +436,12 @@ static int msm_dai_q6_hdmi_dev_probe(struct platform_device *pdev)
			&msm_dai_hdmi_q6_component,
			&msm_dai_q6_hdmi_hdmi_rx_dai, 1);
		break;
	case DISPLAY_PORT_RX:
		rc = snd_soc_register_component(&pdev->dev,
			&msm_dai_hdmi_q6_component,
			&msm_dai_q6_display_port_rx_dai[0],
			ARRAY_SIZE(msm_dai_q6_display_port_rx_dai));
		break;
	default:
		dev_err(&pdev->dev, "invalid device ID %d\n", pdev->id);
		rc = -ENODEV;
+92 −3
Original line number Diff line number Diff line
@@ -99,7 +99,8 @@ struct msm_pcm_route_bdai_pp_params {

static struct msm_pcm_route_bdai_pp_params
	msm_bedais_pp_params[MSM_BACKEND_DAI_PP_PARAMS_REQ_MAX] = {
	{HDMI_RX, 0, 0, 0}
	{HDMI_RX, 0, 0, 0},
	{DISPLAY_PORT_RX, 0, 0, 0},
};

static int msm_routing_send_device_pp_params(int port_id,  int copp_idx);
@@ -448,6 +449,7 @@ struct msm_pcm_routing_bdai_data msm_bedais[MSM_BACKEND_DAI_MAX] = {
	{ SLIMBUS_8_TX, 0, 0, 0, 0, 0, 0, 0, 0, LPASS_BE_SLIMBUS_8_TX},
	{ AFE_PORT_ID_USB_RX, 0, 0, 0, 0, 0, 0, 0, 0, LPASS_BE_USB_AUDIO_RX},
	{ AFE_PORT_ID_USB_TX, 0, 0, 0, 0, 0, 0, 0, 0, LPASS_BE_USB_AUDIO_TX},
	{ DISPLAY_PORT_RX, 0, 0, 0, 0, 0, 0, 0, 0, LPASS_BE_DISPLAY_PORT},
};

/* Track ASM playback & capture sessions of DAI */
@@ -2932,6 +2934,58 @@ static const struct snd_kcontrol_new hdmi_mixer_controls[] = {
	MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer,
	msm_routing_put_audio_mixer),
};

static const struct snd_kcontrol_new display_port_mixer_controls[] = {
	SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
	msm_routing_put_audio_mixer),
	SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
	msm_routing_put_audio_mixer),
	SOC_SINGLE_EXT("MultiMedia3", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer,
	msm_routing_put_audio_mixer),
	SOC_SINGLE_EXT("MultiMedia4", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
	msm_routing_put_audio_mixer),
	SOC_SINGLE_EXT("MultiMedia5", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
	msm_routing_put_audio_mixer),
	SOC_SINGLE_EXT("MultiMedia6", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
	msm_routing_put_audio_mixer),
	SOC_SINGLE_EXT("MultiMedia7", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer,
	msm_routing_put_audio_mixer),
	SOC_SINGLE_EXT("MultiMedia8", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
	msm_routing_put_audio_mixer),
	SOC_SINGLE_EXT("MultiMedia9", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer,
	msm_routing_put_audio_mixer),
	SOC_SINGLE_EXT("MultiMedia10", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_FRONTEND_DAI_MULTIMEDIA10, 1, 0, msm_routing_get_audio_mixer,
	msm_routing_put_audio_mixer),
	SOC_SINGLE_EXT("MultiMedia11", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_FRONTEND_DAI_MULTIMEDIA11, 1, 0, msm_routing_get_audio_mixer,
	msm_routing_put_audio_mixer),
	SOC_SINGLE_EXT("MultiMedia12", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_FRONTEND_DAI_MULTIMEDIA12, 1, 0, msm_routing_get_audio_mixer,
	msm_routing_put_audio_mixer),
	SOC_SINGLE_EXT("MultiMedia13", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_FRONTEND_DAI_MULTIMEDIA13, 1, 0, msm_routing_get_audio_mixer,
	msm_routing_put_audio_mixer),
	SOC_SINGLE_EXT("MultiMedia14", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_FRONTEND_DAI_MULTIMEDIA14, 1, 0, msm_routing_get_audio_mixer,
	msm_routing_put_audio_mixer),
	SOC_SINGLE_EXT("MultiMedia15", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_FRONTEND_DAI_MULTIMEDIA15, 1, 0, msm_routing_get_audio_mixer,
	msm_routing_put_audio_mixer),
	SOC_SINGLE_EXT("MultiMedia16", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_FRONTEND_DAI_MULTIMEDIA16, 1, 0, msm_routing_get_audio_mixer,
	msm_routing_put_audio_mixer),
};

	/* incall music delivery mixer */
static const struct snd_kcontrol_new incall_music_delivery_mixer_controls[] = {
	SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_VOICE_PLAYBACK_TX,
@@ -5583,6 +5637,12 @@ static const struct snd_kcontrol_new hdmi_rx_port_mixer_controls[] = {
	msm_routing_put_port_mixer),
};

static const struct snd_kcontrol_new display_port_rx_port_mixer_controls[] = {
	SOC_SINGLE_EXT("MI2S_TX", MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_BACKEND_DAI_MI2S_TX, 1, 0, msm_routing_get_port_mixer,
	msm_routing_put_port_mixer),
};

static const struct snd_kcontrol_new sec_i2s_rx_port_mixer_controls[] = {
	SOC_SINGLE_EXT("MI2S_TX", MSM_BACKEND_DAI_SEC_I2S_RX,
	MSM_BACKEND_DAI_MI2S_TX, 1, 0, msm_routing_get_port_mixer,
@@ -7435,6 +7495,8 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = {
	SND_SOC_DAPM_AIF_OUT("SLIMBUS_2_RX", "Slimbus2 Playback", 0, 0, 0, 0),
	SND_SOC_DAPM_AIF_OUT("SLIMBUS_5_RX", "Slimbus5 Playback", 0, 0, 0, 0),
	SND_SOC_DAPM_AIF_OUT("HDMI", "HDMI Playback", 0, 0, 0 , 0),
	SND_SOC_DAPM_AIF_OUT("DISPLAY_PORT", "Display Port Playback",
			     0, 0, 0, 0),
	SND_SOC_DAPM_AIF_OUT("MI2S_RX", "MI2S Playback", 0, 0, 0, 0),
	SND_SOC_DAPM_AIF_OUT("QUAT_MI2S_RX", "Quaternary MI2S Playback",
						0, 0, 0, 0),
@@ -7709,6 +7771,8 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = {
	slimbus_7_rx_mixer_controls, ARRAY_SIZE(slimbus_7_rx_mixer_controls)),
	SND_SOC_DAPM_MIXER("HDMI Mixer", SND_SOC_NOPM, 0, 0,
	hdmi_mixer_controls, ARRAY_SIZE(hdmi_mixer_controls)),
	SND_SOC_DAPM_MIXER("DISPLAY_PORT Mixer", SND_SOC_NOPM, 0, 0,
	display_port_mixer_controls, ARRAY_SIZE(display_port_mixer_controls)),
	SND_SOC_DAPM_MIXER("SPDIF_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
	spdif_rx_mixer_controls, ARRAY_SIZE(spdif_rx_mixer_controls)),
	SND_SOC_DAPM_MIXER("MI2S_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
@@ -7923,6 +7987,9 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = {
	SND_SOC_DAPM_MIXER("HDMI_RX Port Mixer",
	SND_SOC_NOPM, 0, 0, hdmi_rx_port_mixer_controls,
	ARRAY_SIZE(hdmi_rx_port_mixer_controls)),
	SND_SOC_DAPM_MIXER("DISPLAY_PORT_RX Port Mixer",
	SND_SOC_NOPM, 0, 0, display_port_rx_port_mixer_controls,
	ARRAY_SIZE(display_port_rx_port_mixer_controls)),
	SND_SOC_DAPM_MIXER("SEC_I2S_RX Port Mixer",
	SND_SOC_NOPM, 0, 0, sec_i2s_rx_port_mixer_controls,
	ARRAY_SIZE(sec_i2s_rx_port_mixer_controls)),
@@ -8114,6 +8181,24 @@ static const struct snd_soc_dapm_route intercon[] = {
	{"HDMI Mixer", "MultiMedia16", "MM_DL16"},
	{"HDMI", NULL, "HDMI Mixer"},

	{"DISPLAY_PORT Mixer", "MultiMedia1", "MM_DL1"},
	{"DISPLAY_PORT Mixer", "MultiMedia2", "MM_DL2"},
	{"DISPLAY_PORT Mixer", "MultiMedia3", "MM_DL3"},
	{"DISPLAY_PORT Mixer", "MultiMedia4", "MM_DL4"},
	{"DISPLAY_PORT Mixer", "MultiMedia5", "MM_DL5"},
	{"DISPLAY_PORT Mixer", "MultiMedia6", "MM_DL6"},
	{"DISPLAY_PORT Mixer", "MultiMedia7", "MM_DL7"},
	{"DISPLAY_PORT Mixer", "MultiMedia8", "MM_DL8"},
	{"DISPLAY_PORT Mixer", "MultiMedia9", "MM_DL9"},
	{"DISPLAY_PORT Mixer", "MultiMedia10", "MM_DL10"},
	{"DISPLAY_PORT Mixer", "MultiMedia11", "MM_DL11"},
	{"DISPLAY_PORT Mixer", "MultiMedia12", "MM_DL12"},
	{"DISPLAY_PORT Mixer", "MultiMedia13", "MM_DL13"},
	{"DISPLAY_PORT Mixer", "MultiMedia14", "MM_DL14"},
	{"DISPLAY_PORT Mixer", "MultiMedia15", "MM_DL15"},
	{"DISPLAY_PORT Mixer", "MultiMedia16", "MM_DL16"},
	{"DISPLAY_PORT", NULL, "DISPLAY_PORT Mixer"},

	{"SPDIF_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
	{"SPDIF_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
	{"SPDIF_RX Audio Mixer", "MultiMedia3", "MM_DL3"},
@@ -9517,6 +9602,9 @@ static const struct snd_soc_dapm_route intercon[] = {
	{"HDMI_RX Port Mixer", "MI2S_TX", "MI2S_TX"},
	{"HDMI", NULL, "HDMI_RX Port Mixer"},

	{"DISPLAY_PORT_RX Port Mixer", "MI2S_TX", "MI2S_TX"},
	{"DISPLAY_PORT", NULL, "DISPLAY_PORT_RX Port Mixer"},

	{"SEC_I2S_RX Port Mixer", "MI2S_TX", "MI2S_TX"},
	{"SEC_I2S_RX", NULL, "SEC_I2S_RX Port Mixer"},

@@ -9571,6 +9659,7 @@ static const struct snd_soc_dapm_route intercon[] = {
	{"BE_OUT", NULL, "SLIMBUS_8_RX"},
	{"BE_OUT", NULL, "USB_AUDIO_RX"},
	{"BE_OUT", NULL, "HDMI"},
	{"BE_OUT", NULL, "DISPLAY_PORT"},
	{"BE_OUT", NULL, "SPDIF_RX"},
	{"BE_OUT", NULL, "MI2S_RX"},
	{"BE_OUT", NULL, "QUAT_MI2S_RX"},
@@ -9886,7 +9975,7 @@ static int msm_routing_send_device_pp_params(int port_id, int copp_idx)

	pr_debug("%s: port_id %d, copp_idx %d\n", __func__, port_id, copp_idx);

	if (port_id != HDMI_RX) {
	if (port_id != HDMI_RX && port_id != DISPLAY_PORT_RX) {
		pr_err("%s: Device pp params on invalid port %d\n",
			__func__, port_id);
		return  -EINVAL;
@@ -9959,7 +10048,7 @@ static int msm_routing_put_device_pp_params_mixer(struct snd_kcontrol *kcontrol,

	for (be_idx = 0; be_idx < MSM_BACKEND_DAI_MAX; be_idx++) {
		port_id = msm_bedais[be_idx].port_id;
		if (port_id == HDMI_RX)
		if (port_id == HDMI_RX || port_id == DISPLAY_PORT_RX)
			break;
	}

Loading