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

Commit 2d153ed6 authored by Md Mansoor Ahmed's avatar Md Mansoor Ahmed Committed by Gerrit - the friendly Code Review server
Browse files

Asoc: sm6150: Add compress capture support



Add FE dialinks to enable multi compress capture
sessions on sm6150 target.

Change-Id: Ib26fc6c84d7993c34725a3b67596d4f059aa286e
Signed-off-by: default avatarMd Mansoor Ahmed <mansoor@codeaurora.org>
parent a97470f4
Loading
Loading
Loading
Loading
+80 −0
Original line number Diff line number Diff line
@@ -6505,6 +6505,79 @@ static struct snd_soc_dai_link msm_tavil_fe_dai_links[] = {
	},
};

static struct snd_soc_dai_link msm_int_compress_capture_dai[] = {
	{
		.name = "Compress9",
		.stream_name = "Compress9",
		.cpu_dai_name = "MultiMedia17",
		.platform_name = "msm-compress-dsp",
		.dynamic = 1,
		.dpcm_capture = 1,
		.trigger = {SND_SOC_DPCM_TRIGGER_POST,
			    SND_SOC_DPCM_TRIGGER_POST},
		.codec_dai_name = "snd-soc-dummy-dai",
		.codec_name = "snd-soc-dummy",
		.ignore_suspend = 1,
		.id = MSM_FRONTEND_DAI_MULTIMEDIA17,
	},
	{
		.name = "Compress10",
		.stream_name = "Compress10",
		.cpu_dai_name = "MultiMedia18",
		.platform_name = "msm-compress-dsp",
		.dynamic = 1,
		.dpcm_capture = 1,
		.trigger = {SND_SOC_DPCM_TRIGGER_POST,
			    SND_SOC_DPCM_TRIGGER_POST},
		.codec_dai_name = "snd-soc-dummy-dai",
		.codec_name = "snd-soc-dummy",
		.ignore_suspend = 1,
		.id = MSM_FRONTEND_DAI_MULTIMEDIA18,
	},
	{
		.name = "Compress11",
		.stream_name = "Compress11",
		.cpu_dai_name = "MultiMedia19",
		.platform_name = "msm-compress-dsp",
		.dynamic = 1,
		.dpcm_capture = 1,
		.trigger = {SND_SOC_DPCM_TRIGGER_POST,
			    SND_SOC_DPCM_TRIGGER_POST},
		.codec_dai_name = "snd-soc-dummy-dai",
		.codec_name = "snd-soc-dummy",
		.ignore_suspend = 1,
		.id = MSM_FRONTEND_DAI_MULTIMEDIA19,
	},
	{
		.name = "Compress12",
		.stream_name = "Compress12",
		.cpu_dai_name = "MultiMedia28",
		.platform_name = "msm-compress-dsp",
		.dynamic = 1,
		.dpcm_capture = 1,
		.trigger = {SND_SOC_DPCM_TRIGGER_POST,
			    SND_SOC_DPCM_TRIGGER_POST},
		.codec_dai_name = "snd-soc-dummy-dai",
		.codec_name = "snd-soc-dummy",
		.ignore_suspend = 1,
		.id = MSM_FRONTEND_DAI_MULTIMEDIA28,
	},
	{
		.name = "Compress13",
		.stream_name = "Compress13",
		.cpu_dai_name = "MultiMedia29",
		.platform_name = "msm-compress-dsp",
		.dynamic = 1,
		.dpcm_capture = 1,
		.trigger = {SND_SOC_DPCM_TRIGGER_POST,
			    SND_SOC_DPCM_TRIGGER_POST},
		.codec_dai_name = "snd-soc-dummy-dai",
		.codec_name = "snd-soc-dummy",
		.ignore_suspend = 1,
		.id = MSM_FRONTEND_DAI_MULTIMEDIA29,
	},
};

static struct snd_soc_dai_link msm_bolero_fe_dai_links[] = {
	{/* hw:x,37 */
		.name = LPASS_BE_WSA_CDC_DMA_TX_0,
@@ -7499,6 +7572,7 @@ static struct snd_soc_dai_link msm_sm6150_dai_links[
			 ARRAY_SIZE(msm_tavil_fe_dai_links) +
			 ARRAY_SIZE(msm_bolero_fe_dai_links) +
			 ARRAY_SIZE(msm_common_misc_fe_dai_links) +
			 ARRAY_SIZE(msm_int_compress_capture_dai) +
			 ARRAY_SIZE(msm_common_be_dai_links) +
			 ARRAY_SIZE(msm_tavil_be_dai_links) +
			 ARRAY_SIZE(msm_wcn_be_dai_links) +
@@ -7815,6 +7889,12 @@ static struct snd_soc_card *populate_snd_card_dailinks(struct device *dev)
				ARRAY_SIZE(msm_bolero_fe_dai_links);
		}

		memcpy(msm_sm6150_dai_links + total_links,
		       msm_int_compress_capture_dai,
		       sizeof(msm_int_compress_capture_dai));

		total_links += ARRAY_SIZE(msm_int_compress_capture_dai);

		memcpy(msm_sm6150_dai_links + total_links,
		       msm_common_be_dai_links,
		       sizeof(msm_common_be_dai_links));