Merge "asoc: Add support for display port hostless fe"

This commit is contained in:
qctecmdr 2021-02-26 09:34:15 -08:00 • committed by Gerrit - the friendly Code Review server
commit 258bb5db28
4 changed files with 43 additions and 2 deletions

View file

@ -6391,6 +6391,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[] = {

View file

@ -1,5 +1,5 @@
// 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",

View file

@ -22473,6 +22473,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[] = {
@ -24607,6 +24611,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 */
@ -27591,6 +27596,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"},
@ -30691,6 +30697,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"},

View file

@ -1,6 +1,6 @@
/* 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")),