summaryrefslogtreecommitdiff
path: root/asoc/kalama.c
diff options
context:
space:
mode:
authorPhani Kumar Uppalapati <quic_phaniu@quicinc.com>2022-06-08 00:01:26 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2022-07-08 11:00:02 -0700
commit7e300730037f4fd5d8b308cb9c5467d1338b3e86 (patch)
treec0cd507d1987ce923682a99fb639f91029374454 /asoc/kalama.c
parentb06c7ae63ca4749fa2a33473b3a4816705a740f3 (diff)
downloadmsm-extra-7e300730037f4fd5d8b308cb9c5467d1338b3e86.tar.gz
asoc: kalama: add boolean flag for adding swr haptics dai-links
Change-Id: I460aa6baa015b79fd6b74bb8ac8827a5b82d34ea
Diffstat (limited to 'asoc/kalama.c')
-rw-r--r--asoc/kalama.c34
1 files changed, 23 insertions, 11 deletions
diff --git a/asoc/kalama.c b/asoc/kalama.c
index 253e94ba..d4dfd503 100644
--- a/asoc/kalama.c
+++ b/asoc/kalama.c
@@ -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")) {