From 6263d21ed86b5e278a30adab79406f9cee8912c0 Mon Sep 17 00:00:00 2001 From: Pan Xiuli Date: Thu, 26 Jul 2018 18:34:40 +0800 Subject: [PATCH] topology: add dmic to sof-apl-pcm512x Add dmic to topology for bxt_pcm512x machine dirver. Signed-off-by: Pan Xiuli --- topology/sof-apl-pcm512x.m4 | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/topology/sof-apl-pcm512x.m4 b/topology/sof-apl-pcm512x.m4 index d0b4461..29c555d 100644 --- a/topology/sof-apl-pcm512x.m4 +++ b/topology/sof-apl-pcm512x.m4 @@ -16,11 +16,13 @@ include(`sof/tokens.m4') # Include Apollolake DSP configuration include(`platform/intel/bxt.m4') +include(`platform/intel/dmic.m4') # # Define the pipelines # # PCM0 ----> volume -----> SSP5 (pcm512x) +# PCM1 <---- volume <----- DMIC0 # # Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le. @@ -29,6 +31,13 @@ PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 1, 0, 2, s32le, 48, 1000, 0, 0) +# Low Latency capture pipeline 2 on PCM 1 using max 4 channels of s32le. +# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, + 2, 1, 4, s32le, + 48, 1000, 0, 0) + + # # DAIs configuration # @@ -40,8 +49,18 @@ DAI_ADD(sof/pipe-dai-playback.m4, PIPELINE_SOURCE_1, 2, s24le, 48, 1000, 0, 0) +# capture DAI is DMIC0 using 2 periods +# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0 +DAI_ADD(sof/pipe-dai-capture.m4, + 2, DMIC, 0, DMIC0, + PIPELINE_SINK_2, 2, s32le, + 48, 1000, 0, 0) + + + # PCM Low Latency, id 0 -PCM_PLAYBACK_ADD(Port5, 0, 0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) +PCM_PLAYBACK_ADD(Port5, 0, 0, 0, PIPELINE_PCM_1) +PCM_CAPTURE_ADD(Dmic0, 1, 1, 1, PIPELINE_PCM_2) # # BE configurations - overrides config in ACPI if present @@ -53,3 +72,8 @@ DAI_CONFIG(SSP, 5, 0, SSP5-Codec, SSP_CLOCK(fsync, 48000, codec_slave), SSP_TDM(2, 32, 3, 3), SSP_CONFIG_DATA(SSP, 5, 24))) + +DAI_CONFIG(DMIC, 0, 1, DMIC0, + DMIC_CONFIG(1, 500000, 4800000, 40, 60, 48000, + DMIC_WORD_LENGTH(s32le), DMIC, 0, + PDM_CONFIG(DMIC, 0, STEREO_PDM0)))