From 752f086bdc1a94d5aa7eeedcaaa9f43073579b76 Mon Sep 17 00:00:00 2001 From: Fred Oh Date: Mon, 2 Mar 2020 17:45:42 -0800 Subject: [PATCH] topology: add platform sku files to config platform settings icl, cml whl are sharing some toplogy files. Create platform specific files including DSP configuration, SSP setting and DMIC to simplify platform settings. Signed-off-by: Fred Oh --- tools/topology/platform/intel/cml-mono.m4 | 3 +++ tools/topology/platform/intel/cml.m4 | 13 +++++++++++ tools/topology/platform/intel/icl.m4 | 12 ++++++++++ tools/topology/platform/intel/whl.m4 | 13 +++++++++++ tools/topology/sof-cml-demux-rt5682.m4 | 11 ++-------- tools/topology/sof-cml-rt5682-kwd.m4 | 22 ++----------------- tools/topology/sof-cml-rt5682.m4 | 22 ++----------------- tools/topology/sof-cml-rt700.m4 | 3 +-- tools/topology/sof-cml-src-rt5682.m4 | 5 ++--- tools/topology/sof-cnl-rt274.m4 | 2 +- tools/topology/sof-icl-dmic-4ch.m4 | 5 ++--- tools/topology/sof-icl-rt700.m4 | 3 +-- .../sof-icl-rt711-rt1308-rt715-hdmi.m4 | 7 ++---- tools/topology/sof-icl-rt711-rt1308-rt715.m4 | 2 +- 14 files changed, 57 insertions(+), 66 deletions(-) create mode 100644 tools/topology/platform/intel/cml-mono.m4 create mode 100644 tools/topology/platform/intel/cml.m4 create mode 100644 tools/topology/platform/intel/whl.m4 diff --git a/tools/topology/platform/intel/cml-mono.m4 b/tools/topology/platform/intel/cml-mono.m4 new file mode 100644 index 000000000..2f0004374 --- /dev/null +++ b/tools/topology/platform/intel/cml-mono.m4 @@ -0,0 +1,3 @@ +include(`platform/intel/cnl.m4') + +define(`MONO', `') diff --git a/tools/topology/platform/intel/cml.m4 b/tools/topology/platform/intel/cml.m4 new file mode 100644 index 000000000..119aa15c9 --- /dev/null +++ b/tools/topology/platform/intel/cml.m4 @@ -0,0 +1,13 @@ +include(`platform/intel/cnl.m4') + +#SSP setting for CML platform +undefine(`SSP_INDEX') +define(`SSP_INDEX', 0) + +undefine(`SSP_NAME') +define(`SSP_NAME', `SSP0-Codec') + +undefine(`SSP_MCLK_RATE') +define(`SSP_MCLK_RATE', `24000000') + +include(`platform/intel/dmic.m4') diff --git a/tools/topology/platform/intel/icl.m4 b/tools/topology/platform/intel/icl.m4 index 9671289fd..5ac76905b 100644 --- a/tools/topology/platform/intel/icl.m4 +++ b/tools/topology/platform/intel/icl.m4 @@ -36,3 +36,15 @@ W_VENDORTUPLES(pipe_dai_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "5000"')) W_DATA(pipe_dai_schedule_plat, pipe_dai_schedule_plat_tokens) + +#SSP setting for ICL platform +undefine(`SSP_INDEX') +define(`SSP_INDEX', 0) + +undefine(`SSP_NAME') +define(`SSP_NAME', `SSP0-Codec') + +undefine(`SSP_MCLK_RATE') +define(`SSP_MCLK_RATE', `19200000') + +include(`platform/intel/dmic.m4') diff --git a/tools/topology/platform/intel/whl.m4 b/tools/topology/platform/intel/whl.m4 new file mode 100644 index 000000000..185adcdff --- /dev/null +++ b/tools/topology/platform/intel/whl.m4 @@ -0,0 +1,13 @@ +include(`platform/intel/cnl.m4') + +#SSP setting for WHL platform +undefine(`SSP_INDEX') +define(`SSP_INDEX', 1) + +undefine(`SSP_NAME') +define(`SSP_NAME', `SSP1-Codec') + +undefine(`SSP_MCLK_RATE') +define(`SSP_MCLK_RATE', `24000000') + +include(`platform/intel/dmic.m4') diff --git a/tools/topology/sof-cml-demux-rt5682.m4 b/tools/topology/sof-cml-demux-rt5682.m4 index d90950beb..64e958355 100644 --- a/tools/topology/sof-cml-demux-rt5682.m4 +++ b/tools/topology/sof-cml-demux-rt5682.m4 @@ -14,18 +14,11 @@ include(`common/tlv.m4') # Include Token library include(`sof/tokens.m4') -# Include Cannonlake DSP configuration -include(`platform/intel/cnl.m4') -include(`platform/intel/dmic.m4') +# Include platform specific DSP configuration +include(`platform/intel/'PLATFORM`.m4') DEBUG_START -undefine(`SSP_INDEX') -define(`SSP_INDEX', ifelse(PLATFORM, `whl', `1', - ifelse(PLATFORM, `cml', `0', `'))) -undefine(`SSP_NAME') -define(`SSP_NAME', ifelse(PLATFORM, `whl', `SSP1-Codec', - ifelse(PLATFORM, `cml', `SSP0-Codec', `'))) # # Define the pipelines diff --git a/tools/topology/sof-cml-rt5682-kwd.m4 b/tools/topology/sof-cml-rt5682-kwd.m4 index 45c55d6aa..033a9f9dd 100644 --- a/tools/topology/sof-cml-rt5682-kwd.m4 +++ b/tools/topology/sof-cml-rt5682-kwd.m4 @@ -14,31 +14,13 @@ include(`common/tlv.m4') # Include Token library include(`sof/tokens.m4') -# Include Cannonlake or Icelake DSP configuration -ifelse(PLATFORM, `icl', include(`platform/intel/icl.m4'), - ifelse(PLATFORM, `whl', include(`platform/intel/cnl.m4'), - ifelse(PLATFORM, `cml', include(`platform/intel/cnl.m4'), `'))) -include(`platform/intel/dmic.m4') +# Include Platform specific DSP configuration +include(`platform/intel/'PLATFORM`.m4') define(KWD_PIPE_SCH_DEADLINE_US, 20000) DEBUG_START -undefine(`SSP_INDEX') -define(`SSP_INDEX', ifelse(PLATFORM, `icl', `0', - ifelse(PLATFORM, `whl', `1', - ifelse(PLATFORM, `cml', `0', `')))) - -undefine(`SSP_NAME') -define(`SSP_NAME', ifelse(PLATFORM, `icl', `SSP0-Codec', - ifelse(PLATFORM, `whl', `SSP1-Codec', - ifelse(PLATFORM, `cml', `SSP0-Codec', `')))) - -undefine(`SSP_MCLK_RATE') -define(`SSP_MCLK_RATE', ifelse(PLATFORM, `icl', `19200000', - ifelse(PLATFORM, `whl', `24000000', - ifelse(PLATFORM, `cml', `24000000', `')))) - # # Define the pipelines # diff --git a/tools/topology/sof-cml-rt5682.m4 b/tools/topology/sof-cml-rt5682.m4 index f3bbe0b82..cbab2009b 100644 --- a/tools/topology/sof-cml-rt5682.m4 +++ b/tools/topology/sof-cml-rt5682.m4 @@ -14,29 +14,11 @@ include(`common/tlv.m4') # Include Token library include(`sof/tokens.m4') -# Include Cannonlake or Icelake DSP configuration -ifelse(PLATFORM, `icl', include(`platform/intel/icl.m4'), - ifelse(PLATFORM, `whl', include(`platform/intel/cnl.m4'), - ifelse(PLATFORM, `cml', include(`platform/intel/cnl.m4'), `'))) -include(`platform/intel/dmic.m4') +# Include Platform specific DSP configuration +include(`platform/intel/'PLATFORM`.m4') DEBUG_START -undefine(`SSP_INDEX') -define(`SSP_INDEX', ifelse(PLATFORM, `icl', `0', - ifelse(PLATFORM, `whl', `1', - ifelse(PLATFORM, `cml', `0', `')))) - -undefine(`SSP_NAME') -define(`SSP_NAME', ifelse(PLATFORM, `icl', `SSP0-Codec', - ifelse(PLATFORM, `whl', `SSP1-Codec', - ifelse(PLATFORM, `cml', `SSP0-Codec', `')))) - -undefine(`SSP_MCLK_RATE') -define(`SSP_MCLK_RATE', ifelse(PLATFORM, `icl', `19200000', - ifelse(PLATFORM, `whl', `24000000', - ifelse(PLATFORM, `cml', `24000000', `')))) - # # Define the pipelines # diff --git a/tools/topology/sof-cml-rt700.m4 b/tools/topology/sof-cml-rt700.m4 index a9c53761a..55a4362ff 100644 --- a/tools/topology/sof-cml-rt700.m4 +++ b/tools/topology/sof-cml-rt700.m4 @@ -14,8 +14,7 @@ include(`common/tlv.m4') include(`sof/tokens.m4') # Include CML DSP configuration -include(`platform/intel/cnl.m4') -include(`platform/intel/dmic.m4') +include(`platform/intel/cml.m4') DEBUG_START diff --git a/tools/topology/sof-cml-src-rt5682.m4 b/tools/topology/sof-cml-src-rt5682.m4 index e737ef95c..a3b9b5d8a 100644 --- a/tools/topology/sof-cml-src-rt5682.m4 +++ b/tools/topology/sof-cml-src-rt5682.m4 @@ -14,9 +14,8 @@ include(`common/tlv.m4') # Include Token library include(`sof/tokens.m4') -# Include Cannonlake DSP configuration -include(`platform/intel/cnl.m4') -include(`platform/intel/dmic.m4') +# Include Cometlake DSP configuration +include(`platform/intel/cml.m4') DEBUG_START diff --git a/tools/topology/sof-cnl-rt274.m4 b/tools/topology/sof-cnl-rt274.m4 index d7d7f2e49..3b9b25da7 100644 --- a/tools/topology/sof-cnl-rt274.m4 +++ b/tools/topology/sof-cnl-rt274.m4 @@ -14,7 +14,7 @@ include(`common/tlv.m4') # Include Token library include(`sof/tokens.m4') -# Include Apollolake DSP configuration +# Include Cannonlake DSP configuration include(`platform/intel/cnl.m4') # diff --git a/tools/topology/sof-icl-dmic-4ch.m4 b/tools/topology/sof-icl-dmic-4ch.m4 index 0080751e2..ba95b4de3 100644 --- a/tools/topology/sof-icl-dmic-4ch.m4 +++ b/tools/topology/sof-icl-dmic-4ch.m4 @@ -13,9 +13,8 @@ include(`common/tlv.m4') # Include Token library include(`sof/tokens.m4') -# Include Apollolake DSP configuration -include(`platform/intel/bxt.m4') -include(`platform/intel/dmic.m4') +# Include IceLake DSP configuration +include(`platform/intel/icl.m4') # # Define the pipelines diff --git a/tools/topology/sof-icl-rt700.m4 b/tools/topology/sof-icl-rt700.m4 index 73404be13..8efbb4db6 100644 --- a/tools/topology/sof-icl-rt700.m4 +++ b/tools/topology/sof-icl-rt700.m4 @@ -13,9 +13,8 @@ include(`common/tlv.m4') # Include Token library include(`sof/tokens.m4') -# Include ICL DSP configuration +# Include Icelake DSP configuration include(`platform/intel/icl.m4') -include(`platform/intel/dmic.m4') DEBUG_START diff --git a/tools/topology/sof-icl-rt711-rt1308-rt715-hdmi.m4 b/tools/topology/sof-icl-rt711-rt1308-rt715-hdmi.m4 index 17eacf46c..a53b11e0e 100644 --- a/tools/topology/sof-icl-rt711-rt1308-rt715-hdmi.m4 +++ b/tools/topology/sof-icl-rt711-rt1308-rt715-hdmi.m4 @@ -13,11 +13,8 @@ include(`common/tlv.m4') # Include Token library include(`sof/tokens.m4') -ifelse(PLATFORM, `icl', include(`platform/intel/icl.m4'), - ifelse(PLATFORM, `cml-mono', include(`platform/intel/cnl.m4'), - ifelse(PLATFORM, `cml', include(`platform/intel/cnl.m4'), `'))) - -ifelse(PLATFORM, `cml-mono', `define(`MONO', `')', `') +# Include Platform specific DSP configuration +include(`platform/intel/'PLATFORM`.m4') DEBUG_START diff --git a/tools/topology/sof-icl-rt711-rt1308-rt715.m4 b/tools/topology/sof-icl-rt711-rt1308-rt715.m4 index 4ea201c1e..8b8fe5c65 100644 --- a/tools/topology/sof-icl-rt711-rt1308-rt715.m4 +++ b/tools/topology/sof-icl-rt711-rt1308-rt715.m4 @@ -13,7 +13,7 @@ include(`common/tlv.m4') # Include Token library include(`sof/tokens.m4') -# Include ICL DSP configuration +# Include Icelake DSP configuration include(`platform/intel/icl.m4') DEBUG_START