Skip to content

Commit

Permalink
topology: remove DMAC ID/DMAC_CHANNEL from PIPELINE/PCM/DAI definitions
Browse files Browse the repository at this point in the history
The firmware no longer uses the DMAC ID and channel info from topology.

Signed-off-by: Ranjani Sridharan <[email protected]>
  • Loading branch information
ranj063 authored and lrgirdwo committed Jun 13, 2018
1 parent 2cc3ad2 commit bd7dc88
Show file tree
Hide file tree
Showing 37 changed files with 86 additions and 261 deletions.
15 changes: 0 additions & 15 deletions topology/dsps/bdw.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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"'))

Expand Down
15 changes: 0 additions & 15 deletions topology/dsps/bxt.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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"'))

Expand Down
15 changes: 0 additions & 15 deletions topology/dsps/byt.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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"'))

Expand Down
15 changes: 0 additions & 15 deletions topology/dsps/cht.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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"'))

Expand Down
15 changes: 0 additions & 15 deletions topology/dsps/cnl.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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"'))

Expand Down
15 changes: 0 additions & 15 deletions topology/dsps/hsw.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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"'))

Expand Down
6 changes: 2 additions & 4 deletions topology/m4/dai.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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"'
Expand Down Expand Up @@ -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"'
Expand Down Expand Up @@ -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`"'
` ]'
`}')

Expand Down
38 changes: 8 additions & 30 deletions topology/m4/pcm.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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"'
` ]'
`}')
Expand Down
22 changes: 7 additions & 15 deletions topology/m4/pipeline.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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')'
Expand All @@ -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)'
Expand All @@ -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')'
Expand All @@ -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')'
Expand All @@ -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)'
)

Expand Down
9 changes: 3 additions & 6 deletions topology/sof-apl-nocodec.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit bd7dc88

Please sign in to comment.