Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion tools/topology/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ set(TPLGS
"sof-apl-eq-pcm512x\;sof-apl-eq-pcm512x"
"sof-apl-eq-dmic\;sof-apl-eq-dmic"
"sof-apl-src-dmic\;sof-apl-src-dmic"
"sof-apl-asrc-dmic\;sof-apl-asrc-dmic"
"sof-apl-dmic-a2ch\;sof-apl-dmic-a2ch"
"sof-apl-dmic-b2ch\;sof-apl-dmic-b2ch"
"sof-apl-dmic-a2ch-b2ch\;sof-apl-dmic-a2ch-b2ch"
Expand Down
103 changes: 0 additions & 103 deletions tools/topology/sof-apl-asrc-dmic.m4

This file was deleted.

46 changes: 45 additions & 1 deletion tools/topology/sof-apl-asrc-pcm512x.m4
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,16 @@ include(`sof/tokens.m4')

# Include Apollolake DSP configuration
include(`platform/intel/bxt.m4')
include(`platform/intel/dmic.m4')

DEBUG_START

#
# Define the pipelines
#
# PCM0 --> ASRC --> Volume --> SSP5 (pcm512x)
#
# PCM5 <-- ASRC <-- Volume <-- DMIC0 (DMIC)
# PCM6 <-- ASRC <-- Volume <-- DMIC1 (DMIC16kHz)

dnl PIPELINE_PCM_ADD(pipeline,
dnl pipe id, pcm, max channels, format,
Expand All @@ -38,6 +40,20 @@ PIPELINE_PCM_ADD(sof/pipe-asrc-volume-playback.m4,
1000, 0, 0,
8000, 192000, 48000)

# DMIC capture pipeline 2 on PCM 5 using max 2 channels.
# 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-asrc-volume-capture.m4,
2, 5, 2, s32le,
1000, 0, 0,
8000, 192000, 48000)

# DMIC16kHz capture pipeline 2 on PCM 6 using max 2 channels.
# 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-asrc-volume-capture.m4,
3, 6, 2, s32le,
1000, 0, 0,
8000, 192000, 16000)

#
# DAIs configuration
#
Expand All @@ -54,9 +70,25 @@ DAI_ADD(sof/pipe-dai-playback.m4,
PIPELINE_SOURCE_1, 2, s24le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)

# capture DAI is DMIC using 2 periods
# Buffers use s32le format, 1000us deadline on core 0 with priority 0
DAI_ADD(sof/pipe-dai-capture.m4,
2, DMIC, 0, dmic01,
PIPELINE_SINK_2, 2, s32le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)

# capture DAI is DMIC16kHz using 2 periods
# Buffers use s16le format, 1000us deadline on core 0 with priority 0
DAI_ADD(sof/pipe-dai-capture.m4,
3, DMIC, 1, dmic16k,
PIPELINE_SINK_3, 2, s32le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)

# PCM, id 0
dnl PCM_PLAYBACK_ADD(name, pcm_id, playback)
PCM_PLAYBACK_ADD(Port5, 0, PIPELINE_PCM_1)
PCM_CAPTURE_ADD(DMIC, 5, PIPELINE_PCM_2)
PCM_CAPTURE_ADD(DMIC16kHz, 6, PIPELINE_PCM_3)

#
# BE configurations - overrides config in ACPI if present
Expand All @@ -70,4 +102,16 @@ DAI_CONFIG(SSP, 5, 0, SSP5-Codec,
SSP_TDM(2, 32, 3, 3),
SSP_CONFIG_DATA(SSP, 5, 24)))

# DMIC (ID: 1)
DAI_CONFIG(DMIC, 0, 1, dmic01,
DMIC_CONFIG(1, 500000, 4800000, 40, 60, 48000,
DMIC_WORD_LENGTH(s32le), 400, DMIC, 0,
PDM_CONFIG(DMIC, 0, STEREO_PDM0)))

# DMIC16kHz (ID: 2)
DAI_CONFIG(DMIC, 1, 2, dmic16k,
DMIC_CONFIG(1, 500000, 4800000, 40, 60, 16000,
DMIC_WORD_LENGTH(s32le), 400, DMIC, 1,
PDM_CONFIG(DMIC, 1, STEREO_PDM0)))

DEBUG_END
4 changes: 2 additions & 2 deletions tools/topology/sof/pipe-asrc-capture.m4
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ LIST(` ', `SOF_TKN_ASRC_RATE_IN "PIPELINE_RATE"'

W_DATA(MY_ASRC_CONF, MY_ASRC_TOKENS)

# "ASRC" has x source and 3 sink periods
W_ASRC(0, PIPELINE_FORMAT, DAI_PERIODS, 3, MY_ASRC_CONF)
# "ASRC" has x 3 sink and x source periods
W_ASRC(0, PIPELINE_FORMAT, 3, DAI_PERIODS, MY_ASRC_CONF)

# Capture Buffers
W_BUFFER(0, COMP_BUFFER_SIZE(3,
Expand Down
4 changes: 2 additions & 2 deletions tools/topology/sof/pipe-asrc-playback.m4
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ LIST(` ', `SOF_TKN_ASRC_RATE_OUT "PIPELINE_RATE"'

W_DATA(MY_ASRC_CONF, MY_ASRC_TOKENS)

# "ASRC" has 2 source and 2 sink periods
W_ASRC(0, PIPELINE_FORMAT, 2, 2, MY_ASRC_CONF)
# "ASRC" has x sink and 2 source periods
W_ASRC(0, PIPELINE_FORMAT, DAI_PERIODS, 2, MY_ASRC_CONF)

# Playback Buffers
W_BUFFER(0, COMP_BUFFER_SIZE(2,
Expand Down
6 changes: 3 additions & 3 deletions tools/topology/sof/pipe-asrc-volume-capture.m4
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ W_DATA(MY_ASRC_CONF, MY_ASRC_TOKENS)
# Components
#

# "ASRC" has 3 source and 3 sink periods
# "ASRC" has 3 sink and 3 source periods
W_ASRC(0, PIPELINE_FORMAT, 3, 3, MY_ASRC_CONF)

# "Volume" has x source and 3 sink periods
W_PGA(0, PIPELINE_FORMAT, DAI_PERIODS, 3, MY_PGA_CONF,
# "Volume" has 3 sink and x source periods
W_PGA(0, PIPELINE_FORMAT, 3, DAI_PERIODS, MY_PGA_CONF,
LIST(` ', "PIPELINE_ID Master Capture Volume"))

# Capture Buffers
Expand Down
6 changes: 3 additions & 3 deletions tools/topology/sof/pipe-asrc-volume-playback.m4
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ LIST(` ', `SOF_TKN_ASRC_RATE_OUT "PIPELINE_RATE"'
` ', `SOF_TKN_ASRC_OPERATION_MODE "0"'))
W_DATA(MY_ASRC_CONF, MY_ASRC_TOKENS)

# "ASRC" has 2 source and 2 sink periods
# "ASRC" has 2 sink and 2 source periods
W_ASRC(0, PIPELINE_FORMAT, 2, 2, MY_ASRC_CONF)

#
Expand All @@ -61,8 +61,8 @@ LIST(` ', `SOF_TKN_VOLUME_RAMP_STEP_TYPE "0"'
` ', `SOF_TKN_VOLUME_RAMP_STEP_MS "250"'))
W_DATA(MY_PGA_CONF, MY_PGA_TOKENS)

# "Volume" has 2 source and x sink periods
W_PGA(0, PIPELINE_FORMAT, 2, DAI_PERIODS, MY_PGA_CONF,
# "Volume" has x sink and 2 source periods
W_PGA(0, PIPELINE_FORMAT, DAI_PERIODS, 2, MY_PGA_CONF,
LIST(` ', "PIPELINE_ID Master Playback Volume"))

# Playback Buffers
Expand Down