Merge "asoc: kalama: add boolean flag for adding swr haptics dai-links"

This commit is contained in:
qctecmdr
2022-07-12 18:08:35 -07:00
committed by Gerrit - the friendly Code Review server

View File

@@ -500,6 +500,20 @@ static struct snd_soc_dai_link msm_common_be_dai_links[] = {
},
};
static struct snd_soc_dai_link msm_swr_haptics_be_dai_links[] = {
{
.name = LPASS_BE_RX_CDC_DMA_RX_6,
.stream_name = LPASS_BE_RX_CDC_DMA_RX_6,
.playback_only = 1,
.trigger = {SND_SOC_DPCM_TRIGGER_POST,
SND_SOC_DPCM_TRIGGER_POST},
.ignore_pmdown_time = 1,
.ignore_suspend = 1,
.ops = &msm_common_be_ops,
SND_SOC_DAILINK_REG(rx_dma_rx6),
},
};
static struct snd_soc_dai_link msm_wcn_be_dai_links[] = {
{
.name = LPASS_BE_SLIMBUS_7_RX,
@@ -774,17 +788,6 @@ static struct snd_soc_dai_link msm_rx_tx_cdc_dma_be_dai_links[] = {
.ops = &msm_common_be_ops,
SND_SOC_DAILINK_REG(rx_dma_rx5),
},
{
.name = LPASS_BE_RX_CDC_DMA_RX_6,
.stream_name = LPASS_BE_RX_CDC_DMA_RX_6,
.playback_only = 1,
.trigger = {SND_SOC_DPCM_TRIGGER_POST,
SND_SOC_DPCM_TRIGGER_POST},
.ignore_pmdown_time = 1,
.ignore_suspend = 1,
.ops = &msm_common_be_ops,
SND_SOC_DAILINK_REG(rx_dma_rx6),
},
/* TX CDC DMA Backend DAI Links */
{
.name = LPASS_BE_TX_CDC_DMA_TX_3,
@@ -1463,6 +1466,15 @@ static struct snd_soc_card *populate_snd_card_dailinks(struct device *dev, int w
sizeof(msm_wcn_be_dai_links));
total_links += ARRAY_SIZE(msm_wcn_be_dai_links);
}
if (of_find_property(dev->of_node, "swr-haptics-unsupported",
NULL)) {
dev_dbg(dev, "%s(): swr haptics support not present\n", __func__);
} else {
memcpy(msm_kalama_dai_links + total_links,
msm_swr_haptics_be_dai_links,
sizeof(msm_swr_haptics_be_dai_links));
total_links += ARRAY_SIZE(msm_swr_haptics_be_dai_links);
}
dailink = msm_kalama_dai_links;
} else if(!strcmp(match->data, "stub_codec")) {