Sound-open-firmware
Threads by month
- ----- 2025 -----
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
June 2018
- 18 participants
- 90 discussions

[Sound-open-firmware] [PATCH] pipeline: remove dmac id and dmac chan from static pipeline host and dai defs
by Ranjani Sridharan 13 Jun '18
by Ranjani Sridharan 13 Jun '18
13 Jun '18
dmac id and dmac chan no longer come from topology. So remove them.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan(a)linux.intel.com>
---
src/audio/pipeline_static.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/audio/pipeline_static.c b/src/audio/pipeline_static.c
index cf71a36..f13a4c5 100644
--- a/src/audio/pipeline_static.c
+++ b/src/audio/pipeline_static.c
@@ -86,11 +86,11 @@
#define SPIPE_COMP(cid, ctype, csize) \
{.id = cid, .type = ctype, .hdr.size = sizeof(struct csize)}
#define SPIPE_HOST(scomp, hno_irq, hdmac, hchan, hconfig) \
- {.comp = scomp, .no_irq = hno_irq, .dmac_id = hdmac,\
- .dmac_chan = hchan, .dmac_config = hconfig}
+ {.comp = scomp, .no_irq = hno_irq, \
+ .dmac_config = hconfig}
#define SPIPE_DAI(scomp, ddai_type, ddai_idx, ddmac, dchan, dconfig) \
- {.comp = scomp, .type = ddai_type, .index = ddai_idx, .dmac_id = ddmac,\
- .dmac_chan = dchan, .dmac_config = dconfig}
+ {.comp = scomp, .type = ddai_type, .index = ddai_idx, \
+ .dmac_config = dconfig}
#define SPIPE_VOL(scomp, vmin, vmax) \
{.comp = scomp, .min_value = vmin, .max_value = vmax}
#define SPIPE_MIX(scomp) {.comp = scomp}
--
2.17.1
1
0

[Sound-open-firmware] [PATCH] ipc: remove dmac id and dmac chan members from host and dai ipc comp def
by Ranjani Sridharan 13 Jun '18
by Ranjani Sridharan 13 Jun '18
13 Jun '18
The new dma_get() API does not use the dmac id and dmac chan info
from topology anymore. So remove these members from the host/dai
ipc comp def.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan(a)linux.intel.com>
---
src/include/uapi/ipc.h | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/include/uapi/ipc.h b/src/include/uapi/ipc.h
index 88de113..8895ff3 100644
--- a/src/include/uapi/ipc.h
+++ b/src/include/uapi/ipc.h
@@ -657,8 +657,6 @@ struct sof_ipc_comp_host {
struct sof_ipc_comp_config config;
enum sof_ipc_stream_direction direction;
uint32_t no_irq; /* don't send periodic IRQ to host/DSP */
- uint32_t dmac_id;
- uint32_t dmac_chan;
uint32_t dmac_config; /* DMA engine specific */
} __attribute__((packed));
@@ -669,8 +667,6 @@ struct sof_ipc_comp_dai {
enum sof_ipc_stream_direction direction;
uint32_t index;
enum sof_ipc_dai_type type;
- uint32_t dmac_id;
- uint32_t dmac_chan;
uint32_t dmac_config; /* DMA engine specific */
} __attribute__((packed));
--
2.17.1
1
0

[Sound-open-firmware] [PATCH] topology: remove DMAC ID/DMAC_CHANNEL from PIPELINE/PCM/DAI definitions
by Ranjani Sridharan 12 Jun '18
by Ranjani Sridharan 12 Jun '18
12 Jun '18
The firmware no longer uses the DMAC ID and channel info from topology.
Signed-off-by: Ranjani Sridharan <ranjani.sridharan(a)linux.intel.com>
---
topology/dsps/bdw.m4 | 15 ---------
topology/dsps/bxt.m4 | 15 ---------
topology/dsps/byt.m4 | 15 ---------
topology/dsps/cht.m4 | 15 ---------
topology/dsps/cnl.m4 | 15 ---------
topology/dsps/hsw.m4 | 15 ---------
topology/m4/dai.m4 | 6 ++--
topology/m4/pcm.m4 | 38 +++++------------------
topology/m4/pipeline.m4 | 22 +++++--------
topology/sof-apl-nocodec.m4 | 9 ++----
topology/sof-apl-tdf8532.m4 | 30 ++++++------------
topology/sof-bdw-rt286.m4 | 9 ++----
topology/sof-bdw-rt5640.m4 | 9 ++----
topology/sof-byt-da7213.m4 | 9 ++----
topology/sof-byt-nocodec.m4 | 9 ++----
topology/sof-byt-rt5640.m4 | 9 ++----
topology/sof-byt-rt5645.m4 | 9 ++----
topology/sof-byt-rt5651.m4 | 9 ++----
topology/sof-cht-max98090.m4 | 9 ++----
topology/sof-cht-nocodec.m4 | 9 ++----
topology/sof-cnl-rt274.m4 | 6 ++--
topology/sof-hsw-rt5640.m4 | 9 ++----
topology/sof/pipe-dai-capture.m4 | 2 +-
topology/sof/pipe-dai-playback.m4 | 2 +-
topology/sof/pipe-low-latency-capture.m4 | 4 +--
topology/sof/pipe-low-latency-playback.m4 | 4 +--
topology/sof/pipe-passthrough-capture.m4 | 4 +--
topology/sof/pipe-passthrough-playback.m4 | 4 +--
topology/sof/pipe-pcm-media.m4 | 4 +--
topology/sof/pipe-src-capture.m4 | 4 +--
topology/sof/pipe-src-playback.m4 | 4 +--
topology/sof/pipe-volume-capture.m4 | 4 +--
topology/sof/pipe-volume-playback.m4 | 4 +--
topology/sof/tokens.m4 | 4 ---
topology/test/test-all.m4 | 6 ++--
topology/test/test-capture.m4 | 3 +-
topology/test/test-playback.m4 | 3 +-
37 files changed, 86 insertions(+), 261 deletions(-)
diff --git a/topology/dsps/bdw.m4 b/topology/dsps/bdw.m4
index c2bf04e..1af6699 100644
--- a/topology/dsps/bdw.m4
+++ b/topology/dsps/bdw.m4
@@ -25,21 +25,6 @@ W_VENDORTUPLES(pipe_tone_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF
W_DATA(pipe_tone_schedule_plat, pipe_tone_schedule_plat_tokens)
-# DAI0 platform playback configuration
-W_VENDORTUPLES(dai0p_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC_CHAN "0"'))
-
-W_DATA(dai0p_plat_conf, dai0p_plat_tokens)
-
-# DAI0 platform capture configuration
-W_VENDORTUPLES(dai0c_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC_CHAN "1"'))
-
-W_DATA(dai0c_plat_conf, dai0c_plat_tokens)
-
-# PCM platform configuration
-W_VENDORTUPLES(pcm_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC PIPELINE_DMAC', `SOF_TKN_DAI_DMAC_CHAN PIPELINE_DMAC_CHAN'))
-
-W_DATA(pcm_plat_conf, pcm_plat_tokens)
-
# DAI schedule Configuration - scheduled by IRQ
W_VENDORTUPLES(pipe_dai_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "5000"'))
diff --git a/topology/dsps/bxt.m4 b/topology/dsps/bxt.m4
index 472fa88..7626513 100644
--- a/topology/dsps/bxt.m4
+++ b/topology/dsps/bxt.m4
@@ -28,21 +28,6 @@ W_VENDORTUPLES(pipe_tone_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF
W_DATA(pipe_tone_schedule_plat, pipe_tone_schedule_plat_tokens)
-# DAI0 platform playback configuration
-W_VENDORTUPLES(dai0p_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC_CHAN "0"'))
-
-W_DATA(dai0p_plat_conf, dai0p_plat_tokens)
-
-# DAI0 platform capture configuration
-W_VENDORTUPLES(dai0c_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC "0"', `SOF_TKN_DAI_DMAC_CHAN "1"'))
-
-W_DATA(dai0c_plat_conf, dai0c_plat_tokens)
-
-# PCM platform configuration
-W_VENDORTUPLES(pcm_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC PIPELINE_DMAC', `SOF_TKN_DAI_DMAC_CHAN PIPELINE_DMAC_CHAN'))
-
-W_DATA(pcm_plat_conf, pcm_plat_tokens)
-
# DAI schedule Configuration - scheduled by IRQ
W_VENDORTUPLES(pipe_dai_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "5000"'))
diff --git a/topology/dsps/byt.m4 b/topology/dsps/byt.m4
index d1d4886..a25d993 100644
--- a/topology/dsps/byt.m4
+++ b/topology/dsps/byt.m4
@@ -25,21 +25,6 @@ W_VENDORTUPLES(pipe_tone_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF
W_DATA(pipe_tone_schedule_plat, pipe_tone_schedule_plat_tokens)
-# DAI0 platform playback configuration
-W_VENDORTUPLES(dai0p_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC_CHAN "0"'))
-
-W_DATA(dai0p_plat_conf, dai0p_plat_tokens)
-
-# DAI0 platform capture configuration
-W_VENDORTUPLES(dai0c_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC_CHAN "1"'))
-
-W_DATA(dai0c_plat_conf, dai0c_plat_tokens)
-
-# PCM platform configuration
-W_VENDORTUPLES(pcm_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC PIPELINE_DMAC', `SOF_TKN_DAI_DMAC_CHAN PIPELINE_DMAC_CHAN'))
-
-W_DATA(pcm_plat_conf, pcm_plat_tokens)
-
# DAI schedule Configuration - scheduled by IRQ
W_VENDORTUPLES(pipe_dai_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "5000"'))
diff --git a/topology/dsps/cht.m4 b/topology/dsps/cht.m4
index 4ed114f..b6317cd 100644
--- a/topology/dsps/cht.m4
+++ b/topology/dsps/cht.m4
@@ -25,21 +25,6 @@ W_VENDORTUPLES(pipe_tone_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF
W_DATA(pipe_tone_schedule_plat, pipe_tone_schedule_plat_tokens)
-# DAI0 platform playback configuration
-W_VENDORTUPLES(dai0p_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC_CHAN "0"'))
-
-W_DATA(dai0p_plat_conf, dai0p_plat_tokens)
-
-# DAI0 platform capture configuration
-W_VENDORTUPLES(dai0c_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC_CHAN "1"'))
-
-W_DATA(dai0c_plat_conf, dai0c_plat_tokens)
-
-# PCM platform configuration
-W_VENDORTUPLES(pcm_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC PIPELINE_DMAC', `SOF_TKN_DAI_DMAC_CHAN PIPELINE_DMAC_CHAN'))
-
-W_DATA(pcm_plat_conf, pcm_plat_tokens)
-
# DAI schedule Configuration - scheduled by IRQ
W_VENDORTUPLES(pipe_dai_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "5000"'))
diff --git a/topology/dsps/cnl.m4 b/topology/dsps/cnl.m4
index 41ece94..96bf6de 100644
--- a/topology/dsps/cnl.m4
+++ b/topology/dsps/cnl.m4
@@ -29,21 +29,6 @@ W_VENDORTUPLES(pipe_tone_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF
W_DATA(pipe_tone_schedule_plat, pipe_tone_schedule_plat_tokens)
-# DAI0 platform playback configuration
-W_VENDORTUPLES(dai0p_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC_CHAN "0"'))
-
-W_DATA(dai0p_plat_conf, dai0p_plat_tokens)
-
-# DAI0 platform capture configuration
-W_VENDORTUPLES(dai0c_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC_CHAN "1"'))
-
-W_DATA(dai0c_plat_conf, dai0c_plat_tokens)
-
-# PCM platform configuration
-W_VENDORTUPLES(pcm_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC PIPELINE_DMAC', `SOF_TKN_DAI_DMAC_CHAN PIPELINE_DMAC_CHAN'))
-
-W_DATA(pcm_plat_conf, pcm_plat_tokens)
-
# DAI schedule Configuration - scheduled by IRQ
W_VENDORTUPLES(pipe_dai_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "5000"'))
diff --git a/topology/dsps/hsw.m4 b/topology/dsps/hsw.m4
index 754fc41..c096732 100644
--- a/topology/dsps/hsw.m4
+++ b/topology/dsps/hsw.m4
@@ -25,21 +25,6 @@ W_VENDORTUPLES(pipe_tone_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF
W_DATA(pipe_tone_schedule_plat, pipe_tone_schedule_plat_tokens)
-# DAI0 platform playback configuration
-W_VENDORTUPLES(dai0p_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC_CHAN "0"'))
-
-W_DATA(dai0p_plat_conf, dai0p_plat_tokens)
-
-# DAI0 platform capture configuration
-W_VENDORTUPLES(dai0c_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC "1"', `SOF_TKN_DAI_DMAC_CHAN "1"'))
-
-W_DATA(dai0c_plat_conf, dai0c_plat_tokens)
-
-# PCM platform configuration
-W_VENDORTUPLES(pcm_plat_tokens, sof_dai_tokens, LIST(` ', `SOF_TKN_DAI_DMAC PIPELINE_DMAC', `SOF_TKN_DAI_DMAC_CHAN PIPELINE_DMAC_CHAN'))
-
-W_DATA(pcm_plat_conf, pcm_plat_tokens)
-
# DAI schedule Configuration - scheduled by IRQ
W_VENDORTUPLES(pipe_dai_schedule_plat_tokens, sof_sched_tokens, LIST(` ', `SOF_TKN_SCHED_MIPS "5000"'))
diff --git a/topology/m4/dai.m4 b/topology/m4/dai.m4
index a349a3c..bd67413 100644
--- a/topology/m4/dai.m4
+++ b/topology/m4/dai.m4
@@ -7,7 +7,7 @@ define(`N_DAI', DAI_NAME)
define(`N_DAI_OUT', DAI_NAME`.OUT')
define(`N_DAI_IN', DAI_NAME`.IN')
-dnl W_DAI_OUT(type, index, dai_link, format, periods_sink, periods_source, preload, data)
+dnl W_DAI_OUT(type, index, dai_link, format, periods_sink, periods_source, preload)
define(`W_DAI_OUT',
`SectionVendorTuples."'N_DAI_OUT($2)`_tuples_w_comp" {'
` tokens "sof_comp_tokens"'
@@ -57,11 +57,10 @@ define(`W_DAI_OUT',
` "'N_DAI_OUT($2)`_data_w_comp"'
` "'N_DAI_OUT($2)`_data_str"'
` "'N_DAI_OUT($2)`_data_comp_str"'
-` "'$8`"'
` ]'
`}')
-dnl W_DAI_IN(type, index, dai_link, format, periods_sink, periods_source, preload, data)
+dnl W_DAI_IN(type, index, dai_link, format, periods_sink, periods_source, preload)
define(`W_DAI_IN',
`SectionVendorTuples."'N_DAI_IN($2)`_tuples_w_comp" {'
` tokens "sof_comp_tokens"'
@@ -111,7 +110,6 @@ define(`W_DAI_IN',
` "'N_DAI_IN($2)`_data_w_comp"'
` "'N_DAI_IN($2)`_data_str"'
` "'N_DAI_IN($2)`_data_comp_str"'
-` "'$8`"'
` ]'
`}')
diff --git a/topology/m4/pcm.m4 b/topology/m4/pcm.m4
index 40a3b17..51775fb 100644
--- a/topology/m4/pcm.m4
+++ b/topology/m4/pcm.m4
@@ -6,72 +6,50 @@ dnl PCM name)
define(`N_PCMP', `PCM'$1`P')
define(`N_PCMC', `PCM'$1`C')
-dnl W_PCM_PLAYBACK(pcm, stream, dmac, dmac_chan, periods_sink, periods_source, preload)
+dnl W_PCM_PLAYBACK(pcm, stream, periods_sink, periods_source, preload)
dnl PCM platform configuration
define(`W_PCM_PLAYBACK',
`SectionVendorTuples."'N_PCMP($1)`_tuples_w_comp" {'
` tokens "sof_comp_tokens"'
` tuples."word" {'
-` SOF_TKN_COMP_PERIOD_SINK_COUNT' STR($5)
-` SOF_TKN_COMP_PERIOD_SOURCE_COUNT' STR($6)
-` SOF_TKN_COMP_PRELOAD_COUNT' STR($7)
+` SOF_TKN_COMP_PERIOD_SINK_COUNT' STR($3)
+` SOF_TKN_COMP_PERIOD_SOURCE_COUNT' STR($4)
+` SOF_TKN_COMP_PRELOAD_COUNT' STR($5)
` }'
`}'
`SectionData."'N_PCMP($1)`_data_w_comp" {'
` tuples "'N_PCMP($1)`_tuples_w_comp"'
`}'
-`SectionVendorTuples."'N_PCMP($1)`_tuples" {'
-` tokens "sof_pcm_tokens"'
-` tuples."word" {'
-` SOF_TKN_PCM_DMAC' STR($3)
-` SOF_TKN_PCM_DMAC_CHAN' STR($4)
-` }'
-`}'
-`SectionData."'N_PCMP($1)`_data" {'
-` tuples "'N_PCMP($1)`_tuples"'
-`}'
`SectionWidget."'N_PCMP($1)`" {'
` index "'PIPELINE_ID`"'
` type "aif_in"'
` no_pm "true"'
` stream_name "'$2` '$1`"'
` data ['
-` "'N_PCMP($1)`_data"'
` "'N_PCMP($1)`_data_w_comp"'
` ]'
`}')
-dnl W_PCM_CAPTURE(pcm, stream, dmac, dmac_chan, periods_sink, periods_source, preload)
+dnl W_PCM_CAPTURE(pcm, stream, periods_sink, periods_source, preload)
define(`W_PCM_CAPTURE',
`SectionVendorTuples."'N_PCMC($1)`_tuples_w_comp" {'
` tokens "sof_comp_tokens"'
` tuples."word" {'
-` SOF_TKN_COMP_PERIOD_SINK_COUNT' STR($5)
-` SOF_TKN_COMP_PERIOD_SOURCE_COUNT' STR($6)
-` SOF_TKN_COMP_PRELOAD_COUNT' STR($7)
+` SOF_TKN_COMP_PERIOD_SINK_COUNT' STR($3)
+` SOF_TKN_COMP_PERIOD_SOURCE_COUNT' STR($4)
+` SOF_TKN_COMP_PRELOAD_COUNT' STR($5)
` }'
`}'
`SectionData."'N_PCMC($1)`_data_w_comp" {'
` tuples "'N_PCMC($1)`_tuples_w_comp"'
`}'
-`SectionVendorTuples."'N_PCMC($1)`_tuples" {'
-` tokens "sof_pcm_tokens"'
-` tuples."word" {'
-` SOF_TKN_PCM_DMAC' STR($3)
-` SOF_TKN_PCM_DMAC_CHAN' STR($4)
-` }'
-`}'
-`SectionData."'N_PCMC($1)`_data" {'
-` tuples "'N_PCMC($1)`_tuples"'
-`}'
`SectionWidget."'N_PCMC($1)`" {'
` index "'PIPELINE_ID`"'
` type "aif_out"'
` no_pm "true"'
` stream_name "'$2` '$1`"'
` data ['
-` "'N_PCMC($1)`_data"'
` "'N_PCMC($1)`_data_w_comp"'
` ]'
`}')
diff --git a/topology/m4/pipeline.m4 b/topology/m4/pipeline.m4
index 7a91439..0cfe486 100644
--- a/topology/m4/pipeline.m4
+++ b/topology/m4/pipeline.m4
@@ -33,7 +33,7 @@ define(`W_PIPELINE',
dnl PIPELINE_PCM_ADD(pipeline,
dnl pipe id, pcm, max channels, format,
-dnl frames, deadline, priority, core, dmac, dmac_chan)
+dnl frames, deadline, priority, core)
define(`PIPELINE_PCM_ADD',
`undefine(`PCM_ID')'
`undefine(`PIPELINE_ID')'
@@ -43,8 +43,6 @@ define(`PIPELINE_PCM_ADD',
`undefine(`SCHEDULE_DEADLINE')'
`undefine(`SCHEDULE_PRIORITY')'
`undefine(`SCHEDULE_CORE')'
-`undefine(`PIPELINE_DMAC')'
-`undefine(`PIPELINE_DMAC_CHAN')'
`define(`PIPELINE_ID', $2)'
`define(`PCM_ID', $3)'
`define(`PIPELINE_CHANNELS', $4)'
@@ -53,14 +51,12 @@ define(`PIPELINE_PCM_ADD',
`define(`SCHEDULE_DEADLINE', $7)'
`define(`SCHEDULE_PRIORITY', $8)'
`define(`SCHEDULE_CORE', $9)'
-`define(`PIPELINE_DMAC', $10)'
-`define(`PIPELINE_DMAC_CHAN', $11)'
`include($1)'
)
dnl PIPELINE_PCM_DAI_ADD(pipeline,
dnl pipe id, pcm, max channels, format,
-dnl frames, deadline, priority, core, dmac, dmac_chan,
+dnl frames, deadline, priority, core,
dnl dai type, dai_index, dai format, periods)
define(`PIPELINE_PCM_DAI_ADD',
`undefine(`PCM_ID')'
@@ -71,8 +67,6 @@ define(`PIPELINE_PCM_DAI_ADD',
`undefine(`SCHEDULE_DEADLINE')'
`undefine(`SCHEDULE_PRIORITY')'
`undefine(`SCHEDULE_CORE')'
-`undefine(`PIPELINE_DMAC')'
-`undefine(`PIPELINE_DMAC_CHAN')'
`undefine(`DAI_TYPE')'
`undefine(`DAI_INDEX')'
`undefine(`DAI_FORMAT')'
@@ -85,13 +79,11 @@ define(`PIPELINE_PCM_DAI_ADD',
`define(`SCHEDULE_DEADLINE', $7)'
`define(`SCHEDULE_PRIORITY', $8)'
`define(`SCHEDULE_CORE', $9)'
-`define(`PIPELINE_DMAC', $10)'
-`define(`PIPELINE_DMAC_CHAN', $11)'
-`define(`DAI_TYPE', STR($12))'
-`define(`DAI_INDEX', STR($13))'
-`define(`DAI_FORMAT', $14)'
-`define(`DAI_PERIODS', $15)'
-`define(`DAI_NAME', $12$13)'
+`define(`DAI_TYPE', STR($10))'
+`define(`DAI_INDEX', STR($11))'
+`define(`DAI_FORMAT', $12)'
+`define(`DAI_PERIODS', $13)'
+`define(`DAI_NAME', $10$11)'
`include($1)'
)
diff --git a/topology/sof-apl-nocodec.m4 b/topology/sof-apl-nocodec.m4
index ac3ee75..32a3b86 100644
--- a/topology/sof-apl-nocodec.m4
+++ b/topology/sof-apl-nocodec.m4
@@ -30,24 +30,21 @@ include(`dsps/bxt.m4')
# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4,
1, 0, 2, s32le,
- 48, 1000, 0, 0, 0, 1)
+ 48, 1000, 0, 0)
# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 2 for PCM audio capture data
PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4,
2, 0, 2, s32le,
- 48, 1000, 0, 0, 0, 2)
+ 48, 1000, 0, 0)
# PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le.
# Schedule 96 frames per 2000us deadline on core 0 with priority 1
-# Use DMAC 0 channel 3 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4,
3, 1, 2, s32le,
- 96, 2000, 1, 0, 0, 3)
+ 96, 2000, 1, 0)
# Tone Playback pipeline 5 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 2
diff --git a/topology/sof-apl-tdf8532.m4 b/topology/sof-apl-tdf8532.m4
index 776f8d5..a0b44e2 100644
--- a/topology/sof-apl-tdf8532.m4
+++ b/topology/sof-apl-tdf8532.m4
@@ -33,73 +33,63 @@ include(`dsps/bxt.m4')
# Low Latency playback pipeline 1 on PCM 0 using max 4 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_DAI_ADD(sof/pipe-volume-playback.m4,
1, 0, 4, s32le,
- 48, 1000, 0, 0, 0, 1, SSP, 4, s32le, 2)
+ 48, 1000, 0, 0, SSP, 4, s32le, 2)
# Low Latency playback pipeline 2 on PCM 1 using max 8 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_DAI_ADD(sof/pipe-volume-playback.m4,
2, 1, 8, s32le,
- 48, 1000, 0, 0, 0, 1, SSP, 2, s32le, 2)
+ 48, 1000, 0, 0, SSP, 2, s32le, 2)
# Low Latency capture pipeline 3 on PCM 1 using max 8 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4,
3, 1, 8, s32le,
- 48, 1000, 0, 0, 0, 1, SSP, 2, s32le, 2)
+ 48, 1000, 0, 0, SSP, 2, s32le, 2)
# Low Latency playback pipeline 4 on PCM 2 using max 2 channels of s16le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_DAI_ADD(sof/pipe-volume-playback.m4,
4, 2, 2, s16le,
- 48, 1000, 0, 0, 0, 1, SSP, 0, s16le, 2)
+ 48, 1000, 0, 0, SSP, 0, s16le, 2)
# Low Latency capture pipeline 5 on PCM 2 using max 2 channels of s16le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4,
5, 2, 2, s16le,
- 48, 1000, 0, 0, 0, 1, SSP, 0, s16le, 2)
+ 48, 1000, 0, 0, SSP, 0, s16le, 2)
# Low Latency capture pipeline 6 on PCM 3 using max 2 channels of s16le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4,
6, 3, 2, s16le,
- 48, 1000, 0, 0, 0, 1, SSP, 1, s16le, 2)
+ 48, 1000, 0, 0, SSP, 1, s16le, 2)
# Low Latency playback pipeline 7 on PCM 4 using max 2 channels of s16le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_DAI_ADD(sof/pipe-volume-playback.m4,
7, 4, 2, s16le,
- 48, 1000, 0, 0, 0, 1, SSP, 3, s16le, 2)
+ 48, 1000, 0, 0, SSP, 3, s16le, 2)
# Low Latency capture pipeline 8 on PCM 4 using max 2 channels of s16le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4,
8, 4, 2, s16le,
- 48, 1000, 0, 0, 0, 1, SSP, 3, s16le, 2)
+ 48, 1000, 0, 0, SSP, 3, s16le, 2)
# Low Latency playback pipeline 9 on PCM 5 using max 2 channels of s16le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_DAI_ADD(sof/pipe-volume-playback.m4,
9, 5, 2, s16le,
- 48, 1000, 0, 0, 0, 1, SSP, 5, s16le, 2)
+ 48, 1000, 0, 0, SSP, 5, s16le, 2)
# Low Latency capture pipeline 10 on PCM 5 using max 2 channels of s16le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4,
10, 5, 2, s16le,
- 48, 1000, 0, 0, 0, 1, SSP, 5, s16le, 2)
+ 48, 1000, 0, 0, SSP, 5, s16le, 2)
#
diff --git a/topology/sof-bdw-rt286.m4 b/topology/sof-bdw-rt286.m4
index 6d09e2e..d1ef535 100644
--- a/topology/sof-bdw-rt286.m4
+++ b/topology/sof-bdw-rt286.m4
@@ -30,24 +30,21 @@ include(`dsps/bdw.m4')
# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4,
1, 0, 2, s32le,
- 48, 1000, 0, 0, 1, 1)
+ 48, 1000, 0, 0)
# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 2 for PCM audio capture data
PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4,
2, 0, 2, s32le,
- 48, 1000, 0, 0, 1, 2)
+ 48, 1000, 0, 0)
# PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le.
# Schedule 96 frames per 2000us deadline on core 0 with priority 1
-# Use DMAC 0 channel 3 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4,
3, 1, 2, s32le,
- 96, 2000, 1, 0, 1, 3)
+ 96, 2000, 1, 0)
# Tone Playback pipeline 5 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 2
diff --git a/topology/sof-bdw-rt5640.m4 b/topology/sof-bdw-rt5640.m4
index 2f9badb..258ecc4 100644
--- a/topology/sof-bdw-rt5640.m4
+++ b/topology/sof-bdw-rt5640.m4
@@ -30,24 +30,21 @@ include(`dsps/bdw.m4')
# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4,
1, 0, 2, s32le,
- 48, 1000, 0, 0, 1, 1)
+ 48, 1000, 0, 0)
# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 2 for PCM audio capture data
PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4,
2, 0, 2, s32le,
- 48, 1000, 0, 0, 1, 2)
+ 48, 1000, 0, 0)
# PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le.
# Schedule 96 frames per 2000us deadline on core 0 with priority 1
-# Use DMAC 0 channel 3 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4,
3, 1, 2, s32le,
- 96, 2000, 1, 0, 1, 3)
+ 96, 2000, 1, 0)
# Tone Playback pipeline 5 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 2
diff --git a/topology/sof-byt-da7213.m4 b/topology/sof-byt-da7213.m4
index 090b034..a89e51b 100644
--- a/topology/sof-byt-da7213.m4
+++ b/topology/sof-byt-da7213.m4
@@ -30,24 +30,21 @@ include(`dsps/byt.m4')
# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4,
1, 0, 2, s32le,
- 48, 1000, 0, 0, 0, 1)
+ 48, 1000, 0, 0)
# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 2 for PCM audio capture data
PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4,
2, 0, 2, s32le,
- 48, 1000, 0, 0, 0, 2)
+ 48, 1000, 0, 0)
# PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 1
-# Use DMAC 0 channel 3 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4,
3, 1, 2, s32le,
- 192, 4000, 1, 0, 0, 3)
+ 192, 4000, 1, 0)
# Tone Playback pipeline 5 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 2
diff --git a/topology/sof-byt-nocodec.m4 b/topology/sof-byt-nocodec.m4
index 9bed36e..b305d27 100644
--- a/topology/sof-byt-nocodec.m4
+++ b/topology/sof-byt-nocodec.m4
@@ -30,24 +30,21 @@ include(`dsps/byt.m4')
# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4,
1, 0, 2, s32le,
- 48, 1000, 0, 0, 0, 1)
+ 48, 1000, 0, 0)
# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 2 for PCM audio capture data
PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4,
2, 0, 2, s32le,
- 48, 1000, 0, 0, 0, 2)
+ 48, 1000, 0, 0)
# PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 1
-# Use DMAC 0 channel 3 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4,
3, 1, 2, s32le,
- 192, 4000, 1, 0, 0, 3)
+ 192, 4000, 1, 0)
# Tone Playback pipeline 5 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 2
diff --git a/topology/sof-byt-rt5640.m4 b/topology/sof-byt-rt5640.m4
index f852616..aafa10f 100644
--- a/topology/sof-byt-rt5640.m4
+++ b/topology/sof-byt-rt5640.m4
@@ -30,24 +30,21 @@ include(`dsps/byt.m4')
# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4,
1, 0, 2, s32le,
- 48, 1000, 0, 0, 0, 1)
+ 48, 1000, 0, 0)
# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 2 for PCM audio capture data
PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4,
2, 0, 2, s32le,
- 48, 1000, 0, 0, 0, 2)
+ 48, 1000, 0, 0)
# PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 1
-# Use DMAC 0 channel 3 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4,
3, 1, 2, s32le,
- 192, 4000, 1, 0, 0, 3)
+ 192, 4000, 1, 0)
# Tone Playback pipeline 5 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 2
diff --git a/topology/sof-byt-rt5645.m4 b/topology/sof-byt-rt5645.m4
index 7d8eee5..415bc0a 100644
--- a/topology/sof-byt-rt5645.m4
+++ b/topology/sof-byt-rt5645.m4
@@ -30,24 +30,21 @@ include(`dsps/byt.m4')
# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4,
1, 0, 2, s32le,
- 48, 1000, 0, 0, 0, 1)
+ 48, 1000, 0, 0)
# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 2 for PCM audio capture data
PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4,
2, 0, 2, s32le,
- 48, 1000, 0, 0, 0, 2)
+ 48, 1000, 0, 0)
# PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 1
-# Use DMAC 0 channel 3 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4,
3, 1, 2, s32le,
- 192, 4000, 1, 0, 0, 3)
+ 192, 4000, 1, 0)
# Tone Playback pipeline 5 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 2
diff --git a/topology/sof-byt-rt5651.m4 b/topology/sof-byt-rt5651.m4
index 894602a..14e45c0 100644
--- a/topology/sof-byt-rt5651.m4
+++ b/topology/sof-byt-rt5651.m4
@@ -30,24 +30,21 @@ include(`dsps/byt.m4')
# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4,
1, 0, 2, s32le,
- 48, 1000, 0, 0, 0, 1)
+ 48, 1000, 0, 0)
# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 2 for PCM audio capture data
PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4,
2, 0, 2, s32le,
- 48, 1000, 0, 0, 0, 2)
+ 48, 1000, 0, 0)
# PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 1
-# Use DMAC 0 channel 3 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4,
3, 1, 2, s32le,
- 192, 4000, 1, 0, 0, 3)
+ 192, 4000, 1, 0)
# Tone Playback pipeline 5 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 2
diff --git a/topology/sof-cht-max98090.m4 b/topology/sof-cht-max98090.m4
index 2d5192a..e02056c 100644
--- a/topology/sof-cht-max98090.m4
+++ b/topology/sof-cht-max98090.m4
@@ -30,24 +30,21 @@ include(`dsps/cht.m4')
# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4,
1, 0, 2, s32le,
- 48, 1000, 0, 0, 0, 1)
+ 48, 1000, 0, 0)
# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 2 for PCM audio capture data
PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4,
2, 0, 2, s32le,
- 48, 1000, 0, 0, 0, 2)
+ 48, 1000, 0, 0)
# PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 1
-# Use DMAC 0 channel 3 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4,
3, 1, 2, s32le,
- 192, 4000, 1, 0, 0, 3)
+ 192, 4000, 1, 0)
# Tone Playback pipeline 5 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 2
diff --git a/topology/sof-cht-nocodec.m4 b/topology/sof-cht-nocodec.m4
index 68abf37..f56a7a5 100644
--- a/topology/sof-cht-nocodec.m4
+++ b/topology/sof-cht-nocodec.m4
@@ -30,24 +30,21 @@ include(`dsps/cht.m4')
# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4,
1, 0, 2, s32le,
- 48, 1000, 0, 0, 0, 1)
+ 48, 1000, 0, 0)
# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 2 for PCM audio capture data
PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4,
2, 0, 2, s32le,
- 48, 1000, 0, 0, 0, 2)
+ 48, 1000, 0, 0)
# PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 1
-# Use DMAC 0 channel 3 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4,
3, 1, 2, s32le,
- 192, 4000, 1, 0, 0, 3)
+ 192, 4000, 1, 0)
# Tone Playback pipeline 5 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 2
diff --git a/topology/sof-cnl-rt274.m4 b/topology/sof-cnl-rt274.m4
index 25a4913..a805f9e 100644
--- a/topology/sof-cnl-rt274.m4
+++ b/topology/sof-cnl-rt274.m4
@@ -26,17 +26,15 @@ include(`dsps/cnl.m4')
# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_DAI_ADD(sof/pipe-volume-playback.m4,
1, 0, 2, s24le,
- 48, 1000, 0, 0, 0, 1, SSP, 0, s24le, 2)
+ 48, 1000, 0, 0, SSP, 0, s24le, 2)
# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s24le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 2 for PCM audio capture data
PIPELINE_PCM_DAI_ADD(sof/pipe-volume-capture.m4,
2, 0, 2, s24le,
- 48, 1000, 0, 0, 0, 1, SSP, 0, s24le, 2)
+ 48, 1000, 0, 0, SSP, 0, s24le, 2)
#
# DAI configuration
diff --git a/topology/sof-hsw-rt5640.m4 b/topology/sof-hsw-rt5640.m4
index 22d79d5..c99f39b 100644
--- a/topology/sof-hsw-rt5640.m4
+++ b/topology/sof-hsw-rt5640.m4
@@ -30,24 +30,21 @@ include(`dsps/hsw.m4')
# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4,
1, 0, 2, s32le,
- 48, 1000, 0, 0, 1, 1)
+ 48, 1000, 0, 0)
# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 2 for PCM audio capture data
PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4,
2, 0, 2, s32le,
- 48, 1000, 0, 0, 1, 2)
+ 48, 1000, 0, 0)
# PCM Media Playback pipeline 3 on PCM 1 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 1
-# Use DMAC 0 channel 3 for PCM audio playback data
PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4,
3, 1, 2, s32le,
- 192, 4000, 1, 0, 1, 3)
+ 192, 4000, 1, 0)
# Tone Playback pipeline 5 using max 2 channels of s32le.
# Schedule 192 frames per 4000us deadline on core 0 with priority 2
diff --git a/topology/sof/pipe-dai-capture.m4 b/topology/sof/pipe-dai-capture.m4
index 3f16f87..c69d586 100644
--- a/topology/sof/pipe-dai-capture.m4
+++ b/topology/sof/pipe-dai-capture.m4
@@ -8,7 +8,7 @@ include(`pipeline.m4')
#
# DAI definitions
#
-W_DAI_IN(DAI_TYPE, DAI_INDEX, DAI_BE, DAI_FORMAT, 2, 0, 0, dai0c_plat_conf)
+W_DAI_IN(DAI_TYPE, DAI_INDEX, DAI_BE, DAI_FORMAT, 2, 0, 0)
#
# DAI pipeline - always use 0 for DAIs
diff --git a/topology/sof/pipe-dai-playback.m4 b/topology/sof/pipe-dai-playback.m4
index 2397875..804b180 100644
--- a/topology/sof/pipe-dai-playback.m4
+++ b/topology/sof/pipe-dai-playback.m4
@@ -8,7 +8,7 @@ include(`pipeline.m4')
#
# DAI definitions
#
-W_DAI_OUT(DAI_TYPE, DAI_INDEX, DAI_BE, DAI_FORMAT, 0, 2, 2, dai0p_plat_conf)
+W_DAI_OUT(DAI_TYPE, DAI_INDEX, DAI_BE, DAI_FORMAT, 0, 2, 2)
#
# DAI pipeline - always use 0 for DAIs
diff --git a/topology/sof/pipe-low-latency-capture.m4 b/topology/sof/pipe-low-latency-capture.m4
index 39be2bc..39c2cce 100644
--- a/topology/sof/pipe-low-latency-capture.m4
+++ b/topology/sof/pipe-low-latency-capture.m4
@@ -27,9 +27,9 @@ C_CONTROLMIXER(PCM PCM_ID Capture Volume, PIPELINE_ID,
# Components and Buffers
#
-# Host "Low Latency Capture" PCM uses pipeline DMAC and channel
+# Host "Low Latency Capture" PCM
# with 0 sink and 2 source periods
-W_PCM_CAPTURE(PCM_ID, Low Latency Capture, PIPELINE_DMAC, PIPELINE_DMAC_CHAN, 0, 2, 0)
+W_PCM_CAPTURE(PCM_ID, Low Latency Capture, 0, 2, 0)
# "Capture Volume" has 2 sink and source periods for host and DAI ping-pong
W_PGA(0, PIPELINE_FORMAT, 2, 2, 0, LIST(` ', "PCM PCM_ID Capture Volume PIPELINE_ID"))
diff --git a/topology/sof/pipe-low-latency-playback.m4 b/topology/sof/pipe-low-latency-playback.m4
index b40b793..8cfe5e4 100644
--- a/topology/sof/pipe-low-latency-playback.m4
+++ b/topology/sof/pipe-low-latency-playback.m4
@@ -52,9 +52,9 @@ C_CONTROLMIXER(Master Playback Volume, PIPELINE_ID,
# Components and Buffers
#
-# Host "Low latency Playback" PCM uses pipeline DMAC and channel
+# Host "Low latency Playback" PCM
# with 2 sink and 0 source periods
-W_PCM_PLAYBACK(PCM_ID, Low Latency Playback, PIPELINE_DMAC, PIPELINE_DMAC_CHAN, 2, 0, 2)
+W_PCM_PLAYBACK(PCM_ID, Low Latency Playback, 2, 0, 2)
# "Playback Volume" has 1 sink period and 2 source periods for host ping-pong
W_PGA(0, PIPELINE_FORMAT, 1, 2, 1, LIST(` ', "PCM PCM_ID Playback Volume PIPELINE_ID"))
diff --git a/topology/sof/pipe-passthrough-capture.m4 b/topology/sof/pipe-passthrough-capture.m4
index c6850f9..1dc695c 100644
--- a/topology/sof/pipe-passthrough-capture.m4
+++ b/topology/sof/pipe-passthrough-capture.m4
@@ -15,9 +15,9 @@ include(`pipeline.m4')
# Components and Buffers
#
-# Host "Passthrough Capture" PCM uses pipeline DMAC and channel
+# Host "Passthrough Capture" PCM
# with 0 sink and 2 source periods
-W_PCM_CAPTURE(PCM_ID, Passthrough Capture, PIPELINE_DMAC, PIPELINE_DMAC_CHAN, 0, 2, 2)
+W_PCM_CAPTURE(PCM_ID, Passthrough Capture, 0, 2, 2)
# Capture Buffers
W_BUFFER(0, COMP_BUFFER_SIZE(2,
diff --git a/topology/sof/pipe-passthrough-playback.m4 b/topology/sof/pipe-passthrough-playback.m4
index e2cd645..c7c1237 100644
--- a/topology/sof/pipe-passthrough-playback.m4
+++ b/topology/sof/pipe-passthrough-playback.m4
@@ -15,9 +15,9 @@ include(`pipeline.m4')
# Components and Buffers
#
-# Host "Passthrough Playback" PCM uses pipeline DMAC and channel
+# Host "Passthrough Playback" PCM
# with 2 sink and 0 source periods
-W_PCM_PLAYBACK(PCM_ID, Passthrough Playback, PIPELINE_DMAC, PIPELINE_DMAC_CHAN, 2, 0, 2)
+W_PCM_PLAYBACK(PCM_ID, Passthrough Playback, 2, 0, 2)
# Playback Buffers
W_BUFFER(0, COMP_BUFFER_SIZE(2,
diff --git a/topology/sof/pipe-pcm-media.m4 b/topology/sof/pipe-pcm-media.m4
index 7f68977..b526e43 100644
--- a/topology/sof/pipe-pcm-media.m4
+++ b/topology/sof/pipe-pcm-media.m4
@@ -40,9 +40,9 @@ W_DATA(media_src_conf, media_src_tokens)
# Components and Buffers
#
-# Host "Low latency Playback" PCM uses pipeline DMAC and channel
+# Host "Low latency Playback" PCM
# with 2 sink and 0 source periods
-W_PCM_PLAYBACK(PCM_ID, Media Playback, PIPELINE_DMAC, PIPELINE_DMAC_CHAN, 2, 0, 2)
+W_PCM_PLAYBACK(PCM_ID, Media Playback, 2, 0, 2)
# "Playback Volume" has 2 sink period and 2 source periods for host ping-pong
W_PGA(0, PIPELINE_FORMAT, 2, 2, 2, LIST(` ', "PCM PCM_ID Playback Volume PIPELINE_ID"))
diff --git a/topology/sof/pipe-src-capture.m4 b/topology/sof/pipe-src-capture.m4
index 6211d33..e0a68e4 100644
--- a/topology/sof/pipe-src-capture.m4
+++ b/topology/sof/pipe-src-capture.m4
@@ -16,9 +16,9 @@ include(`pipeline.m4')
# Components and Buffers
#
-# Host "Passthrough Capture" PCM uses pipeline DMAC and channel
+# Host "Passthrough Capture" PCM
# with 4 sink and 0 source periods
-W_PCM_CAPTURE(PCM_ID, Passthrough Capture, PIPELINE_DMAC, PIPELINE_DMAC_CHAN, 4, 0, 2)
+W_PCM_CAPTURE(PCM_ID, Passthrough Capture, 4, 0, 2)
#
# SRC Configuration
diff --git a/topology/sof/pipe-src-playback.m4 b/topology/sof/pipe-src-playback.m4
index 119ee2c..1699198 100644
--- a/topology/sof/pipe-src-playback.m4
+++ b/topology/sof/pipe-src-playback.m4
@@ -16,9 +16,9 @@ include(`pipeline.m4')
# Components and Buffers
#
-# Host "Passthrough Playback" PCM uses pipeline DMAC and channel
+# Host "Passthrough Playback" PCM
# with 4 sink and 0 source periods
-W_PCM_PLAYBACK(PCM_ID, Passthrough Playback, PIPELINE_DMAC, PIPELINE_DMAC_CHAN, 4, 0, 2)
+W_PCM_PLAYBACK(PCM_ID, Passthrough Playback, 4, 0, 2)
#
# SRC Configuration
diff --git a/topology/sof/pipe-volume-capture.m4 b/topology/sof/pipe-volume-capture.m4
index 6b768e3..820b745 100644
--- a/topology/sof/pipe-volume-capture.m4
+++ b/topology/sof/pipe-volume-capture.m4
@@ -29,9 +29,9 @@ C_CONTROLMIXER(Master Capture Volume, PIPELINE_ID,
# Components and Buffers
#
-# Host "Passthrough Capture" PCM uses pipeline DMAC and channel
+# Host "Passthrough Capture" PCM
# with 0 sink and 2 source periods
-W_PCM_CAPTURE(PCM_ID, Passthrough Capture, PIPELINE_DMAC, PIPELINE_DMAC_CHAN, 0, 2, 2)
+W_PCM_CAPTURE(PCM_ID, Passthrough Capture, 0, 2, 2)
# "Volume" has 2 source and 2 sink periods
W_PGA(0, PIPELINE_FORMAT, 2, 2, 2, LIST(` ', "Master Capture Volume PIPELINE_ID"))
diff --git a/topology/sof/pipe-volume-playback.m4 b/topology/sof/pipe-volume-playback.m4
index f3203f7..4ebd02d 100644
--- a/topology/sof/pipe-volume-playback.m4
+++ b/topology/sof/pipe-volume-playback.m4
@@ -29,9 +29,9 @@ C_CONTROLMIXER(Master Playback Volume, PIPELINE_ID,
# Components and Buffers
#
-# Host "Passthrough Playback" PCM uses pipeline DMAC and channel
+# Host "Passthrough Playback" PCM
# with 2 sink and 0 source periods
-W_PCM_PLAYBACK(PCM_ID, Passthrough Playback, PIPELINE_DMAC, PIPELINE_DMAC_CHAN, 2, 0, 2)
+W_PCM_PLAYBACK(PCM_ID, Passthrough Playback, 2, 0, 2)
# "Volume" has 2 source and 2 sink periods
W_PGA(0, PIPELINE_FORMAT, 2, 2, 2, LIST(` ', "Master Playback Volume PIPELINE_ID"))
diff --git a/topology/sof/tokens.m4 b/topology/sof/tokens.m4
index d1230d8..f0b3428 100644
--- a/topology/sof/tokens.m4
+++ b/topology/sof/tokens.m4
@@ -15,8 +15,6 @@ SectionVendorTokens."sof_buffer_tokens" {
}
SectionVendorTokens."sof_dai_tokens" {
- SOF_TKN_DAI_DMAC "151"
- SOF_TKN_DAI_DMAC_CHAN "152"
SOF_TKN_DAI_DMAC_CONFIG "153"
SOF_TKN_DAI_TYPE "154"
SOF_TKN_DAI_INDEX "155"
@@ -43,8 +41,6 @@ SectionVendorTokens."sof_src_tokens" {
}
SectionVendorTokens."sof_pcm_tokens" {
- SOF_TKN_PCM_DMAC "351"
- SOF_TKN_PCM_DMAC_CHAN "352"
SOF_TKN_PCM_DMAC_CONFIG "353"
}
diff --git a/topology/test/test-all.m4 b/topology/test/test-all.m4
index 383a397..2a4dae4 100644
--- a/topology/test/test-all.m4
+++ b/topology/test/test-all.m4
@@ -39,21 +39,19 @@ include(`dsps/byt.m4')
# Passthrough playback pipeline 1 on PCM 0 using max 2 channels of s24le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-playback.m4,
1, 0, 2, TEST_PIPE_FORMAT,
- 48, 1000, 0, 0, 0, 1,
+ 48, 1000, 0, 0,
TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_FORMAT, 2)
# Passthrough playback pipeline 2 on PCM 0 using max 2 channels of s24le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-capture.m4,
2, 0, 2, TEST_PIPE_FORMAT,
- 48, 1000, 0, 0, 0, 1,
+ 48, 1000, 0, 0,
TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_FORMAT, 2)
#
diff --git a/topology/test/test-capture.m4 b/topology/test/test-capture.m4
index bed59c4..7e5ca86 100644
--- a/topology/test/test-capture.m4
+++ b/topology/test/test-capture.m4
@@ -39,11 +39,10 @@ include(`dsps/byt.m4')
# Passthrough playback pipeline 2 on PCM 0 using max 2 channels of s24le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-capture.m4,
2, 0, 2, TEST_PIPE_FORMAT,
- 48, 1000, 0, 0, 0, 1,
+ 48, 1000, 0, 0,
TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_FORMAT, 2)
#
diff --git a/topology/test/test-playback.m4 b/topology/test/test-playback.m4
index b0f3fec..ade8a8e 100644
--- a/topology/test/test-playback.m4
+++ b/topology/test/test-playback.m4
@@ -39,11 +39,10 @@ include(`dsps/byt.m4')
# Passthrough playback pipeline 1 on PCM 0 using max 2 channels of s24le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-# Use DMAC 0 channel 1 for PCM audio playback data
PIPELINE_PCM_DAI_ADD(sof/pipe-TEST_PIPE_NAME-playback.m4,
1, 0, 2, TEST_PIPE_FORMAT,
- 48, 1000, 0, 0, 0, 1,
+ 48, 1000, 0, 0,
TEST_DAI_TYPE, TEST_DAI_PORT, TEST_DAI_FORMAT, 2)
#
# DAI configuration
--
2.17.1
1
0
Hi,
I have a question about SOF_FW\src\include\uapi\ipc.h sof_ipc_fw_version struct.
struct sof_ipc_fw_version {
uint16_t major;
uint16_t minor;
uint16_t build;
uint8_t date[12];
uint8_t time[10];
uint8_t tag[6];
} __attribute__((packed));
First of all, what is tag, how is it used and how do we read it?
Also for date and time fields, what are the used formats for date and time and how should we retrieve them from the arrays?
--------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by
others is strictly prohibited.
2
1

12 Jun '18
From: Pan Xiuli <xiuli.pan(a)linux.intel.com>
miss some sudo command, remove all sudo command.
Signed-off-by: Pan Xiuli <xiuli.pan(a)linux.intel.com>
---
scripts/docker_build/Dockerfile | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/scripts/docker_build/Dockerfile b/scripts/docker_build/Dockerfile
index 9c6ce85..a623cda 100644
--- a/scripts/docker_build/Dockerfile
+++ b/scripts/docker_build/Dockerfile
@@ -68,14 +68,16 @@ ENV HOME /home/sof
USER sof
RUN cd /home/sof && git clone https://github.com/01org/osadsp-crosstool-ng.git /home/sof/ct-ng.git && \
-cd ct-ng.git && ./bootstrap && ./configure --prefix=`pwd` && \
+ mkdir -p /home/sof/work/ && \
+ cd ct-ng.git && ./bootstrap && ./configure --prefix=`pwd` && \
make && make install && \
for arch in byt hsw bxt cnl; do \
./ct-ng xtensa-${arch}-elf && \
- ./ct-ng build ; \
+ sed -i 's#${CT_TOP_DIR}\/builds#\/home\/sof\/work#g' .config && \
+ ./ct-ng build && \
+ ./ct-ng distclean ; \
done && \
- mkdir -p /home/sof/work/ && \
- cp -r builds/xtensa-*-elf /home/sof/work/ && cd /home/sof/ && sudo rm -rf ct-ng.git
+ cd /home/sof/ && rm -rf ct-ng.git
ENV PATH="/home/sof/work/xtensa-byt-elf/bin:${PATH}"
ENV PATH="/home/sof/work/xtensa-hsw-elf/bin:${PATH}"
@@ -91,7 +93,7 @@ RUN cd /home/sof && git clone https://github.com/jcmvbkbc/newlib-xtensa.git newl
make install && \
make distclean; \
done && \
- cd /home/sof/ && sudo rm -rf newlib-xtensa.git
+ cd /home/sof/ && rm -rf newlib-xtensa.git
# Create direcroties for the host machines sof/soft directories to be mounted.
--
2.7.4
3
2

[Sound-open-firmware] [PATCH] platform: extract common API from platform headers.
by Liam Girdwood 12 Jun '18
by Liam Girdwood 12 Jun '18
12 Jun '18
From: Marcin Maka <marcin.maka(a)linux.intel.com>
Common platform API separated to avoid duplicated declarations
and group public functions to be implemented by every platform.
Signed-off-by: Marcin Maka <marcin.maka(a)linux.intel.com>
---
src/include/sof/panic.h | 4 +-
src/include/sof/platform.h | 60 +++++++++++++++++++
.../apollolake/include/platform/platform.h | 15 ++---
.../baytrail/include/platform/platform.h | 16 ++---
.../cannonlake/include/platform/platform.h | 16 ++---
.../haswell/include/platform/platform.h | 16 ++---
6 files changed, 83 insertions(+), 44 deletions(-)
create mode 100644 src/include/sof/platform.h
diff --git a/src/include/sof/panic.h b/src/include/sof/panic.h
index 3efb659..7c19939 100644
--- a/src/include/sof/panic.h
+++ b/src/include/sof/panic.h
@@ -58,9 +58,7 @@ static inline void panic_rewind(uint32_t p, uint32_t stack_rewind_frames)
p = dump_stack(p, ext_offset, stack_rewind_frames,
count * sizeof(uint32_t));
- /* TODO: send IPC oops message to host */
-
- /* panic */
+ /* panic - send IPC oops message to host */
platform_panic(p);
/* flush last trace messages */
diff --git a/src/include/sof/platform.h b/src/include/sof/platform.h
new file mode 100644
index 0000000..8b228ee
--- /dev/null
+++ b/src/include/sof/platform.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2018, Intel Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Intel Corporation nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Author: Marcin Maka <marcin.maka(a)linux.intel.com>
+ */
+
+#ifndef __INCLUDE_SOF_PLATFORM_H__
+#define __INCLUDE_SOF_PLATFORM_H__
+
+#include <sof/sof.h>
+
+/*
+ * APIs declared here are defined for every platform.
+ */
+
+/**
+ * \brief Platform specific implementation of the On Boot Complete handler.
+ * \param[in] boot_message Boot status code.
+ * \return 0 if successful, error code otherwise.
+ */
+int platform_boot_complete(uint32_t boot_message);
+
+/**
+ * \brief Platform initialization entry, called during FW initialization.
+ * \param[in] sof Context.
+ * \return 0 if successful, error code otherwise.
+ */
+int platform_init(struct sof *sof);
+
+/**
+ * \brief Called by the panic handler.
+ * \param[in] p Panic cause, one of SOF_IPC_PANIC_... codes.
+ */
+static inline void platform_panic(uint32_t p);
+
+#endif
diff --git a/src/platform/apollolake/include/platform/platform.h b/src/platform/apollolake/include/platform/platform.h
index 6d51752..1321f1f 100644
--- a/src/platform/apollolake/include/platform/platform.h
+++ b/src/platform/apollolake/include/platform/platform.h
@@ -33,6 +33,7 @@
#ifndef __PLATFORM_PLATFORM_H__
#define __PLATFORM_PLATFORM_H__
+#include <sof/platform.h>
#include <platform/platcfg.h>
#include <platform/shim.h>
#include <platform/interrupt.h>
@@ -120,11 +121,11 @@ struct sof;
#define PLATFORM_NUM_SSP 6
/* Platform defined panic code */
-#define platform_panic(__x) { \
- mailbox_sw_reg_write(SRAM_REG_FW_STATUS, \
- (0xdead000 | (__x)) & 0x3fffffff); \
- ipc_write(IPC_DIPCIE, MAILBOX_EXCEPTION_OFFSET + 2 * 0x20000); \
- ipc_write(IPC_DIPCI, 0x80000000 | ((0xdead000 | (__x)) & 0x3fffffff)); \
+static inline void platform_panic(uint32_t p)
+{
+ mailbox_sw_reg_write(SRAM_REG_FW_STATUS, p & 0x3fffffff);
+ ipc_write(IPC_DIPCIE, MAILBOX_EXCEPTION_OFFSET + 2 * 0x20000);
+ ipc_write(IPC_DIPCI, 0x80000000 | (p & 0x3fffffff));
}
/* Platform defined trace code */
@@ -137,10 +138,6 @@ extern struct timer *platform_timer;
* APIs declared here are defined for every platform and IPC mechanism.
*/
-int platform_boot_complete(uint32_t boot_message);
-
-int platform_init(struct sof *sof);
-
int platform_ssp_set_mn(uint32_t ssp_port, uint32_t source, uint32_t rate,
uint32_t bclk_fs);
diff --git a/src/platform/baytrail/include/platform/platform.h b/src/platform/baytrail/include/platform/platform.h
index 6a7ebc9..1defe27 100644
--- a/src/platform/baytrail/include/platform/platform.h
+++ b/src/platform/baytrail/include/platform/platform.h
@@ -33,6 +33,7 @@
#ifndef __PLATFORM_PLATFORM_H__
#define __PLATFORM_PLATFORM_H__
+#include <sof/platform.h>
#include <platform/shim.h>
#include <platform/interrupt.h>
#include <uapi/ipc.h>
@@ -102,20 +103,13 @@ struct sof;
#define PLATFORM_IDLE_TIME 750000
/* Platform defined panic code */
-#define platform_panic(__x) { \
- shim_write(SHIM_IPCDL, (0xdead000 | (__x & 0xfff))); \
- shim_write(SHIM_IPCDH, (SHIM_IPCDH_BUSY | MAILBOX_EXCEPTION_OFFSET)); \
+static inline void platform_panic(uint32_t p)
+{
+ shim_write(SHIM_IPCDL, p);
+ shim_write(SHIM_IPCDH, (SHIM_IPCDH_BUSY | MAILBOX_EXCEPTION_OFFSET));
}
/* Platform defined trace code */
#define platform_trace_point(__x) \
shim_write(SHIM_IPCXL, (__x & 0x3fffffff))
-/*
- * APIs declared here are defined for every platform and IPC mechanism.
- */
-
-int platform_boot_complete(uint32_t boot_message);
-
-int platform_init(struct sof *sof);
-
#endif
diff --git a/src/platform/cannonlake/include/platform/platform.h b/src/platform/cannonlake/include/platform/platform.h
index 88614ab..c7d4a82 100644
--- a/src/platform/cannonlake/include/platform/platform.h
+++ b/src/platform/cannonlake/include/platform/platform.h
@@ -34,6 +34,7 @@
#ifndef __PLATFORM_PLATFORM_H__
#define __PLATFORM_PLATFORM_H__
+#include <sof/platform.h>
#include <platform/platcfg.h>
#include <platform/shim.h>
#include <platform/interrupt.h>
@@ -117,12 +118,11 @@ struct sof;
#define PLATFORM_IDLE_TIME 750000
/* Platform defined trace code */
-#define platform_panic(__x) { \
- mailbox_sw_reg_write(SRAM_REG_FW_STATUS, \
- (0xdead000 | (__x)) & 0x3fffffff); \
- ipc_write(IPC_DIPCIDD, MAILBOX_EXCEPTION_OFFSET + 2 * 0x20000); \
- ipc_write(IPC_DIPCIDR, 0x80000000 | \
- ((0xdead000 | (__x)) & 0x3fffffff)); \
+static inline void platform_panic(uint32_t p)
+{
+ mailbox_sw_reg_write(SRAM_REG_FW_STATUS, p & 0x3fffffff);
+ ipc_write(IPC_DIPCIDD, MAILBOX_EXCEPTION_OFFSET + 2 * 0x20000);
+ ipc_write(IPC_DIPCIDR, 0x80000000 | (p & 0x3fffffff));
}
/* Platform defined trace code */
@@ -135,10 +135,6 @@ extern struct timer *platform_timer;
* APIs declared here are defined for every platform and IPC mechanism.
*/
-int platform_boot_complete(uint32_t boot_message);
-
-int platform_init(struct sof *sof);
-
int platform_ssp_set_mn(uint32_t ssp_port, uint32_t source, uint32_t rate,
uint32_t bclk_fs);
diff --git a/src/platform/haswell/include/platform/platform.h b/src/platform/haswell/include/platform/platform.h
index d30f329..b3d0609 100644
--- a/src/platform/haswell/include/platform/platform.h
+++ b/src/platform/haswell/include/platform/platform.h
@@ -32,6 +32,7 @@
#ifndef __PLATFORM_PLATFORM_H__
#define __PLATFORM_PLATFORM_H__
+#include <sof/platform.h>
#include <platform/shim.h>
#include <platform/interrupt.h>
#include <uapi/ipc.h>
@@ -101,20 +102,13 @@ struct sof;
#define PLATFORM_IDLE_TIME 750000
/* Platform defined panic code */
-#define platform_panic(__x) { \
- shim_write(SHIM_IPCX, MAILBOX_EXCEPTION_OFFSET & 0x3fffffff); \
- shim_write(SHIM_IPCD, (SHIM_IPCD_BUSY | 0xdead000 | __x)); \
+static inline void platform_panic(uint32_t p)
+{
+ shim_write(SHIM_IPCX, MAILBOX_EXCEPTION_OFFSET & 0x3fffffff);
+ shim_write(SHIM_IPCD, (SHIM_IPCD_BUSY | p))
}
/* Platform defined trace code */
#define platform_trace_point(__x) \
shim_write(SHIM_IPCX, ((__x) & 0x3fffffff))
-/*
- * APIs declared here are defined for every platform and IPC mechanism.
- */
-
-int platform_boot_complete(uint32_t boot_message);
-
-int platform_init(struct sof *sof);
-
#endif
--
2.17.0
8
15

12 Jun '18
This set of patches proposes a new API for dma_get() that
procures a DMAC based on the requested copy dir, caps, dev type
and flags indicating shared/exclusive access. It also updates the
existing user of dma_get() to use the new API based on the specific
usage. The API uses the number of channels draning in each DMAC
to balance the load between the platform DMAC's for users requesting
shared access privilege. This provides a primitive level of QoS and
prevents overloading any DMAC.
The platform DMAC definitions have also been updated to
include information about copy capabilities supported and the
type of DMA.
Test Results:
1. Minnowboard Turbot w 5651: Passed all feature tests
2. Up Squared Board w Hifiberry DAC+: Passed all playback feature tests
v4 changes:
1. Modified platform DMAC definition with copy cap, copy dir
dev types supported
2. Modified dma_get() API to request DMAC based on above
criteria
Ranjani Sridharan (5):
platform: dma: move dmac initialization
dma: update platform DMAC definitions with the supported dev types,
dir and capabilities
dma: introduce parameter to store the number of channels draining
dma: Introduce new API for dma_get()
dma:trace: dma_copy_new() does not need DMAC ID anymore
src/arch/xtensa/Makefile.am | 1 +
src/audio/dai.c | 7 +-
src/audio/host.c | 14 +--
src/drivers/dw-dma.c | 13 ++-
src/drivers/hda-dma.c | 10 ++-
src/host/common_test.c | 2 +-
src/include/sof/dma.h | 43 ++++++---
src/ipc/apl-ipc.c | 8 +-
src/ipc/byt-ipc.c | 9 +-
src/ipc/cnl-ipc.c | 8 +-
src/ipc/dma-copy.c | 10 ++-
src/ipc/hsw-ipc.c | 9 +-
src/lib/Makefile.am | 11 ++-
src/lib/dma-trace.c | 2 +-
src/lib/dma.c | 89 +++++++++++++++++++
src/platform/apollolake/dma.c | 39 ++++++--
.../apollolake/include/platform/dma.h | 5 ++
.../apollolake/include/platform/platform.h | 3 -
src/platform/apollolake/platform.c | 22 +----
src/platform/baytrail/dma.c | 34 +++++--
src/platform/baytrail/include/platform/dma.h | 9 ++
.../baytrail/include/platform/platform.h | 3 -
src/platform/baytrail/platform.c | 23 +----
src/platform/cannonlake/dma.c | 39 ++++++--
.../cannonlake/include/platform/dma.h | 6 ++
.../cannonlake/include/platform/platform.h | 3 -
src/platform/cannonlake/platform.c | 23 +----
src/platform/haswell/dma.c | 40 +++++++--
src/platform/haswell/include/platform/dma.h | 5 ++
.../haswell/include/platform/platform.h | 3 -
src/platform/haswell/platform.c | 21 +----
31 files changed, 362 insertions(+), 152 deletions(-)
create mode 100644 src/lib/dma.c
--
2.17.1
2
6

[Sound-open-firmware] [PATCH 3/3] test: unit tests for list.h Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
by Liam Girdwood 11 Jun '18
by Liam Girdwood 11 Jun '18
11 Jun '18
From: Janusz Jankowski <janusz.jankowski(a)linux.intel.com>
---
test/cmocka/Makefile.am | 23 +++
test/cmocka/src/list/list_init.c | 70 +++++++
test/cmocka/src/list/list_is_empty.c | 74 ++++++++
test/cmocka/src/list/list_item.c | 68 +++++++
test/cmocka/src/list/list_item_append.c | 148 +++++++++++++++
test/cmocka/src/list/list_item_del.c | 221 +++++++++++++++++++++++
test/cmocka/src/list/list_item_is_last.c | 134 ++++++++++++++
test/cmocka/src/list/list_item_prepend.c | 147 +++++++++++++++
8 files changed, 885 insertions(+)
create mode 100644 test/cmocka/src/list/list_init.c
create mode 100644 test/cmocka/src/list/list_is_empty.c
create mode 100644 test/cmocka/src/list/list_item.c
create mode 100644 test/cmocka/src/list/list_item_append.c
create mode 100644 test/cmocka/src/list/list_item_del.c
create mode 100644 test/cmocka/src/list/list_item_is_last.c
create mode 100644 test/cmocka/src/list/list_item_prepend.c
diff --git a/test/cmocka/Makefile.am b/test/cmocka/Makefile.am
index 97890e6..565fb80 100644
--- a/test/cmocka/Makefile.am
+++ b/test/cmocka/Makefile.am
@@ -21,6 +21,29 @@ LDFLAGS := $(filter-out -nostdlib,$(LDFLAGS))
LDADD = -lcmocka
+# list tests
+
+check_PROGRAMS += list_init
+list_init_SOURCES = src/list/list_init.c
+
+check_PROGRAMS += list_is_empty
+list_is_empty_SOURCES = src/list/list_is_empty.c
+
+check_PROGRAMS += list_item_append
+list_item_append_SOURCES = src/list/list_item_append.c
+
+check_PROGRAMS += list_item_del
+list_item_del_SOURCES = src/list/list_item_del.c
+
+check_PROGRAMS += list_item_is_last
+list_item_is_last_SOURCES = src/list/list_item_is_last.c
+
+check_PROGRAMS += list_item_prepend
+list_item_prepend_SOURCES = src/list/list_item_prepend.c
+
+check_PROGRAMS += list_item
+list_item_SOURCES = src/list/list_item.c
+
# math/numbers tests
check_PROGRAMS += gcd
diff --git a/test/cmocka/src/list/list_init.c b/test/cmocka/src/list/list_init.c
new file mode 100644
index 0000000..5bd6f3e
--- /dev/null
+++ b/test/cmocka/src/list/list_init.c
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2018, Intel Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Intel Corporation nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Author: Janusz Jankowski <janusz.jankowski(a)linux.intel.com>
+ */
+
+#include <sof/list.h>
+
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
+#include <cmocka.h>
+
+static void test_list_list_init_prev_equal_to_root(void **state)
+{
+ (void) state; /* unused */
+
+ struct list_item list = {.prev = NULL, .next = NULL};
+
+ list_init(&list);
+
+ assert_ptr_equal(&list, list.prev);
+}
+
+static void test_list_list_init_next_equal_to_root(void **state)
+{
+ (void) state; /* unused */
+
+ struct list_item list = {.prev = NULL, .next = NULL};
+
+ list_init(&list);
+
+ assert_ptr_equal(&list, list.next);
+}
+
+int main(void)
+{
+ const struct CMUnitTest tests[] = {
+ cmocka_unit_test(test_list_list_init_prev_equal_to_root),
+ cmocka_unit_test(test_list_list_init_next_equal_to_root),
+ };
+
+ cmocka_set_message_output(CM_OUTPUT_TAP);
+
+ return cmocka_run_group_tests(tests, NULL, NULL);
+}
diff --git a/test/cmocka/src/list/list_is_empty.c b/test/cmocka/src/list/list_is_empty.c
new file mode 100644
index 0000000..95aff3e
--- /dev/null
+++ b/test/cmocka/src/list/list_is_empty.c
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2018, Intel Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Intel Corporation nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Author: Janusz Jankowski <janusz.jankowski(a)linux.intel.com>
+ */
+
+#include <sof/list.h>
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
+#include <cmocka.h>
+
+static void test_list_list_is_empty_when_empty_then_true(void **state)
+{
+ (void) state; /* unused */
+
+ struct list_item list;
+
+ list_init(&list);
+
+ assert_true(list_is_empty(&list));
+}
+
+static void test_list_list_is_empty_when_not_empty_then_false(void **state)
+{
+ (void) state; /* unused */
+
+ struct list_item list, item;
+
+ list_init(&list);
+ list_init(&item);
+
+ list_item_append(&item, &list);
+
+ assert_false(list_is_empty(&list));
+}
+
+int main(void)
+{
+ const struct CMUnitTest tests[] = {
+ cmocka_unit_test(test_list_list_is_empty_when_empty_then_true),
+ cmocka_unit_test(test_list_list_is_empty_when_not_empty_then_false),
+ };
+
+ cmocka_set_message_output(CM_OUTPUT_TAP);
+
+ return cmocka_run_group_tests(tests, NULL, NULL);
+}
diff --git a/test/cmocka/src/list/list_item.c b/test/cmocka/src/list/list_item.c
new file mode 100644
index 0000000..5a62f24
--- /dev/null
+++ b/test/cmocka/src/list/list_item.c
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2018, Intel Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Intel Corporation nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Author: Janusz Jankowski <janusz.jankowski(a)linux.intel.com>
+ */
+
+#include <sof/list.h>
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
+#include <cmocka.h>
+
+struct test_list_container {
+ void *field1;
+ struct list_item list;
+ void *field2;
+};
+
+static void test_list_list_item_when_valid_offset_then_ptr_equal(void **state)
+{
+ (void) state; /* unused */
+
+ struct test_list_container container;
+
+ list_init(&(container.list));
+
+ struct test_list_container *result_container = list_item(
+ &(container.list), struct test_list_container, list);
+
+ assert_ptr_equal(result_container, &container);
+}
+
+int main(void)
+{
+ const struct CMUnitTest tests[] = {
+ cmocka_unit_test(test_list_list_item_when_valid_offset_then_ptr_equal),
+ };
+
+ cmocka_set_message_output(CM_OUTPUT_TAP);
+
+ return cmocka_run_group_tests(tests, NULL, NULL);
+}
diff --git a/test/cmocka/src/list/list_item_append.c b/test/cmocka/src/list/list_item_append.c
new file mode 100644
index 0000000..4fd4c66
--- /dev/null
+++ b/test/cmocka/src/list/list_item_append.c
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2018, Intel Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Intel Corporation nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Author: Janusz Jankowski <janusz.jankowski(a)linux.intel.com>
+ */
+
+#include <sof/list.h>
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
+#include <cmocka.h>
+
+struct test_data {
+ struct list_item *head;
+ struct list_item *tail_minus_1;
+ struct list_item *tail;
+};
+
+static int setup(void **state)
+{
+ struct test_data *data = malloc(sizeof(struct test_data));
+
+ if (data == NULL)
+ return -1;
+
+ data->head = malloc(sizeof(struct list_item));
+ data->tail_minus_1 = malloc(sizeof(struct list_item));
+ data->tail = malloc(sizeof(struct list_item));
+
+ if (data->head == NULL
+ || data->tail_minus_1 == NULL
+ || data->tail == NULL) {
+ free(data->head);
+ free(data->tail_minus_1);
+ free(data->tail);
+
+ free(data);
+
+ return -1;
+ }
+
+ list_init(data->head);
+ list_init(data->tail_minus_1);
+ list_init(data->tail);
+
+ list_item_append(data->tail_minus_1, data->head);
+ list_item_append(data->tail, data->head);
+
+ *state = data;
+ return 0;
+}
+
+static int teardown(void **state)
+{
+ struct test_data *data = *state;
+
+ free(data->head);
+ free(data->tail_minus_1);
+ free(data->tail);
+
+ free(data);
+ return 0;
+}
+
+static void test_list_list_item_append_head_prev_is_tail(void **state)
+{
+ struct test_data *data = *state;
+
+ assert_ptr_equal(data->head->prev, data->tail);
+}
+
+static void test_list_list_item_append_head_next_is_tail_minus_1(void **state)
+{
+ struct test_data *data = *state;
+
+ assert_ptr_equal(data->head->next, data->tail_minus_1);
+}
+
+static void test_list_list_item_append_tail_minus_1_prev_is_head(void **state)
+{
+ struct test_data *data = *state;
+
+ assert_ptr_equal(data->tail_minus_1->prev, data->head);
+}
+
+static void test_list_list_item_append_tail_minus_1_next_is_tail(void **state)
+{
+ struct test_data *data = *state;
+
+ assert_ptr_equal(data->tail_minus_1->next, data->tail);
+}
+
+static void test_list_list_item_append_tail_prev_is_tail_minus_1(void **state)
+{
+ struct test_data *data = *state;
+
+ assert_ptr_equal(data->tail->prev, data->tail_minus_1);
+}
+
+static void test_list_list_item_append_tail_next_is_head(void **state)
+{
+ struct test_data *data = *state;
+
+ assert_ptr_equal(data->tail->next, data->head);
+}
+
+int main(void)
+{
+ const struct CMUnitTest tests[] = {
+ cmocka_unit_test(test_list_list_item_append_head_prev_is_tail),
+ cmocka_unit_test(test_list_list_item_append_head_next_is_tail_minus_1),
+ cmocka_unit_test(test_list_list_item_append_tail_minus_1_prev_is_head),
+ cmocka_unit_test(test_list_list_item_append_tail_minus_1_next_is_tail),
+ cmocka_unit_test(test_list_list_item_append_tail_prev_is_tail_minus_1),
+ cmocka_unit_test(test_list_list_item_append_tail_next_is_head),
+ };
+
+ cmocka_set_message_output(CM_OUTPUT_TAP);
+
+ return cmocka_run_group_tests(tests, setup, teardown);
+}
+
diff --git a/test/cmocka/src/list/list_item_del.c b/test/cmocka/src/list/list_item_del.c
new file mode 100644
index 0000000..dfe6e6d
--- /dev/null
+++ b/test/cmocka/src/list/list_item_del.c
@@ -0,0 +1,221 @@
+/*
+ * Copyright (c) 2018, Intel Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Intel Corporation nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Author: Janusz Jankowski <janusz.jankowski(a)linux.intel.com>
+ */
+
+#include <sof/list.h>
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
+#include <cmocka.h>
+
+struct test_data {
+ struct list_item *head;
+ struct list_item *tail_minus_1;
+ struct list_item *tail;
+};
+
+static int setup(void **state)
+{
+ struct test_data *data = malloc(sizeof(struct test_data));
+
+ if (data == NULL)
+ return -1;
+
+ data->head = malloc(sizeof(struct list_item));
+ data->tail_minus_1 = malloc(sizeof(struct list_item));
+ data->tail = malloc(sizeof(struct list_item));
+
+ if (data->head == NULL
+ || data->tail_minus_1 == NULL
+ || data->tail == NULL) {
+ free(data->head);
+ free(data->tail_minus_1);
+ free(data->tail);
+
+ free(data);
+
+ return -1;
+ }
+
+ list_init(data->head);
+ list_init(data->tail_minus_1);
+ list_init(data->tail);
+
+ list_item_append(data->tail_minus_1, data->head);
+ list_item_append(data->tail, data->head);
+
+ *state = data;
+ return 0;
+}
+
+static int teardown(void **state)
+{
+ struct test_data *data = *state;
+
+ free(data->head);
+ free(data->tail_minus_1);
+ free(data->tail);
+
+ free(data);
+ return 0;
+}
+
+static void test_list_list_item_del_when_delete_head_then_tail_minus_1_prev_is_tail(void **state)
+{
+ struct test_data *data = *state;
+
+ list_item_del(data->head);
+
+ assert_ptr_equal(data->tail_minus_1->prev, data->tail);
+}
+
+static void test_list_list_item_del_when_delete_head_then_tail_minus_1_next_is_tail(void **state)
+{
+ struct test_data *data = *state;
+
+ list_item_del(data->head);
+
+ assert_ptr_equal(data->tail_minus_1->next, data->tail);
+}
+
+static void test_list_list_item_del_when_delete_head_then_tail_prev_is_tail_minus_1(void **state)
+{
+ struct test_data *data = *state;
+
+ list_item_del(data->head);
+
+ assert_ptr_equal(data->tail->prev, data->tail_minus_1);
+}
+
+static void test_list_list_item_del_when_delete_head_then_tail_next_is_tail_minus_1(void **state)
+{
+ struct test_data *data = *state;
+
+ list_item_del(data->head);
+
+ assert_ptr_equal(data->tail->next, data->tail_minus_1);
+}
+
+static void test_list_list_item_del_when_delete_tail_minus_1_then_head_prev_is_tail(void **state)
+{
+ struct test_data *data = *state;
+
+ list_item_del(data->tail_minus_1);
+
+ assert_ptr_equal(data->head->prev, data->tail);
+}
+
+static void test_list_list_item_del_when_delete_tail_minus_1_then_head_next_is_tail(void **state)
+{
+ struct test_data *data = *state;
+
+ list_item_del(data->tail_minus_1);
+
+ assert_ptr_equal(data->head->next, data->tail);
+}
+
+static void test_list_list_item_del_when_delete_tail_minus_1_then_tail_prev_is_head(void **state)
+{
+ struct test_data *data = *state;
+
+ list_item_del(data->tail_minus_1);
+
+ assert_ptr_equal(data->tail->prev, data->head);
+}
+
+static void test_list_list_item_del_when_delete_tail_minus_1_then_tail_next_is_head(void **state)
+{
+ struct test_data *data = *state;
+
+ list_item_del(data->tail_minus_1);
+
+ assert_ptr_equal(data->tail->next, data->head);
+}
+
+static void test_list_list_item_del_when_delete_tail_then_head_prev_is_tail_minus_1(void **state)
+{
+ struct test_data *data = *state;
+
+ list_item_del(data->tail);
+
+ assert_ptr_equal(data->head->prev, data->tail_minus_1);
+}
+
+static void test_list_list_item_del_when_delete_tail_then_head_next_is_tail_minus_1(void **state)
+{
+ struct test_data *data = *state;
+
+ list_item_del(data->tail);
+
+ assert_ptr_equal(data->head->next, data->tail_minus_1);
+}
+
+static void test_list_list_item_del_when_delete_tail_then_tail_minus_1_prev_is_head(void **state)
+{
+ struct test_data *data = *state;
+
+ list_item_del(data->tail);
+
+ assert_ptr_equal(data->tail_minus_1->prev, data->head);
+}
+
+static void test_list_list_item_del_when_delete_tail_then_tail_minus_1_next_is_head(void **state)
+{
+ struct test_data *data = *state;
+
+ list_item_del(data->tail);
+
+ assert_ptr_equal(data->tail_minus_1->next, data->head);
+}
+
+int main(void)
+{
+ const struct CMUnitTest tests[] = {
+ cmocka_unit_test_setup_teardown(test_list_list_item_del_when_delete_head_then_tail_minus_1_prev_is_tail, setup, teardown),
+ cmocka_unit_test_setup_teardown(test_list_list_item_del_when_delete_head_then_tail_minus_1_next_is_tail, setup, teardown),
+ cmocka_unit_test_setup_teardown(test_list_list_item_del_when_delete_head_then_tail_prev_is_tail_minus_1, setup, teardown),
+ cmocka_unit_test_setup_teardown(test_list_list_item_del_when_delete_head_then_tail_next_is_tail_minus_1, setup, teardown),
+
+ cmocka_unit_test_setup_teardown(test_list_list_item_del_when_delete_tail_minus_1_then_head_prev_is_tail, setup, teardown),
+ cmocka_unit_test_setup_teardown(test_list_list_item_del_when_delete_tail_minus_1_then_head_next_is_tail, setup, teardown),
+ cmocka_unit_test_setup_teardown(test_list_list_item_del_when_delete_tail_minus_1_then_tail_prev_is_head, setup, teardown),
+ cmocka_unit_test_setup_teardown(test_list_list_item_del_when_delete_tail_minus_1_then_tail_next_is_head, setup, teardown),
+
+ cmocka_unit_test_setup_teardown(test_list_list_item_del_when_delete_tail_then_head_prev_is_tail_minus_1, setup, teardown),
+ cmocka_unit_test_setup_teardown(test_list_list_item_del_when_delete_tail_then_head_next_is_tail_minus_1, setup, teardown),
+ cmocka_unit_test_setup_teardown(test_list_list_item_del_when_delete_tail_then_tail_minus_1_prev_is_head, setup, teardown),
+ cmocka_unit_test_setup_teardown(test_list_list_item_del_when_delete_tail_then_tail_minus_1_next_is_head, setup, teardown),
+ };
+
+ cmocka_set_message_output(CM_OUTPUT_TAP);
+
+ return cmocka_run_group_tests(tests, NULL, NULL);
+}
diff --git a/test/cmocka/src/list/list_item_is_last.c b/test/cmocka/src/list/list_item_is_last.c
new file mode 100644
index 0000000..2e6bd0f
--- /dev/null
+++ b/test/cmocka/src/list/list_item_is_last.c
@@ -0,0 +1,134 @@
+/*
+ * Copyright (c) 2018, Intel Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Intel Corporation nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Author: Janusz Jankowski <janusz.jankowski(a)linux.intel.com>
+ */
+
+#include <sof/list.h>
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
+#include <cmocka.h>
+
+struct test_data {
+ struct list_item *head;
+ struct list_item *tail_minus_1;
+ struct list_item *tail;
+};
+
+static int setup(void **state)
+{
+ struct test_data *data = malloc(sizeof(struct test_data));
+
+ if (data == NULL)
+ return -1;
+
+ data->head = malloc(sizeof(struct list_item));
+ data->tail_minus_1 = malloc(sizeof(struct list_item));
+ data->tail = malloc(sizeof(struct list_item));
+
+ if (data->head == NULL
+ || data->tail_minus_1 == NULL
+ || data->tail == NULL) {
+ free(data->head);
+ free(data->tail_minus_1);
+ free(data->tail);
+
+ free(data);
+
+ return -1;
+ }
+
+ list_init(data->head);
+ list_init(data->tail_minus_1);
+ list_init(data->tail);
+
+ list_item_append(data->tail_minus_1, data->head);
+ list_item_append(data->tail, data->head);
+
+ *state = data;
+ return 0;
+}
+
+static int teardown(void **state)
+{
+ struct test_data *data = *state;
+
+ free(data->head);
+ free(data->tail_minus_1);
+ free(data->tail);
+
+ free(data);
+ return 0;
+}
+
+static void test_list_list_item_is_last_when_head_then_false(void **state)
+{
+ struct test_data *data = *state;
+
+ assert_false(list_item_is_last(data->head, data->head));
+}
+
+static void test_list_list_item_is_last_when_tail_minus_1_then_false(void **state)
+{
+ struct test_data *data = *state;
+
+ assert_false(list_item_is_last(data->tail_minus_1, data->head));
+}
+
+static void test_list_list_item_is_last_when_tail_then_true(void **state)
+{
+ struct test_data *data = *state;
+
+ assert_true(list_item_is_last(data->tail, data->head));
+}
+
+static void test_list_list_item_is_last_when_not_in_list_then_false(void **state)
+{
+ struct list_item other_list;
+ struct test_data *data = *state;
+
+ list_init(&other_list);
+
+ assert_false(list_item_is_last(&other_list, data->head));
+}
+
+int main(void)
+{
+ const struct CMUnitTest tests[] = {
+ cmocka_unit_test(test_list_list_item_is_last_when_head_then_false),
+ cmocka_unit_test(test_list_list_item_is_last_when_tail_minus_1_then_false),
+ cmocka_unit_test(test_list_list_item_is_last_when_tail_then_true),
+ cmocka_unit_test(test_list_list_item_is_last_when_not_in_list_then_false),
+ };
+
+ cmocka_set_message_output(CM_OUTPUT_TAP);
+
+ return cmocka_run_group_tests(tests, setup, teardown);
+}
diff --git a/test/cmocka/src/list/list_item_prepend.c b/test/cmocka/src/list/list_item_prepend.c
new file mode 100644
index 0000000..75c1e76
--- /dev/null
+++ b/test/cmocka/src/list/list_item_prepend.c
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2018, Intel Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * * Neither the name of the Intel Corporation nor the
+ * names of its contributors may be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Author: Janusz Jankowski <janusz.jankowski(a)linux.intel.com>
+ */
+
+#include <sof/list.h>
+
+#include <stdlib.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
+#include <cmocka.h>
+
+struct test_data {
+ struct list_item *head;
+ struct list_item *tail_minus_1;
+ struct list_item *tail;
+};
+
+static int setup(void **state)
+{
+ struct test_data *data = malloc(sizeof(struct test_data));
+
+ if (data == NULL)
+ return -1;
+
+ data->head = malloc(sizeof(struct list_item));
+ data->tail_minus_1 = malloc(sizeof(struct list_item));
+ data->tail = malloc(sizeof(struct list_item));
+
+ if (data->head == NULL
+ || data->tail_minus_1 == NULL
+ || data->tail == NULL) {
+ free(data->head);
+ free(data->tail_minus_1);
+ free(data->tail);
+
+ free(data);
+
+ return -1;
+ }
+
+ list_init(data->head);
+ list_init(data->tail_minus_1);
+ list_init(data->tail);
+
+ list_item_prepend(data->tail, data->head);
+ list_item_prepend(data->tail_minus_1, data->head);
+
+ *state = data;
+ return 0;
+}
+
+static int teardown(void **state)
+{
+ struct test_data *data = *state;
+
+ free(data->head);
+ free(data->tail_minus_1);
+ free(data->tail);
+
+ free(data);
+ return 0;
+}
+
+static void test_list_list_item_prepend_head_prev_is_tail(void **state)
+{
+ struct test_data *data = *state;
+
+ assert_ptr_equal(data->head->prev, data->tail);
+}
+
+static void test_list_list_item_prepend_head_next_is_tail_minus_1(void **state)
+{
+ struct test_data *data = *state;
+
+ assert_ptr_equal(data->head->next, data->tail_minus_1);
+}
+
+static void test_list_list_item_prepend_tail_minus_1_prev_is_head(void **state)
+{
+ struct test_data *data = *state;
+
+ assert_ptr_equal(data->tail_minus_1->prev, data->head);
+}
+
+static void test_list_list_item_prepend_tail_minus_1_next_is_tail(void **state)
+{
+ struct test_data *data = *state;
+
+ assert_ptr_equal(data->tail_minus_1->next, data->tail);
+}
+
+static void test_list_list_item_prepend_tail_prev_is_tail_minus_1(void **state)
+{
+ struct test_data *data = *state;
+
+ assert_ptr_equal(data->tail->prev, data->tail_minus_1);
+}
+
+static void test_list_list_item_prepend_tail_next_is_head(void **state)
+{
+ struct test_data *data = *state;
+
+ assert_ptr_equal(data->tail->next, data->head);
+}
+
+int main(void)
+{
+ const struct CMUnitTest tests[] = {
+ cmocka_unit_test(test_list_list_item_prepend_head_prev_is_tail),
+ cmocka_unit_test(test_list_list_item_prepend_head_next_is_tail_minus_1),
+ cmocka_unit_test(test_list_list_item_prepend_tail_minus_1_prev_is_head),
+ cmocka_unit_test(test_list_list_item_prepend_tail_minus_1_next_is_tail),
+ cmocka_unit_test(test_list_list_item_prepend_tail_prev_is_tail_minus_1),
+ cmocka_unit_test(test_list_list_item_prepend_tail_next_is_head),
+ };
+
+ cmocka_set_message_output(CM_OUTPUT_TAP);
+
+ return cmocka_run_group_tests(tests, setup, teardown);
+}
--
2.17.0
1
1

11 Jun '18
From: Tomasz Lauda <tomasz.lauda(a)linux.intel.com>
This patch adds wait_delay routine, which will wait
for specified minimum number of clocks.
Signed-off-by: Tomasz Lauda <tomasz.lauda(a)linux.intel.com>
---
src/include/sof/wait.h | 12 ++++++++++++
src/platform/apollolake/include/platform/platform.h | 3 +++
src/platform/baytrail/include/platform/platform.h | 3 +++
src/platform/cannonlake/include/platform/platform.h | 3 +++
src/platform/haswell/include/platform/platform.h | 3 +++
5 files changed, 24 insertions(+)
diff --git a/src/include/sof/wait.h b/src/include/sof/wait.h
index b7725b8..feb8b29 100644
--- a/src/include/sof/wait.h
+++ b/src/include/sof/wait.h
@@ -145,4 +145,16 @@ static inline int wait_for_completion_timeout(completion_t *comp)
}
}
+/**
+ * \brief Waits at least passed number of clocks.
+ * \param[in] number_of_clks Minimum number of clocks to wait.
+ */
+static inline void wait_delay(uint64_t number_of_clks)
+{
+ uint64_t current = platform_timer_get(platform_timer);
+
+ while ((platform_timer_get(platform_timer) - current) < number_of_clks)
+ idelay(PLATFORM_DEFAULT_DELAY);
+}
+
#endif
diff --git a/src/platform/apollolake/include/platform/platform.h b/src/platform/apollolake/include/platform/platform.h
index 1321f1f..ff40b1c 100644
--- a/src/platform/apollolake/include/platform/platform.h
+++ b/src/platform/apollolake/include/platform/platform.h
@@ -120,6 +120,9 @@ struct sof;
/* number of SSP ports in platform */
#define PLATFORM_NUM_SSP 6
+/* DSP default delay in cycles */
+#define PLATFORM_DEFAULT_DELAY 12
+
/* Platform defined panic code */
static inline void platform_panic(uint32_t p)
{
diff --git a/src/platform/baytrail/include/platform/platform.h b/src/platform/baytrail/include/platform/platform.h
index 1defe27..0d1664c 100644
--- a/src/platform/baytrail/include/platform/platform.h
+++ b/src/platform/baytrail/include/platform/platform.h
@@ -102,6 +102,9 @@ struct sof;
/* DSP should be idle in this time frame */
#define PLATFORM_IDLE_TIME 750000
+/* DSP default delay in cycles */
+#define PLATFORM_DEFAULT_DELAY 12
+
/* Platform defined panic code */
static inline void platform_panic(uint32_t p)
{
diff --git a/src/platform/cannonlake/include/platform/platform.h b/src/platform/cannonlake/include/platform/platform.h
index c7d4a82..cf045c0 100644
--- a/src/platform/cannonlake/include/platform/platform.h
+++ b/src/platform/cannonlake/include/platform/platform.h
@@ -117,6 +117,9 @@ struct sof;
/* DSP should be idle in this time frame */
#define PLATFORM_IDLE_TIME 750000
+/* DSP default delay in cycles */
+#define PLATFORM_DEFAULT_DELAY 12
+
/* Platform defined trace code */
static inline void platform_panic(uint32_t p)
{
diff --git a/src/platform/haswell/include/platform/platform.h b/src/platform/haswell/include/platform/platform.h
index c5d8187..af628ee 100644
--- a/src/platform/haswell/include/platform/platform.h
+++ b/src/platform/haswell/include/platform/platform.h
@@ -101,6 +101,9 @@ struct sof;
/* DSP should be idle in this time frame */
#define PLATFORM_IDLE_TIME 750000
+/* DSP default delay in cycles */
+#define PLATFORM_DEFAULT_DELAY 12
+
/* Platform defined panic code */
static inline void platform_panic(uint32_t p)
{
--
2.17.0
1
0

11 Jun '18
From: Pan Xiuli <xiuli.pan(a)linux.intel.com>
Merege commands to reduce layers and remove some useless layers.
Signed-off-by: Pan Xiuli <xiuli.pan(a)linux.intel.com>
---
scripts/README.docker | 2 ++
scripts/docker_build/Dockerfile | 24 ++++++------------------
2 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/scripts/README.docker b/scripts/README.docker
index e2f189f..468ae25 100644
--- a/scripts/README.docker
+++ b/scripts/README.docker
@@ -22,6 +22,8 @@ cd scripts/docker_build
After the container is built, it can be used to run the scripts.
To build for baytrail:
+./scripts/docker-run.sh ./scripts/xtensa-build-all.sh -l byt
+or (may need password test0000 for rimage install)
./scripts/docker-run.sh ./scripts/xtensa-build-all.sh byt
To rebuild the topology in soft.git:
diff --git a/scripts/docker_build/Dockerfile b/scripts/docker_build/Dockerfile
index 8dede3c..cf55ab1 100644
--- a/scripts/docker_build/Dockerfile
+++ b/scripts/docker_build/Dockerfile
@@ -36,10 +36,8 @@ RUN apt-get -y update && \
gperf \
help2man \
libncurses5-dev \
- libncurses5-dev \
libssl-dev \
libtool \
- libtool \
libtool-bin \
pkg-config \
software-properties-common \
@@ -68,9 +66,9 @@ cd /root/alsa-build/alsa-lib && ./gitcompile && make install && \
cd /root/alsa-build/alsa-utils && ./gitcompile && make install && \
cd /root/ && rm -rf alsa-build
-RUN useradd --create-home -d /home/sof -u $UID -G sudo sof
-RUN echo "sof:test0000" | chpasswd
-RUN adduser sof sudo
+# Set up sof user
+RUN useradd --create-home -d /home/sof -u $UID -G sudo sof && \
+echo "sof:test0000" | chpasswd && adduser sof sudo
ENV HOME /home/sof
# pull all sof repositories that are needed
@@ -118,21 +116,11 @@ RUN for arch in byt hsw bxt cnl; do \
make distclean; \
done
-USER sof
-WORKDIR /home/sof/sof.git
-RUN ./autogen.sh
-RUN ./configure --enable-rimage
-RUN make
-USER root
-RUN make install
# Create direcroties for the host machines sof/soft directories to be mounted.
-USER sof
-RUN mkdir -p /home/sof/work/sof
-RUN mkdir -p /home/sof/work/soft
+RUN mkdir -p /home/sof/work/sof.git && \
+ mkdir -p /home/sof/work/soft.git
+
USER sof
WORKDIR /home/sof/work/sof.git/
-
-# Default to building all.
-CMD ./scripts/xtensa-build-all.sh
--
2.7.4
2
3