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

Commit b83bf5a4 authored by Banajit Goswami's avatar Banajit Goswami
Browse files

ASoC: msm: add Quaternary MI2S Hostless FE support



Add a Hostless Front-end DAI for Quaternary MI2S port.
For APQ8084, Quaternary MI2S is used to connect devices
like external FM chipset, for which the Hostless FE DAI
is used.

Change-Id: I96a15f9a486ce3bc7a5b08be01a58a4830fb09a1
Signed-off-by: default avatarBanajit Goswami <bgoswami@codeaurora.org>
parent 2a9b24f2
Loading
Loading
Loading
Loading
+20 −6
Original line number Diff line number Diff line
@@ -2324,20 +2324,18 @@ static struct snd_soc_dai_link apq8084_common_dai_links[] = {
		.codec_name = "snd-soc-dummy",
	},
	{
		.name = "QCHAT",
		.stream_name = "QCHAT",
		.cpu_dai_name   = "QCHAT",
		.platform_name  = "msm-pcm-voice",
		.name = "Quaternary MI2S TX Hostless",
		.stream_name = "Quaternary MI2S_TX Hostless Capture",
		.cpu_dai_name = "QUAT_MI2S_TX_HOSTLESS",
		.platform_name	= "msm-pcm-hostless",
		.dynamic = 1,
		.trigger = {SND_SOC_DPCM_TRIGGER_POST,
			    SND_SOC_DPCM_TRIGGER_POST},
		.no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
		.ignore_suspend = 1,
		/* this dainlink has playback support */
		.ignore_pmdown_time = 1,
		.codec_dai_name = "snd-soc-dummy-dai",
		.codec_name = "snd-soc-dummy",
		.be_id = MSM_FRONTEND_DAI_QCHAT,
	},
	{
		.name = "MSM AFE-PCM RX",
@@ -2723,6 +2721,22 @@ static struct snd_soc_dai_link apq8084_common_dai_links[] = {
		.codec_name = "snd-soc-dummy",
		.be_id = MSM_FRONTEND_DAI_LSM8,
	},
	{
		.name = "QCHAT",
		.stream_name = "QCHAT",
		.cpu_dai_name   = "QCHAT",
		.platform_name  = "msm-pcm-voice",
		.dynamic = 1,
		.trigger = {SND_SOC_DPCM_TRIGGER_POST,
			    SND_SOC_DPCM_TRIGGER_POST},
		.no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
		.ignore_suspend = 1,
		/* this dainlink has playback support */
		.ignore_pmdown_time = 1,
		.codec_dai_name = "snd-soc-dummy-dai",
		.codec_name = "snd-soc-dummy",
		.be_id = MSM_FRONTEND_DAI_QCHAT,
	},
};

static struct snd_soc_dai_link apq8084_tomtom_fe_dai_links[] = {
+15 −0
Original line number Diff line number Diff line
@@ -713,6 +713,21 @@ static struct snd_soc_dai_driver msm_fe_dais[] = {
		.name = "SEC_MI2S_RX_HOSTLESS",
		.probe = fe_dai_probe,
	},
	{
		.capture = {
			.stream_name = "Quaternary MI2S_TX Hostless Capture",
			.aif_name = "QUAT_MI2S_UL_HL",
			.rates = SNDRV_PCM_RATE_8000_48000,
			.formats = SNDRV_PCM_FMTBIT_S16_LE,
			.channels_min = 1,
			.channels_max = 2,
			.rate_min = 8000,
			.rate_max = 48000,
		},
		.ops = &msm_fe_dai_ops,
		.name = "QUAT_MI2S_TX_HOSTLESS",
		.probe = fe_dai_probe,
	},
	{
		.playback = {
			.stream_name = "Voice2 Playback",
+5 −0
Original line number Diff line number Diff line
@@ -3145,6 +3145,10 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = {
		0, 0, 0, 0),
	SND_SOC_DAPM_AIF_IN("DTMF_DL_HL", "DTMF_RX_HOSTLESS Playback",
		0, 0, 0, 0),
	SND_SOC_DAPM_AIF_OUT("QUAT_MI2S_UL_HL",
		"Quaternary MI2S_TX Hostless Capture",
		0, 0, 0, 0),

	/* LSM */
	SND_SOC_DAPM_AIF_OUT("LSM1_UL_HL", "Listen 1 Audio Service Capture",
			     0, 0, 0, 0),
@@ -3987,6 +3991,7 @@ static const struct snd_soc_dapm_route intercon[] = {
	{"PRI_MI2S_UL_HL", NULL, "PRI_MI2S_TX"},
	{"SEC_MI2S_RX", NULL, "SEC_MI2S_DL_HL"},
	{"PRI_MI2S_RX", NULL, "PRI_MI2S_DL_HL"},
	{"QUAT_MI2S_UL_HL", NULL, "QUAT_MI2S_TX"},

	{"SLIMBUS_0_RX Port Mixer", "INTERNAL_FM_TX", "INT_FM_TX"},
	{"SLIMBUS_0_RX Port Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"},