mirror of https://github.com/thesofproject/sof.git
topology2: cavs-sdw: group route and pipeline index
A topology may be constructed by some .conf files. We may use a duplicated route index or pipeline index by accident. This commit suggests a rule to assign route and pipeline index. We have a consistent pcm id. For example, Jack out: 0 Jack in: 1 Speaker: 2 Microphone: 4 We can use a simple formula to assign the route and pipeline index for each pcm. The formula this commit suppests is pcm id * 10 ~ pcm id * 10 + 9. That is 0 ~ 9 for pcm 0, 10 ~ 19 for pcm 1, and so on. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
This commit is contained in:
parent
192fda25a8
commit
f0a010052b
|
@ -40,10 +40,10 @@ Define {
|
|||
# override DMIC default definitions
|
||||
PDM1_MIC_A_ENABLE 1
|
||||
PDM1_MIC_B_ENABLE 1
|
||||
DMIC0_HOST_PIPELINE_ID 13
|
||||
DMIC0_DAI_PIPELINE_ID 14
|
||||
DMIC0_HOST_PIPELINE_SINK 'copier.host.13.1'
|
||||
DMIC0_DAI_PIPELINE_SRC 'copier.DMIC.14.1'
|
||||
DMIC0_HOST_PIPELINE_ID 100
|
||||
DMIC0_DAI_PIPELINE_ID 101
|
||||
DMIC0_HOST_PIPELINE_SINK 'copier.host.100.1'
|
||||
DMIC0_DAI_PIPELINE_SRC 'copier.DMIC.101.1'
|
||||
DMIC0_NAME 'dmic01'
|
||||
DMIC0_ID 4
|
||||
DMIC1_ID 5
|
||||
|
@ -113,8 +113,8 @@ Object.Dai {
|
|||
|
||||
# Pipeline ID:1 PCM ID: 0
|
||||
Object.Pipeline {
|
||||
host-copier-gain-mixin-playback."1" {
|
||||
index 1
|
||||
host-copier-gain-mixin-playback.0 {
|
||||
index 0
|
||||
|
||||
Object.Widget.copier.1 {
|
||||
stream_name "volume playback 0"
|
||||
|
@ -126,8 +126,8 @@ Object.Pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
mixout-gain-dai-copier-playback."2" {
|
||||
index 2
|
||||
mixout-gain-dai-copier-playback.1 {
|
||||
index 1
|
||||
|
||||
Object.Widget.pipeline.1.stream_name "copier.ALH.2.1"
|
||||
|
||||
|
@ -144,8 +144,8 @@ Object.Pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
passthrough-capture."4" {
|
||||
index 4
|
||||
passthrough-capture.10 {
|
||||
index 10
|
||||
Object.Widget.pipeline.1.stream_name "copier.ALH.3.1"
|
||||
|
||||
Object.Widget.copier.1.stream_name "Passthrough Capture 0"
|
||||
|
@ -155,9 +155,9 @@ Object.Pipeline {
|
|||
in_bit_depth 32
|
||||
}
|
||||
}
|
||||
passthrough-be.3 {
|
||||
passthrough-be.11 {
|
||||
direction "capture"
|
||||
index 3
|
||||
index 11
|
||||
copier_type "ALH"
|
||||
Object.Widget.pipeline.1 {
|
||||
stream_name 'copier.ALH.3.1'
|
||||
|
@ -173,7 +173,7 @@ Object.Pipeline {
|
|||
}
|
||||
|
||||
Object.PCM {
|
||||
pcm."0" {
|
||||
pcm.0 {
|
||||
name "Jack out"
|
||||
id 0
|
||||
direction "playback"
|
||||
|
@ -184,7 +184,7 @@ Object.PCM {
|
|||
formats 'S16_LE,S32_LE'
|
||||
}
|
||||
}
|
||||
pcm."1" {
|
||||
pcm.1 {
|
||||
name "Jack in"
|
||||
id 1
|
||||
direction "capture"
|
||||
|
@ -198,18 +198,18 @@ Object.PCM {
|
|||
}
|
||||
|
||||
Object.Base {
|
||||
route."0" {
|
||||
source "gain.2.1"
|
||||
sink "copier.ALH.2.1"
|
||||
route.0 {
|
||||
source "gain.1.1"
|
||||
sink "copier.ALH.1.1"
|
||||
}
|
||||
|
||||
route."1" {
|
||||
source "copier.ALH.3.1"
|
||||
sink "copier.host.4.1"
|
||||
route.1 {
|
||||
source "mixin.0.1"
|
||||
sink "mixout.1.1"
|
||||
}
|
||||
|
||||
route."2" {
|
||||
source "mixin.1.1"
|
||||
sink "mixout.2.1"
|
||||
route.10 {
|
||||
source "copier.ALH.11.1"
|
||||
sink "copier.host.10.1"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ Object.Dai {
|
|||
}
|
||||
|
||||
Object.Pipeline {
|
||||
passthrough-capture.0 {
|
||||
passthrough-capture.100 {
|
||||
format $FORMAT
|
||||
index $DMIC0_HOST_PIPELINE_ID
|
||||
Object.Widget.pipeline.1 {
|
||||
|
@ -74,7 +74,7 @@ Object.Pipeline {
|
|||
}
|
||||
}
|
||||
|
||||
passthrough-be.11 {
|
||||
passthrough-be.101 {
|
||||
direction "capture"
|
||||
format $FORMAT
|
||||
index $DMIC0_DAI_PIPELINE_ID
|
||||
|
|
Loading…
Reference in New Issue