Prechádzať zdrojové kódy

asoc: pineapple: add back-end support for dummy out/in device

To implement dummy device based a2dpSuspend/resume, adds support
for dummy device backend in audio kernel.

Change-Id: Iad4a210167ce400232c6d3b84bfca8b84fa358c8
Signed-off-by: Anand Mohan <[email protected]>
Anand Mohan 1 rok pred
rodič
commit
bc93f4af89
3 zmenil súbory, kde vykonal 34 pridanie a 0 odobranie
  1. 2 0
      asoc/msm-audio-defs.h
  2. 9 0
      asoc/msm_dailink.h
  3. 23 0
      asoc/pineapple.c

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

@@ -113,7 +113,9 @@
 #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_RX_0 "PCM_DUMMY-RX-0"
 #define LPASS_BE_PCM_DUMMY_TX_0 "PCM_DUMMY-TX-0"
+#define LPASS_BE_PCM_DUMMY_TX_1 "PCM_DUMMY-TX-1"
 
 #define LPASS_BE_BTFM_PROXY_RX_0 "BTFM_PROXY-RX-0"
 #define LPASS_BE_BTFM_PROXY_TX_0 "BTFM_PROXY-TX-0"

+ 9 - 0
asoc/msm_dailink.h

@@ -400,3 +400,12 @@ SND_SOC_DAILINK_DEFS(tavil_i2s_tx1,
 	DAILINK_COMP_ARRAY(COMP_CODEC("tavil_codec", "tavil_i2s_tx1")),
 	DAILINK_COMP_ARRAY(COMP_PLATFORM("snd-soc-dummy")));
 
+SND_SOC_DAILINK_DEFS(pcm_dummy_rx0,
+	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(pcm_dummy_tx1,
+	DAILINK_COMP_ARRAY(COMP_CPU("snd-soc-dummy-dai")),
+	DAILINK_COMP_ARRAY(COMP_DUMMY()),
+	DAILINK_COMP_ARRAY(COMP_PLATFORM("snd-soc-dummy")));

+ 23 - 0
asoc/pineapple.c

@@ -516,6 +516,29 @@ static struct snd_soc_dai_link msm_common_be_dai_links[] = {
 		.ops = &msm_common_be_ops,
 		SND_SOC_DAILINK_REG(pcm_dummy_tx0),
 	},
+	/* Dummy Dev Rx BACK END DAI Link */
+	{
+		.name = LPASS_BE_PCM_DUMMY_RX_0,
+		.stream_name = LPASS_BE_PCM_DUMMY_RX_0,
+		.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(pcm_dummy_rx0),
+	},
+	/* Dummy Dev Tx BACK END DAI Link */
+	{
+		.name = LPASS_BE_PCM_DUMMY_TX_1,
+		.stream_name = LPASS_BE_PCM_DUMMY_TX_1,
+		.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_tx1),
+	},
 };
 
 #ifndef CONFIG_AUDIO_BTFM_PROXY