Explorar o código

asoc: Add dummy PCM backend

Add dummy PCM backend definition for virtual devices.
This is being added to support echo reference capture.

Change-Id: I7830f9adf963397d06b837add3f9e1c0fe31563c
Annemarie Porter %!s(int64=3) %!d(string=hai) anos
pai
achega
bb89ad1722
Modificáronse 4 ficheiros con 28 adicións e 0 borrados
  1. 10 0
      asoc/kalama.c
  2. 2 0
      asoc/msm-audio-defs.h
  3. 6 0
      asoc/msm_dailink.h
  4. 10 0
      asoc/waipio.c

+ 10 - 0
asoc/kalama.c

@@ -479,6 +479,16 @@ static struct snd_soc_dai_link msm_common_be_dai_links[] = {
 		.ops = &msm_common_be_ops,
 		SND_SOC_DAILINK_REG(usb_audio_tx),
 	},
+	{
+		.name = LPASS_BE_PCM_DUMMY_TX_0,
+		.stream_name = LPASS_BE_PCM_DUMMY_TX_0,
+		.capture_only = 1,
+		.trigger = {SND_SOC_DPCM_TRIGGER_POST,
+			SND_SOC_DPCM_TRIGGER_POST},
+		.ignore_suspend = 1,
+		.ops = &msm_common_be_ops,
+		SND_SOC_DAILINK_REG(pcm_dummy_tx0),
+	},
 };
 
 static struct snd_soc_dai_link msm_wcn_be_dai_links[] = {

+ 2 - 0
asoc/msm-audio-defs.h

@@ -118,4 +118,6 @@
 #define LPASS_BE_RT_PROXY_PCM_RX "PCM_RT_PROXY-RX-1"
 #define LPASS_BE_RT_PROXY_PCM_TX "PCM_RT_PROXY-TX-1"
 
+#define LPASS_BE_PCM_DUMMY_TX_0 "PCM_DUMMY-TX-0"
+
 #endif /*_MSM_AUDIO_DEFS_H*/

+ 6 - 0
asoc/msm_dailink.h

@@ -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>
@@ -15,6 +16,11 @@ SND_SOC_DAILINK_DEFS(usb_audio_tx,
 	DAILINK_COMP_ARRAY(COMP_DUMMY()),
 	DAILINK_COMP_ARRAY(COMP_PLATFORM("snd-soc-dummy")));
 
+SND_SOC_DAILINK_DEFS(pcm_dummy_tx0,
+	DAILINK_COMP_ARRAY(COMP_CPU("snd-soc-dummy-dai")),
+	DAILINK_COMP_ARRAY(COMP_DUMMY()),
+	DAILINK_COMP_ARRAY(COMP_PLATFORM("snd-soc-dummy")));
+
 SND_SOC_DAILINK_DEFS(slimbus_7_rx,
 	DAILINK_COMP_ARRAY(COMP_CPU("snd-soc-dummy-dai")),
 	DAILINK_COMP_ARRAY(COMP_CODEC("btfmslim_slave",

+ 10 - 0
asoc/waipio.c

@@ -472,6 +472,16 @@ static struct snd_soc_dai_link msm_common_be_dai_links[] = {
 		.ops = &msm_common_be_ops,
 		SND_SOC_DAILINK_REG(usb_audio_tx),
 	},
+	{
+		.name = LPASS_BE_PCM_DUMMY_TX_0,
+		.stream_name = LPASS_BE_PCM_DUMMY_TX_0,
+		.capture_only = 1,
+		.trigger = {SND_SOC_DPCM_TRIGGER_POST,
+			SND_SOC_DPCM_TRIGGER_POST},
+		.ignore_suspend = 1,
+		.ops = &msm_common_be_ops,
+		SND_SOC_DAILINK_REG(pcm_dummy_tx0),
+	},
 };
 
 static struct snd_soc_dai_link msm_wcn_be_dai_links[] = {