forked from Minki/linux
ASoC: qdsp6: q6afe-dai: Add Quinary MI2S ports
This patch adds support to Quinary MI2S ports supported in AFE. Signed-off-by: Gabriel David <ultracoolguy@disroot.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210605022206.13226-4-ultracoolguy@disroot.org Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
d0293e2aa6
commit
98e80779ff
@ -475,6 +475,7 @@ static int q6afe_dai_prepare(struct snd_pcm_substream *substream,
|
||||
q6afe_slim_port_prepare(dai_data->port[dai->id],
|
||||
&dai_data->port_config[dai->id].slim);
|
||||
break;
|
||||
case QUINARY_MI2S_RX ... QUINARY_MI2S_TX:
|
||||
case PRIMARY_MI2S_RX ... QUATERNARY_MI2S_TX:
|
||||
rc = q6afe_i2s_port_prepare(dai_data->port[dai->id],
|
||||
&dai_data->port_config[dai->id].i2s_cfg);
|
||||
@ -598,6 +599,7 @@ static const struct snd_soc_dapm_route q6afe_dapm_routes[] = {
|
||||
{"Secondary MI2S Playback", NULL, "SEC_MI2S_RX"},
|
||||
{"Tertiary MI2S Playback", NULL, "TERT_MI2S_RX"},
|
||||
{"Quaternary MI2S Playback", NULL, "QUAT_MI2S_RX"},
|
||||
{"Quinary MI2S Playback", NULL, "QUIN_MI2S_RX"},
|
||||
|
||||
{"Primary TDM0 Playback", NULL, "PRIMARY_TDM_RX_0"},
|
||||
{"Primary TDM1 Playback", NULL, "PRIMARY_TDM_RX_1"},
|
||||
@ -693,6 +695,7 @@ static const struct snd_soc_dapm_route q6afe_dapm_routes[] = {
|
||||
{"PRI_MI2S_TX", NULL, "Primary MI2S Capture"},
|
||||
{"SEC_MI2S_TX", NULL, "Secondary MI2S Capture"},
|
||||
{"QUAT_MI2S_TX", NULL, "Quaternary MI2S Capture"},
|
||||
{"QUIN_MI2S_TX", NULL, "Quinary MI2S Capture"},
|
||||
|
||||
{"WSA_CODEC_DMA_RX_0 Playback", NULL, "WSA_CODEC_DMA_RX_0"},
|
||||
{"WSA_CODEC_DMA_TX_0", NULL, "WSA_CODEC_DMA_TX_0 Capture"},
|
||||
@ -1190,6 +1193,39 @@ static struct snd_soc_dai_driver q6afe_dais[] = {
|
||||
.ops = &q6i2s_ops,
|
||||
.probe = msm_dai_q6_dai_probe,
|
||||
.remove = msm_dai_q6_dai_remove,
|
||||
}, {
|
||||
.playback = {
|
||||
.stream_name = "Quinary MI2S Playback",
|
||||
.rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 |
|
||||
SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_96000 |
|
||||
SNDRV_PCM_RATE_192000,
|
||||
.formats = SNDRV_PCM_FMTBIT_S16_LE,
|
||||
.channels_min = 1,
|
||||
.channels_max = 8,
|
||||
.rate_min = 8000,
|
||||
.rate_max = 192000,
|
||||
},
|
||||
.id = QUINARY_MI2S_RX,
|
||||
.name = "QUIN_MI2S_RX",
|
||||
.ops = &q6i2s_ops,
|
||||
.probe = msm_dai_q6_dai_probe,
|
||||
.remove = msm_dai_q6_dai_remove,
|
||||
}, {
|
||||
.capture = {
|
||||
.stream_name = "Quinary MI2S Capture",
|
||||
.rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 |
|
||||
SNDRV_PCM_RATE_16000,
|
||||
.formats = SNDRV_PCM_FMTBIT_S16_LE,
|
||||
.channels_min = 1,
|
||||
.channels_max = 8,
|
||||
.rate_min = 8000,
|
||||
.rate_max = 48000,
|
||||
},
|
||||
.id = QUINARY_MI2S_TX,
|
||||
.name = "QUIN_MI2S_TX",
|
||||
.ops = &q6i2s_ops,
|
||||
.probe = msm_dai_q6_dai_probe,
|
||||
.remove = msm_dai_q6_dai_remove,
|
||||
},
|
||||
Q6AFE_TDM_PB_DAI("Primary", 0, PRIMARY_TDM_RX_0),
|
||||
Q6AFE_TDM_PB_DAI("Primary", 1, PRIMARY_TDM_RX_1),
|
||||
@ -1349,6 +1385,10 @@ static const struct snd_soc_dapm_widget q6afe_dai_widgets[] = {
|
||||
SND_SOC_DAPM_AIF_OUT("SLIMBUS_4_TX", NULL, 0, SND_SOC_NOPM, 0, 0),
|
||||
SND_SOC_DAPM_AIF_OUT("SLIMBUS_5_TX", NULL, 0, SND_SOC_NOPM, 0, 0),
|
||||
SND_SOC_DAPM_AIF_OUT("SLIMBUS_6_TX", NULL, 0, SND_SOC_NOPM, 0, 0),
|
||||
SND_SOC_DAPM_AIF_IN("QUIN_MI2S_RX", NULL,
|
||||
0, SND_SOC_NOPM, 0, 0),
|
||||
SND_SOC_DAPM_AIF_OUT("QUIN_MI2S_TX", NULL,
|
||||
0, SND_SOC_NOPM, 0, 0),
|
||||
SND_SOC_DAPM_AIF_IN("QUAT_MI2S_RX", NULL,
|
||||
0, SND_SOC_NOPM, 0, 0),
|
||||
SND_SOC_DAPM_AIF_OUT("QUAT_MI2S_TX", NULL,
|
||||
@ -1610,6 +1650,7 @@ static void of_q6afe_parse_dai_data(struct device *dev,
|
||||
|
||||
switch (id) {
|
||||
/* MI2S specific properties */
|
||||
case QUINARY_MI2S_RX ... QUINARY_MI2S_TX:
|
||||
case PRIMARY_MI2S_RX ... QUATERNARY_MI2S_TX:
|
||||
priv = &data->priv[id];
|
||||
ret = of_property_read_variable_u32_array(node,
|
||||
|
Loading…
Reference in New Issue
Block a user