Skip to content
This repository has been archived by the owner on Jan 17, 2019. It is now read-only.

topology: add dmic to sof-apl-pcm512x #44

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion topology/sof-apl-pcm512x.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
#
Expand All @@ -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
Expand All @@ -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)))