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

Commit 135182a2 authored by Laxminath Kasam's avatar Laxminath Kasam
Browse files

asoc: Add support for display port hostless fe



Add DP port hostless frontend for port mixer usecases.

Change-Id: I54fe24731efd592d2c1867e9a878be57e5ebbd52
Signed-off-by: default avatarLaxminath Kasam <lkasam@codeaurora.org>
parent 686f8554
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -6386,6 +6386,19 @@ static struct snd_soc_dai_link msm_common_misc_fe_dai_links[] = {
		.ignore_pmdown_time = 1,
		SND_SOC_DAILINK_REG(sec_mi2s_tx_hostless),
	},
	/* DISP PORT Hostless */
	{/* hw:x,45 */
		.name = "DISPLAY_PORT_RX_HOSTLESS",
		.stream_name = "DISPLAY_PORT_RX_HOSTLESS",
		.dynamic = 1,
		.dpcm_playback = 1,
		.trigger = {SND_SOC_DPCM_TRIGGER_POST,
			SND_SOC_DPCM_TRIGGER_POST},
		.no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
		.ignore_suspend = 1,
		.ignore_pmdown_time = 1,
		SND_SOC_DAILINK_REG(display_port_hostless),
	},
};

static struct snd_soc_dai_link msm_common_be_dai_links[] = {
+17 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
 */


@@ -701,6 +701,22 @@ static struct snd_soc_dai_driver msm_fe_dais[] = {
		.name = "HDMI_HOSTLESS",
		.probe = fe_dai_probe,
	},
	{
		.playback = {
			.stream_name = "DISPLAY_PORT_HOSTLESS Playback",
			.aif_name = "DP_DL_HL",
			.rates = SNDRV_PCM_RATE_8000_48000,
			.formats = (SNDRV_PCM_FMTBIT_S16_LE |
				    SNDRV_PCM_FMTBIT_S24_LE),
			.channels_min = 1,
			.channels_max = 2,
			.rate_min = 8000,
			.rate_max = 48000,
		},
		.ops = &msm_fe_dai_ops,
		.name = "DISPLAY_PORT_HOSTLESS",
		.probe = fe_dai_probe,
	},
	{
		.playback = {
			.stream_name = "AUXPCM_HOSTLESS Playback",
+7 −0
Original line number Diff line number Diff line
@@ -22433,6 +22433,10 @@ static const struct snd_kcontrol_new display_port_rx_port_mixer_controls[] = {
	MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_BACKEND_DAI_MI2S_TX, 1, 0, msm_routing_get_port_mixer,
	msm_routing_put_port_mixer),
	SOC_DOUBLE_EXT("TX_CDC_DMA_TX_3", SND_SOC_NOPM,
	MSM_BACKEND_DAI_DISPLAY_PORT_RX,
	MSM_BACKEND_DAI_TX_CDC_DMA_TX_3, 1, 0, msm_routing_get_port_mixer,
	msm_routing_put_port_mixer),
};
static const struct snd_kcontrol_new display_port_rx1_port_mixer_controls[] = {
@@ -24567,6 +24571,7 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = {
	SND_SOC_DAPM_AIF_OUT("USBAUDIO_UL_HL", "USBAUDIO_HOSTLESS Capture",
		0, 0, 0, 0),
	SND_SOC_DAPM_AIF_IN("HDMI_DL_HL", "HDMI_HOSTLESS Playback", 0, 0, 0, 0),
	SND_SOC_DAPM_AIF_IN("DP_DL_HL", "DISPLAY_PORT_HOSTLESS Playback", 0, 0, 0, 0),
	SND_SOC_DAPM_AIF_IN("DTMF_DL_HL", "DTMF_RX_HOSTLESS Playback",
		0, 0, 0, 0),
	/* LSM */
@@ -27547,6 +27552,7 @@ static const struct snd_soc_dapm_route intercon[] = {
	{"HDMI_RX_MS Port Mixer", "MI2S_TX", "MI2S_TX"},
	{"HDMI_MS", NULL, "HDMI_RX_MS Port Mixer"},
	{"DISPLAY_PORT", NULL, "DP_DL_HL"},
	{"DISPLAY_PORT", NULL, "DISPLAY_PORT_RX Port Mixer"},
	{"DISPLAY_PORT1", NULL, "DISPLAY_PORT_RX1 Port Mixer"},
@@ -30641,6 +30647,7 @@ static const struct snd_soc_dapm_route intercon_mi2s[] = {
	{"HDMI_RX Port Mixer", "MI2S_TX", "MI2S_TX"},
	{"DISPLAY_PORT_RX Port Mixer", "MI2S_TX", "MI2S_TX"},
	{"DISPLAY_PORT_RX1 Port Mixer", "MI2S_TX", "MI2S_TX"},
	{"DISPLAY_PORT_RX Port Mixer", "TX_CDC_DMA_TX_3", "TX_CDC_DMA_TX_3"},
	/* Backend Enablement */
	{"BE_OUT", NULL, "PRI_I2S_RX"},
+6 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
 */

#include <sound/soc.h>
@@ -81,6 +81,11 @@ SND_SOC_DAILINK_DEFS(hdmi_rx_hostless,
	DAILINK_COMP_ARRAY(COMP_CODEC("snd-soc-dummy", "snd-soc-dummy-dai")),
	DAILINK_COMP_ARRAY(COMP_PLATFORM("msm-pcm-hostless")));

SND_SOC_DAILINK_DEFS(display_port_hostless,
	DAILINK_COMP_ARRAY(COMP_CPU("DISPLAY_PORT_HOSTLESS")),
	DAILINK_COMP_ARRAY(COMP_CODEC("snd-soc-dummy", "snd-soc-dummy-dai")),
	DAILINK_COMP_ARRAY(COMP_PLATFORM("msm-pcm-hostless")));

SND_SOC_DAILINK_DEFS(voicemmode2,
	DAILINK_COMP_ARRAY(COMP_CPU("VoiceMMode2")),
	DAILINK_COMP_ARRAY(COMP_CODEC("snd-soc-dummy", "snd-soc-dummy-dai")),