mirror of https://github.com/thesofproject/sof.git
topology: create m4 wrapper for Graph section
This patch adds a m4 wrpper for Graph sections in pipeline definition Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit is contained in:
parent
ee8afc8064
commit
625f2e1cc0
|
@ -605,6 +605,17 @@ define(`C_CONTROLMIXER',
|
|||
` $6'
|
||||
`}')
|
||||
|
||||
dnl P_GRAPH(name, CONNECTIONS)
|
||||
define(`P_GRAPH',
|
||||
`SectionGraph.STR($1) {'
|
||||
` index STR($2)'
|
||||
`'
|
||||
` lines ['
|
||||
` $3'
|
||||
` ]'
|
||||
`}')
|
||||
|
||||
|
||||
divert(0) dnl
|
||||
|
||||
|
||||
|
|
|
@ -16,10 +16,5 @@ W_PIPELINE(N_DAI_IN, SCHEDULE_DEADLINE, SCHEDULE_PRIORITY, SCHEDULE_FRAMES, SCHE
|
|||
#
|
||||
# Graph connections to pipelines
|
||||
|
||||
SectionGraph.STR(DAI_NAME) {
|
||||
index STR(PIPELINE_ID)
|
||||
|
||||
lines [
|
||||
dapm(DAI_BUF, N_DAI_IN)
|
||||
]
|
||||
}
|
||||
P_GRAPH(DAI_NAME, PIPELINE_ID,
|
||||
LIST(` ', `dapm(DAI_BUF, N_DAI_IN)'))
|
||||
|
|
|
@ -16,10 +16,5 @@ W_PIPELINE(N_DAI_OUT, SCHEDULE_DEADLINE, SCHEDULE_PRIORITY, SCHEDULE_FRAMES, SCH
|
|||
#
|
||||
# Graph connections to pipelines
|
||||
|
||||
SectionGraph.STR(DAI_NAME) {
|
||||
index STR(PIPELINE_ID)
|
||||
|
||||
lines [
|
||||
dapm(N_DAI_OUT, DAI_BUF)
|
||||
]
|
||||
}
|
||||
P_GRAPH(DAI_NAME, PIPELINE_ID,
|
||||
LIST(` ', `dapm(N_DAI_OUT, DAI_BUF)'))
|
||||
|
|
|
@ -43,16 +43,12 @@ W_BUFFER(1, COMP_BUFFER_SIZE(2,
|
|||
#
|
||||
# host PCM <--B1-- volume <--B0-- source DAI0
|
||||
|
||||
SectionGraph."pipe-ll-capture-PIPELINE_ID" {
|
||||
index STR(PIPELINE_ID)
|
||||
|
||||
lines [
|
||||
dapm(Low Latency Capture PCM_ID, N_PCMC)
|
||||
dapm(N_PCMC, N_BUFFER(1))
|
||||
dapm(N_BUFFER(1), N_PGA(0))
|
||||
dapm(N_PGA(0), N_BUFFER(0))
|
||||
]
|
||||
}
|
||||
P_GRAPH(pipe-ll-capture-PIPELINE_ID, PIPELINE_ID,
|
||||
LIST(` ',
|
||||
`dapm(Low Latency Capture PCM_ID, N_PCMC)',
|
||||
`dapm(N_PCMC, N_BUFFER(1))',
|
||||
`dapm(N_BUFFER(1), N_PGA(0))',
|
||||
`dapm(N_PGA(0), N_BUFFER(0))'))
|
||||
|
||||
#
|
||||
# Pipeline Source and Sinks
|
||||
|
|
|
@ -86,20 +86,16 @@ W_BUFFER(3, COMP_BUFFER_SIZE(2,
|
|||
# pipeline n+3 >---+ .....etc....more pipes can be mixed here
|
||||
#
|
||||
|
||||
SectionGraph."pipe-ll-playback-PIPELINE_ID" {
|
||||
index STR(PIPELINE_ID)
|
||||
|
||||
lines [
|
||||
dapm(N_PCMP, Low Latency Playback PCM_ID)
|
||||
dapm(N_BUFFER(0), N_PCMP)
|
||||
dapm(N_PGA(0), N_BUFFER(0))
|
||||
dapm(N_BUFFER(1), N_PGA(0))
|
||||
dapm(N_MIXER(0), N_BUFFER(1))
|
||||
dapm(N_BUFFER(2), N_MIXER(0))
|
||||
dapm(N_PGA(1), N_BUFFER(2))
|
||||
dapm(N_BUFFER(3), N_PGA(1))
|
||||
]
|
||||
}
|
||||
P_GRAPH(pipe-ll-playback-PIPELINE_ID, PIPELINE_ID,
|
||||
LIST(` ',
|
||||
`dapm(N_PCMP, Low Latency Playback PCM_ID)',
|
||||
`dapm(N_BUFFER(0), N_PCMP)',
|
||||
`dapm(N_PGA(0), N_BUFFER(0))',
|
||||
`dapm(N_BUFFER(1), N_PGA(0))',
|
||||
`dapm(N_MIXER(0), N_BUFFER(1))',
|
||||
`dapm(N_BUFFER(2), N_MIXER(0))',
|
||||
`dapm(N_PGA(1), N_BUFFER(2))',
|
||||
`dapm(N_BUFFER(3), N_PGA(1))'))
|
||||
|
||||
#
|
||||
# Pipeline Source and Sinks
|
||||
|
|
|
@ -36,14 +36,10 @@ W_PIPELINE(N_DAI_IN, SCHEDULE_DEADLINE, SCHEDULE_PRIORITY, SCHEDULE_FRAMES, SCHE
|
|||
#
|
||||
# host PCM_C <-- B0 <-- sink DAI0
|
||||
|
||||
SectionGraph."pipe-pass-capture-PIPELINE_ID" {
|
||||
index STR(PIPELINE_ID)
|
||||
|
||||
lines [
|
||||
dapm(Passthrough Capture PCM_ID, N_PCMC)
|
||||
dapm(N_PCMC, N_BUFFER(0))
|
||||
]
|
||||
}
|
||||
P_GRAPH(pipe-pass-capture-PIPELINE_ID, PIPELINE_ID,
|
||||
LIST(` ',
|
||||
`dapm(Passthrough Capture PCM_ID, N_PCMC)',
|
||||
`dapm(N_PCMC, N_BUFFER(0))'))
|
||||
|
||||
#
|
||||
# Pipeline Source and Sinks
|
||||
|
|
|
@ -36,14 +36,10 @@ W_PIPELINE(N_DAI_OUT, SCHEDULE_DEADLINE, SCHEDULE_PRIORITY, SCHEDULE_FRAMES, SCH
|
|||
#
|
||||
# host PCM_P --> B0 --> sink DAI0
|
||||
|
||||
SectionGraph."pipe-pass-playback-PIPELINE_ID" {
|
||||
index STR(PIPELINE_ID)
|
||||
|
||||
lines [
|
||||
dapm(N_PCMP, Passthrough Playback PCM_ID)
|
||||
dapm(N_BUFFER(0), N_PCMP)
|
||||
]
|
||||
}
|
||||
P_GRAPH(pipe-pass-playback-PIPELINE_ID, PIPELINE_ID,
|
||||
LIST(` ',
|
||||
`dapm(N_PCMP, Passthrough Playback PCM_ID)',
|
||||
`dapm(N_BUFFER(0), N_PCMP)'))
|
||||
|
||||
#
|
||||
# Pipeline Source and Sinks
|
||||
|
|
|
@ -71,18 +71,14 @@ W_BUFFER(2, COMP_BUFFER_SIZE(3,
|
|||
# PCM --B0--> volume --B1--> SRC --> B2 --> Endpoint Pipeline
|
||||
#
|
||||
|
||||
SectionGraph."pipe-media-PIPELINE_ID" {
|
||||
index STR(PIPELINE_ID)
|
||||
|
||||
lines [
|
||||
dapm(N_PCMP, Media Playback PCM_ID)
|
||||
dapm(N_BUFFER(0), N_PCMP)
|
||||
dapm(N_PGA(0), N_BUFFER(0))
|
||||
dapm(N_BUFFER(1), N_PGA(0))
|
||||
dapm(N_SRC(0), N_BUFFER(1))
|
||||
dapm(N_BUFFER(2), N_SRC(0))
|
||||
]
|
||||
}
|
||||
P_GRAPH(pipe-media-PIPELINE_ID, PIPELINE_ID,
|
||||
LIST(` ',
|
||||
`dapm(N_PCMP, Media Playback PCM_ID)',
|
||||
`dapm(N_BUFFER(0), N_PCMP)',
|
||||
`dapm(N_PGA(0), N_BUFFER(0))',
|
||||
`dapm(N_BUFFER(1), N_PGA(0))',
|
||||
`dapm(N_SRC(0), N_BUFFER(1))'
|
||||
`dapm(N_BUFFER(2), N_SRC(0))'))
|
||||
|
||||
#
|
||||
# Pipeline Source and Sinks
|
||||
|
|
|
@ -60,16 +60,12 @@ W_PIPELINE(N_DAI_IN, SCHEDULE_DEADLINE, SCHEDULE_PRIORITY, SCHEDULE_FRAMES,
|
|||
#
|
||||
# host PCM_P <-- B0 <-- SRC 0 <-- B1 <-- sink DAI0
|
||||
|
||||
SectionGraph."pipe-pass-src-capture-PIPELINE_ID" {
|
||||
index STR(PIPELINE_ID)
|
||||
|
||||
lines [
|
||||
dapm(Passthrough Capture PCM_ID, N_PCMC)
|
||||
dapm(N_PCMC, N_BUFFER(0))
|
||||
dapm(N_BUFFER(0), N_SRC(0))
|
||||
dapm(N_SRC(0), N_BUFFER(1))
|
||||
]
|
||||
}
|
||||
P_GRAPH(pipe-pass-src-capture-PIPELINE_ID, PIPELINE_ID,
|
||||
LIST(` ',
|
||||
`dapm(Passthrough Capture PCM_ID, N_PCMC)',
|
||||
`dapm(N_PCMC, N_BUFFER(0))',
|
||||
`dapm(N_BUFFER(0), N_SRC(0))',
|
||||
`dapm(N_SRC(0), N_BUFFER(1))'))
|
||||
|
||||
#
|
||||
# Pipeline Source and Sinks
|
||||
|
|
|
@ -60,16 +60,12 @@ W_PIPELINE(N_DAI_OUT, SCHEDULE_DEADLINE, SCHEDULE_PRIORITY, SCHEDULE_FRAMES,
|
|||
#
|
||||
# host PCM_P --> B0 --> SRC 0 --> B1 --> sink DAI0
|
||||
|
||||
SectionGraph."pipe-pass-src-playback-PIPELINE_ID" {
|
||||
index STR(PIPELINE_ID)
|
||||
|
||||
lines [
|
||||
dapm(N_PCMP, Passthrough Playback PCM_ID)
|
||||
dapm(N_BUFFER(0), N_PCMP)
|
||||
dapm(N_SRC(0), N_BUFFER(0))
|
||||
dapm(N_BUFFER(1), N_SRC(0))
|
||||
]
|
||||
}
|
||||
P_GRAPH(pipe-pass-src-playback-PIPELINE_ID, PIPELINE_ID,
|
||||
LIST(` ',
|
||||
`dapm(N_PCMP, Passthrough Playback PCM_ID)',
|
||||
`dapm(N_BUFFER(0), N_PCMP)',
|
||||
`dapm(N_SRC(0), N_BUFFER(0))',
|
||||
`dapm(N_BUFFER(1), N_SRC(0))'))
|
||||
|
||||
#
|
||||
# Pipeline Source and Sinks
|
||||
|
|
|
@ -57,15 +57,11 @@ W_BUFFER(1, COMP_BUFFER_SIZE(2,
|
|||
# Tone --B0--> volume --B1--> Endpoint Pipeline
|
||||
#
|
||||
|
||||
SectionGraph."pipe-tone-PIPELINE_ID" {
|
||||
index STR(PIPELINE_ID)
|
||||
|
||||
lines [
|
||||
dapm(N_BUFFER(0), N_TONE(0))
|
||||
dapm(N_PGA(0), N_BUFFER(0))
|
||||
dapm(N_BUFFER(1), N_PGA(0))
|
||||
]
|
||||
}
|
||||
P_GRAPH(pipe-tone-PIPELINE_ID, PIPELINE_ID,
|
||||
LIST(` ',
|
||||
`dapm(N_BUFFER(0), N_TONE(0))',
|
||||
`dapm(N_PGA(0), N_BUFFER(0))',
|
||||
`dapm(N_BUFFER(1), N_PGA(0))'))
|
||||
|
||||
#
|
||||
# Pipeline Source and Sinks
|
||||
|
|
|
@ -55,16 +55,12 @@ W_PIPELINE(N_DAI_IN, SCHEDULE_DEADLINE, SCHEDULE_PRIORITY, SCHEDULE_FRAMES,
|
|||
#
|
||||
# host PCM_P <-- B0 <-- Volume 0 <-- B1 <-- sink DAI0
|
||||
|
||||
SectionGraph."pipe-pass-vol-capture-PIPELINE_ID" {
|
||||
index STR(PIPELINE_ID)
|
||||
|
||||
lines [
|
||||
dapm(Passthrough Capture PCM_ID, N_PCMC)
|
||||
dapm(N_PCMC, N_BUFFER(0))
|
||||
dapm(N_BUFFER(0), N_PGA(0))
|
||||
dapm(N_PGA(0), N_BUFFER(1))
|
||||
]
|
||||
}
|
||||
P_GRAPH(pipe-pass-vol-capture-PIPELINE_ID, PIPELINE_ID,
|
||||
LIST(` ',
|
||||
`dapm(Passthrough Capture PCM_ID, N_PCMC)',
|
||||
`dapm(N_PCMC, N_BUFFER(0))',
|
||||
`dapm(N_BUFFER(0), N_PGA(0))',
|
||||
`dapm(N_PGA(0), N_BUFFER(1))'))
|
||||
|
||||
#
|
||||
# Pipeline Source and Sinks
|
||||
|
|
|
@ -64,16 +64,12 @@ W_PIPELINE(N_DAI_OUT, SCHEDULE_DEADLINE, SCHEDULE_PRIORITY, SCHEDULE_FRAMES,
|
|||
#
|
||||
# host PCM_P --> B0 --> Volume 0 --> B1 --> sink DAI0
|
||||
|
||||
SectionGraph."pipe-pass-vol-playback-PIPELINE_ID" {
|
||||
index STR(PIPELINE_ID)
|
||||
|
||||
lines [
|
||||
dapm(N_PCMP, Passthrough Playback PCM_ID)
|
||||
dapm(N_BUFFER(0), N_PCMP)
|
||||
dapm(N_PGA(0), N_BUFFER(0))
|
||||
dapm(N_BUFFER(1), N_PGA(0))
|
||||
]
|
||||
}
|
||||
P_GRAPH(pipe-pass-vol-playback-PIPELINE_ID, PIPELINE_ID,
|
||||
LIST(` ',
|
||||
`dapm(N_PCMP, Passthrough Playback PCM_ID)',
|
||||
`dapm(N_BUFFER(0), N_PCMP)',
|
||||
`dapm(N_PGA(0), N_BUFFER(0))',
|
||||
`dapm(N_BUFFER(1), N_PGA(0))'))
|
||||
|
||||
#
|
||||
# Pipeline Source and Sinks
|
||||
|
|
Loading…
Reference in New Issue