mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
Merge "asoc: Add VI feedback dai_link for bengal"
This commit is contained in:
commit
8dabe1d941
5 changed files with 127 additions and 0 deletions
11
asoc/bengal.c
Normal file → Executable file
11
asoc/bengal.c
Normal file → Executable file
|
|
@ -4983,6 +4983,17 @@ static struct snd_soc_dai_link msm_common_misc_fe_dai_links[] = {
|
|||
.ops = &msm_cdc_dma_be_ops,
|
||||
SND_SOC_DAILINK_REG(tx_cdcdma5_tx),
|
||||
},
|
||||
{/* hw:x,39 */
|
||||
.name = "TX4_CDC_DMA Hostless",
|
||||
.stream_name = "TX4_CDC_DMA Hostless",
|
||||
.dynamic = 1,
|
||||
.dpcm_capture = 1,
|
||||
.trigger = {SND_SOC_DPCM_TRIGGER_POST,
|
||||
SND_SOC_DPCM_TRIGGER_POST},
|
||||
.no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
|
||||
.ignore_suspend = 1,
|
||||
SND_SOC_DAILINK_REG(tx4_cdcdma_hostless),
|
||||
},
|
||||
};
|
||||
|
||||
static struct snd_soc_dai_link msm_common_be_dai_links[] = {
|
||||
|
|
|
|||
34
asoc/codecs/wsa881x-analog.c
Normal file → Executable file
34
asoc/codecs/wsa881x-analog.c
Normal file → Executable file
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2015-2016, 2018-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/clk.h>
|
||||
|
|
@ -805,7 +806,40 @@ static int wsa881x_set_visense(struct snd_kcontrol *kcontrol,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int wsa881x_get_t0_init(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct snd_soc_component *component =
|
||||
snd_soc_kcontrol_component(kcontrol);
|
||||
struct wsa881x_pdata *wsa881x =
|
||||
snd_soc_component_get_drvdata(component);
|
||||
struct wsa881x_tz_priv *pdata = &wsa881x->tz_pdata;
|
||||
|
||||
ucontrol->value.integer.value[0] = pdata->t0_init;
|
||||
dev_dbg(component->dev, "%s: t0 init %d\n", __func__, pdata->t0_init);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int wsa881x_set_t0_init(struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
{
|
||||
struct snd_soc_component *component =
|
||||
snd_soc_kcontrol_component(kcontrol);
|
||||
struct wsa881x_pdata *wsa881x =
|
||||
snd_soc_component_get_drvdata(component);
|
||||
struct wsa881x_tz_priv *pdata = &wsa881x->tz_pdata;
|
||||
|
||||
pdata->t0_init = ucontrol->value.integer.value[0];
|
||||
dev_dbg(component->dev, "%s: t0 init %d\n", __func__, pdata->t0_init);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct snd_kcontrol_new wsa881x_snd_controls[] = {
|
||||
SOC_SINGLE_EXT("WSA T0 Init", SND_SOC_NOPM, 0, 1, 0,
|
||||
wsa881x_get_t0_init, wsa881x_set_t0_init),
|
||||
|
||||
SOC_SINGLE_EXT("BOOST Switch", SND_SOC_NOPM, 0, 1, 0,
|
||||
wsa881x_get_boost, wsa881x_set_boost),
|
||||
|
||||
|
|
|
|||
24
asoc/msm-dai-fe.c
Normal file → Executable file
24
asoc/msm-dai-fe.c
Normal file → Executable file
|
|
@ -1,5 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
|
||||
|
|
@ -592,6 +593,29 @@ static struct snd_soc_dai_driver msm_fe_dais[] = {
|
|||
.name = "TX3_CDC_DMA_HOSTLESS",
|
||||
.probe = fe_dai_probe,
|
||||
},
|
||||
{
|
||||
.capture = {
|
||||
.stream_name = "TX4_CDC_DMA_HOSTLESS Capture",
|
||||
.aif_name = "TX4_CDC_DMA_UL_HL",
|
||||
.rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |
|
||||
SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 |
|
||||
SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_44100 |
|
||||
SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_88200 |
|
||||
SNDRV_PCM_RATE_96000 | SNDRV_PCM_RATE_176400 |
|
||||
SNDRV_PCM_RATE_192000 | SNDRV_PCM_RATE_352800 |
|
||||
SNDRV_PCM_RATE_384000,
|
||||
.formats = SNDRV_PCM_FMTBIT_S16_LE |
|
||||
SNDRV_PCM_FMTBIT_S24_LE |
|
||||
SNDRV_PCM_FMTBIT_S24_3LE,
|
||||
.channels_min = 1,
|
||||
.channels_max = 8,
|
||||
.rate_min = 8000,
|
||||
.rate_max = 384000,
|
||||
},
|
||||
.ops = &msm_fe_dai_ops,
|
||||
.name = "TX4_CDC_DMA_HOSTLESS",
|
||||
.probe = fe_dai_probe,
|
||||
},
|
||||
{
|
||||
.playback = {
|
||||
.stream_name = "INT_FM_HOSTLESS Playback",
|
||||
|
|
|
|||
|
|
@ -32661,6 +32661,15 @@ static int spkr_prot_get_vi_rch_port(struct snd_kcontrol *kcontrol,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const char * const cdc_dma_rx_0_vi_fb_tx_mux_text[] = {
|
||||
"ZERO", "TX_CDC_DMA_TX_3", "TX_CDC_DMA_TX_4","TX_CDC_DMA_TX_5"
|
||||
|
||||
};
|
||||
|
||||
static const char * const cdc_dma_rx_1_vi_fb_tx_mux_text[] = {
|
||||
"ZERO", "TX_CDC_DMA_TX_3", "TX_CDC_DMA_TX_4","TX_CDC_DMA_TX_5"
|
||||
};
|
||||
|
||||
static const char * const slim0_rx_vi_fb_tx_lch_mux_text[] = {
|
||||
"ZERO", "SLIM4_TX"
|
||||
};
|
||||
|
|
@ -32689,6 +32698,14 @@ static const char * const int4_mi2s_rx_vi_fb_tx_stereo_mux_text[] = {
|
|||
"ZERO", "INT5_MI2S_TX"
|
||||
};
|
||||
|
||||
static const int cdc_dma_rx_0_vi_fb_tx_value[] = {
|
||||
MSM_BACKEND_DAI_MAX, MSM_BACKEND_DAI_TX_CDC_DMA_TX_3, MSM_BACKEND_DAI_TX_CDC_DMA_TX_4
|
||||
};
|
||||
|
||||
static const int cdc_dma_rx_1_vi_fb_tx_value[] = {
|
||||
MSM_BACKEND_DAI_MAX, MSM_BACKEND_DAI_TX_CDC_DMA_TX_3, MSM_BACKEND_DAI_TX_CDC_DMA_TX_4
|
||||
};
|
||||
|
||||
static const int slim0_rx_vi_fb_tx_lch_value[] = {
|
||||
MSM_BACKEND_DAI_MAX, MSM_BACKEND_DAI_SLIMBUS_4_TX
|
||||
};
|
||||
|
|
@ -32718,6 +32735,16 @@ static const int int4_mi2s_rx_vi_fb_tx_stereo_ch_value[] = {
|
|||
MSM_BACKEND_DAI_MAX, MSM_BACKEND_DAI_INT5_MI2S_TX
|
||||
};
|
||||
|
||||
static const struct soc_enum cdc_dma_rx_0_vi_fb_mux_enum =
|
||||
SOC_VALUE_ENUM_DOUBLE(0, MSM_BACKEND_DAI_RX_CDC_DMA_RX_0, 0, 0,
|
||||
ARRAY_SIZE(cdc_dma_rx_0_vi_fb_tx_mux_text),
|
||||
cdc_dma_rx_0_vi_fb_tx_mux_text, cdc_dma_rx_0_vi_fb_tx_value);
|
||||
|
||||
static const struct soc_enum cdc_dma_rx_1_vi_fb_mux_enum =
|
||||
SOC_VALUE_ENUM_DOUBLE(0, MSM_BACKEND_DAI_RX_CDC_DMA_RX_1, 0, 0,
|
||||
ARRAY_SIZE(cdc_dma_rx_1_vi_fb_tx_mux_text),
|
||||
cdc_dma_rx_1_vi_fb_tx_mux_text, cdc_dma_rx_1_vi_fb_tx_value);
|
||||
|
||||
static const struct soc_enum slim0_rx_vi_fb_lch_mux_enum =
|
||||
SOC_VALUE_ENUM_DOUBLE(0, MSM_BACKEND_DAI_SLIMBUS_0_RX, 0, 0,
|
||||
ARRAY_SIZE(slim0_rx_vi_fb_tx_lch_mux_text),
|
||||
|
|
@ -32755,6 +32782,16 @@ static const struct soc_enum int4_mi2s_rx_vi_fb_stereo_ch_mux_enum =
|
|||
int4_mi2s_rx_vi_fb_tx_stereo_mux_text,
|
||||
int4_mi2s_rx_vi_fb_tx_stereo_ch_value);
|
||||
|
||||
static const struct snd_kcontrol_new cdc_dma_rx_0_vi_fb_mux =
|
||||
SOC_DAPM_ENUM_EXT("CDC_DMA_RX_0_VI_FB_MUX",
|
||||
cdc_dma_rx_0_vi_fb_mux_enum, spkr_prot_get_vi_lch_port,
|
||||
spkr_prot_put_vi_lch_port);
|
||||
|
||||
static const struct snd_kcontrol_new cdc_dma_rx_1_vi_fb_mux =
|
||||
SOC_DAPM_ENUM_EXT("CDC_DMA_RX_1_VI_FB_MUX",
|
||||
cdc_dma_rx_1_vi_fb_mux_enum, spkr_prot_get_vi_lch_port,
|
||||
spkr_prot_put_vi_lch_port);
|
||||
|
||||
static const struct snd_kcontrol_new slim0_rx_vi_fb_lch_mux =
|
||||
SOC_DAPM_ENUM_EXT("SLIM0_RX_VI_FB_LCH_MUX",
|
||||
slim0_rx_vi_fb_lch_mux_enum, spkr_prot_get_vi_lch_port,
|
||||
|
|
@ -32869,6 +32906,8 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = {
|
|||
0, 0, 0, 0),
|
||||
SND_SOC_DAPM_AIF_OUT("TX3_CDC_DMA_UL_HL",
|
||||
"TX3_CDC_DMA_HOSTLESS Capture", 0, 0, 0, 0),
|
||||
SND_SOC_DAPM_AIF_OUT("TX4_CDC_DMA_UL_HL",
|
||||
"TX4_CDC_DMA_HOSTLESS Capture", 0, 0, 0, 0),
|
||||
SND_SOC_DAPM_AIF_OUT("CPE_LSM_UL_HL", "CPE LSM capture",
|
||||
0, 0, 0, 0),
|
||||
SND_SOC_DAPM_AIF_IN("SLIM1_DL_HL", "SLIMBUS1_HOSTLESS Playback",
|
||||
|
|
@ -33370,6 +33409,12 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = {
|
|||
SND_SOC_DAPM_OUTPUT("BE_OUT"),
|
||||
SND_SOC_DAPM_INPUT("BE_IN"),
|
||||
|
||||
SND_SOC_DAPM_MUX("CDC_DMA_RX_0_VI_FB_MUX", SND_SOC_NOPM, 0, 0,
|
||||
&cdc_dma_rx_0_vi_fb_mux),
|
||||
|
||||
SND_SOC_DAPM_MUX("CDC_DMA_RX_1_VI_FB_MUX", SND_SOC_NOPM, 0, 0,
|
||||
&cdc_dma_rx_1_vi_fb_mux),
|
||||
|
||||
SND_SOC_DAPM_MUX("SLIM0_RX_VI_FB_LCH_MUX", SND_SOC_NOPM, 0, 0,
|
||||
&slim0_rx_vi_fb_lch_mux),
|
||||
SND_SOC_DAPM_MUX("SLIM0_RX_VI_FB_RCH_MUX", SND_SOC_NOPM, 0, 0,
|
||||
|
|
@ -36198,6 +36243,7 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
{"RX_CDC_DMA_RX_1_DL_HL", "Switch", "CDC_DMA_DL_HL"},
|
||||
{"RX_CDC_DMA_RX_1", NULL, "RX_CDC_DMA_RX_1_DL_HL"},
|
||||
{"TX3_CDC_DMA_UL_HL", NULL, "TX_CDC_DMA_TX_3"},
|
||||
{"TX4_CDC_DMA_UL_HL", NULL, "TX_CDC_DMA_TX_4"},
|
||||
{"LSM1 Mixer", "SLIMBUS_0_TX", "SLIMBUS_0_TX"},
|
||||
{"LSM1 Mixer", "SLIMBUS_1_TX", "SLIMBUS_1_TX"},
|
||||
{"LSM1 Mixer", "SLIMBUS_3_TX", "SLIMBUS_3_TX"},
|
||||
|
|
@ -36507,10 +36553,16 @@ static const struct snd_soc_dapm_route intercon[] = {
|
|||
#endif
|
||||
{"INCALL_RECORD_TX", NULL, "BE_IN"},
|
||||
{"INCALL_RECORD_RX", NULL, "BE_IN"},
|
||||
{"CDC_DMA_RX_0_VI_FB_MUX", "TX_CDC_DMA_TX_3", "TX_CDC_DMA_TX_3"},
|
||||
{"CDC_DMA_RX_0_VI_FB_MUX", "TX_CDC_DMA_TX_4", "TX_CDC_DMA_TX_4"},
|
||||
{"CDC_DMA_RX_1_VI_FB_MUX", "TX_CDC_DMA_TX_3", "TX_CDC_DMA_TX_3"},
|
||||
{"CDC_DMA_RX_1_VI_FB_MUX", "TX_CDC_DMA_TX_4", "TX_CDC_DMA_TX_4"},
|
||||
{"SLIM0_RX_VI_FB_LCH_MUX", "SLIM4_TX", "SLIMBUS_4_TX"},
|
||||
{"SLIM0_RX_VI_FB_RCH_MUX", "SLIM4_TX", "SLIMBUS_4_TX"},
|
||||
{"WSA_RX_0_VI_FB_LCH_MUX", "WSA_CDC_DMA_TX_0", "WSA_CDC_DMA_TX_0"},
|
||||
{"WSA_RX_0_VI_FB_RCH_MUX", "WSA_CDC_DMA_TX_0", "WSA_CDC_DMA_TX_0"},
|
||||
{"RX_CDC_DMA_RX_0", NULL, "CDC_DMA_RX_0_VI_FB_MUX"},
|
||||
{"RX_CDC_DMA_RX_1", NULL, "CDC_DMA_RX_1_VI_FB_MUX"},
|
||||
{"SLIMBUS_0_RX", NULL, "SLIM0_RX_VI_FB_LCH_MUX"},
|
||||
{"SLIMBUS_0_RX", NULL, "SLIM0_RX_VI_FB_RCH_MUX"},
|
||||
{"WSA_CDC_DMA_RX_0", NULL, "WSA_RX_0_VI_FB_LCH_MUX"},
|
||||
|
|
|
|||
6
asoc/msm_bengal_dailink.h
Normal file → Executable file
6
asoc/msm_bengal_dailink.h
Normal file → Executable file
|
|
@ -1,6 +1,7 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/*
|
||||
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <sound/soc.h>
|
||||
|
|
@ -166,6 +167,11 @@ SND_SOC_DAILINK_DEFS(tx3_cdcdma_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(tx4_cdcdma_hostless,
|
||||
DAILINK_COMP_ARRAY(COMP_CPU("TX4_CDC_DMA_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(tert_mi2s_tx_hostless,
|
||||
DAILINK_COMP_ARRAY(COMP_CPU("TERT_MI2S_TX_HOSTLESS")),
|
||||
DAILINK_COMP_ARRAY(COMP_CODEC("snd-soc-dummy", "snd-soc-dummy-dai")),
|
||||
|
|
|
|||
Loading…
Reference in a new issue