topology: align device numbers in SoundWire topologies

This patch follows the suggested layout:

PCM0   playback	Jack
PCM1   capture 	Jack
PCM2   playback	Speaker
PCM3   capture	Amplifier Reference (typically based on I/V feedback)
PCM4   capture 	Microphone
PCM5   playback	HDMI 1
PCM6   playback	HDMI 2
PCM7   playback	HDMI 3
PCM8   playback	HDMI 4
PCM9   RESERVED
PCM10  capture	DMIC
PCM11  capture	DMIC16kHz
PCM12  capture 	BufferedMic (aka KPB)
PCM13  playback Bluetooth
PCM14  capture 	Bluetooth

PCM40  playback	Speaker 2 (non-aggregated)

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
This commit is contained in:
Pierre-Louis Bossart 2021-02-01 16:18:46 -06:00 committed by Liam Girdwood
parent 12d5b1358e
commit 8839f8536b
6 changed files with 91 additions and 88 deletions

View File

@ -28,11 +28,11 @@ include(`platform/intel/cml.m4')
ifelse(CHANNELS, `0', ,
`
define(DMIC_PCM_48k_ID, `2')
define(DMIC_PCM_48k_ID, `10')
define(DMIC_PIPELINE_48k_ID, `3')
define(DMIC_DAI_LINK_48k_ID, `2')
define(DMIC_PCM_16k_ID, `3')
define(DMIC_PCM_16k_ID, `11')
define(DMIC_PIPELINE_16k_ID, `4')
define(DMIC_DAI_LINK_16k_ID, `3')
@ -47,11 +47,11 @@ DEBUG_START
#
# PCM0 ---> volume ----> ALH 2 BE dailink 0
# PCM1 <--- volume <---- ALH 3 BE dailink 1
# PCM2 <---------------- DMIC01 (dmic0 capture, BE dailink 2)
# PCM3 <---------------- DMIC16k (dmic16k, BE dailink 3)
# PCM4 ----> volume -----> iDisp1 (HDMI/DP playback, BE link 4)
# PCM5 ----> volume -----> iDisp2 (HDMI/DP playback, BE link 5)
# PCM6 ----> volume -----> iDisp3 (HDMI/DP playback, BE link 6)
# PCM10 <---------------- DMIC01 (dmic0 capture, BE dailink 2)
# PCM11 <---------------- DMIC16k (dmic16k, BE dailink 3)
# PCM5 ----> volume -----> iDisp1 (HDMI/DP playback, BE link 4)
# PCM6 ----> volume -----> iDisp2 (HDMI/DP playback, BE link 5)
# PCM7 ----> volume -----> iDisp3 (HDMI/DP playback, BE link 6)
#
dnl PIPELINE_PCM_ADD(pipeline,
@ -74,13 +74,6 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4,
1000, 0, 0,
48000, 48000, 48000)
# Low Latency playback pipeline 5 on PCM 4 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
5, 4, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)
# Low Latency playback pipeline 6 on PCM 5 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
@ -95,6 +88,13 @@ PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
1000, 0, 0,
48000, 48000, 48000)
# Low Latency playback pipeline 8 on PCM 7 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
8, 7, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)
#
# DAIs configuration
#
@ -121,31 +121,31 @@ DAI_ADD(sof/pipe-dai-capture.m4,
# playback DAI is iDisp1 using 2 periods
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-playback.m4,
5, HDA, 0, iDisp1,
PIPELINE_SOURCE_5, 2, s32le,
6, HDA, 0, iDisp1,
PIPELINE_SOURCE_6, 2, s32le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
# playback DAI is iDisp2 using 2 periods
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-playback.m4,
6, HDA, 1, iDisp2,
PIPELINE_SOURCE_6, 2, s32le,
7, HDA, 1, iDisp2,
PIPELINE_SOURCE_7, 2, s32le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
# playback DAI is iDisp3 using 2 periods
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-playback.m4,
7, HDA, 2, iDisp3,
PIPELINE_SOURCE_7, 2, s32le,
8, HDA, 2, iDisp3,
PIPELINE_SOURCE_8, 2, s32le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
# PCM Low Latency, id 0
dnl PCM_PLAYBACK_ADD(name, pcm_id, playback)
PCM_PLAYBACK_ADD(SDW1-speakers, 0, PIPELINE_PCM_1)
PCM_CAPTURE_ADD(SDW1-mics, 1, PIPELINE_PCM_2)
PCM_PLAYBACK_ADD(HDMI1, 4, PIPELINE_PCM_5)
PCM_PLAYBACK_ADD(HDMI2, 5, PIPELINE_PCM_6)
PCM_PLAYBACK_ADD(HDMI3, 6, PIPELINE_PCM_7)
PCM_PLAYBACK_ADD(HDMI1, 5, PIPELINE_PCM_6)
PCM_PLAYBACK_ADD(HDMI2, 6, PIPELINE_PCM_7)
PCM_PLAYBACK_ADD(HDMI3, 7, PIPELINE_PCM_8)
#
# BE configurations - overrides config in ACPI if present

View File

@ -28,11 +28,11 @@ include(`platform/intel/icl.m4')
ifelse(CHANNELS, `0', ,
`
define(DMIC_PCM_48k_ID, `2')
define(DMIC_PCM_48k_ID, `10')
define(DMIC_PIPELINE_48k_ID, `3')
define(DMIC_DAI_LINK_48k_ID, `2')
define(DMIC_PCM_16k_ID, `3')
define(DMIC_PCM_16k_ID, `11')
define(DMIC_PIPELINE_16k_ID, `4')
define(DMIC_DAI_LINK_16k_ID, `3')
@ -47,11 +47,11 @@ DEBUG_START
#
# PCM0 ---> volume ----> ALH 2 BE dailink 0
# PCM1 <--- volume <---- ALH 3 BE dailink 1
# PCM2 <---------------- DMIC01 (dmic0 capture, BE dailink 2)
# PCM3 <---------------- DMIC16k (dmic16k, BE dailink 3)
# PCM4 ----> volume -----> iDisp1 (HDMI/DP playback, BE link 4)
# PCM5 ----> volume -----> iDisp2 (HDMI/DP playback, BE link 5)
# PCM6 ----> volume -----> iDisp3 (HDMI/DP playback, BE link 6)
# PCM10 <---------------- DMIC01 (dmic0 capture, BE dailink 2)
# PCM11 <---------------- DMIC16k (dmic16k, BE dailink 3)
# PCM5 ----> volume -----> iDisp1 (HDMI/DP playback, BE link 4)
# PCM6 ----> volume -----> iDisp2 (HDMI/DP playback, BE link 5)
# PCM7 ----> volume -----> iDisp3 (HDMI/DP playback, BE link 6)
#
dnl PIPELINE_PCM_ADD(pipeline,
@ -74,13 +74,6 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4,
1000, 0, 0,
48000, 48000, 48000)
# Low Latency playback pipeline 5 on PCM 4 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
5, 4, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)
# Low Latency playback pipeline 6 on PCM 5 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
@ -95,6 +88,13 @@ PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
1000, 0, 0,
48000, 48000, 48000)
# Low Latency playback pipeline 8 on PCM 7 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
8, 7, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)
#
# DAIs configuration
#
@ -121,31 +121,31 @@ DAI_ADD(sof/pipe-dai-capture.m4,
# playback DAI is iDisp1 using 2 periods
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-playback.m4,
5, HDA, 0, iDisp1,
PIPELINE_SOURCE_5, 2, s32le,
6, HDA, 0, iDisp1,
PIPELINE_SOURCE_6, 2, s32le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
# playback DAI is iDisp2 using 2 periods
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-playback.m4,
6, HDA, 1, iDisp2,
PIPELINE_SOURCE_6, 2, s32le,
7, HDA, 1, iDisp2,
PIPELINE_SOURCE_7, 2, s32le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
# playback DAI is iDisp3 using 2 periods
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-playback.m4,
7, HDA, 2, iDisp3,
PIPELINE_SOURCE_7, 2, s32le,
8, HDA, 2, iDisp3,
PIPELINE_SOURCE_8, 2, s32le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
# PCM Low Latency, id 0
dnl PCM_PLAYBACK_ADD(name, pcm_id, playback)
PCM_PLAYBACK_ADD(SDW0-speakers, 0, PIPELINE_PCM_1)
PCM_CAPTURE_ADD(SDW0-mics, 1, PIPELINE_PCM_2)
PCM_PLAYBACK_ADD(HDMI1, 4, PIPELINE_PCM_5)
PCM_PLAYBACK_ADD(HDMI2, 5, PIPELINE_PCM_6)
PCM_PLAYBACK_ADD(HDMI3, 6, PIPELINE_PCM_7)
PCM_PLAYBACK_ADD(HDMI1, 5, PIPELINE_PCM_6)
PCM_PLAYBACK_ADD(HDMI2, 6, PIPELINE_PCM_7)
PCM_PLAYBACK_ADD(HDMI3, 7, PIPELINE_PCM_8)
#
# BE configurations - overrides config in ACPI if present

View File

@ -61,11 +61,11 @@ MUXDEMUX_CONFIG(demux_priv_3, 2, LIST(` ', `matrix1,', `matrix2'))
# PCM1 <--- volume <---- ALH 3 BE dailink 1
# PCM2 ---> volume ----> ALH 2 BE dailink 2
ifdef(`MONO', `',
`# PCM3 ---> volume ----> ALH 2 BE dailink 3')
`# PCM40 ---> volume ----> ALH 2 BE dailink 3')
# PCM4 <--- volume <---- ALH 2 BE dailink 4
# PCM5 ---> volume <---- iDisp1
# PCM6 ---> volume <---- iDisp2
# PCM7 ---> volume <---- iDisp3
# PCM5 ---> volume ----> iDisp1
# PCM6 ---> volume ----> iDisp2
# PCM7 ---> volume ----> iDisp3
dnl PIPELINE_PCM_ADD(pipeline,
dnl pipe id, pcm, max channels, format,
@ -105,11 +105,11 @@ PIPELINE_PCM_ADD(ifdef(`NO_AGGREGATION',`sof/pipe-volume-playback.m4',
1000, 0, 0,
48000, 48000, 48000)
# Low Latency playback pipeline 4 on PCM 3 using max 2 channels of s32le.
# Low Latency playback pipeline 4 on PCM 40 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(ifdef(`NO_AGGREGATION', `sof/pipe-volume-playback.m4',
`sof/pipe-dai-endpoint.m4'),
4, 3, 2, s32le,
4, 40, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)
')
@ -230,7 +230,7 @@ dnl PCM_PLAYBACK_ADD(name, pcm_id, playback)
PCM_PLAYBACK_ADD(Headphone, 0, PIPELINE_PCM_1)
PCM_CAPTURE_ADD(Headset mic, 1, PIPELINE_PCM_2)
PCM_PLAYBACK_ADD(SDW1-speakers, 2, PIPELINE_PCM_3)
ifdef(`NO_AGGREGATION', `PCM_PLAYBACK_ADD(SDW2-speakers, 3, PIPELINE_PCM_4)',`')
ifdef(`NO_AGGREGATION', `PCM_PLAYBACK_ADD(SDW2-speakers, 40, PIPELINE_PCM_4)',`')
PCM_CAPTURE_ADD(Microphones, 4, PIPELINE_PCM_5)
PCM_PLAYBACK_ADD(HDMI1, 5, PIPELINE_PCM_6)
PCM_PLAYBACK_ADD(HDMI2, 6, PIPELINE_PCM_7)

View File

@ -27,11 +27,11 @@ include(`platform/intel/tgl.m4')
ifelse(CHANNELS, `0', ,
`
define(DMIC_PCM_48k_ID, `3')
define(DMIC_PCM_48k_ID, `10')
define(DMIC_PIPELINE_48k_ID, `4')
define(DMIC_DAI_LINK_48k_ID, `3')
define(DMIC_PCM_16k_ID, `4')
define(DMIC_PCM_16k_ID, `11')
define(DMIC_PIPELINE_16k_ID, `5')
define(DMIC_DAI_LINK_16k_ID, `4')
@ -47,12 +47,12 @@ DEBUG_START
# PCM0 ---> volume ----> ALH 2 BE dailink 0
# PCM1 <--- volume <---- ALH 3 BE dailink 1
# PCM2 ---> volume ----> ALH 2 BE dailink 2
# PCM3 <----volume <---- DMIC01
# PCM4 <----volume <---- DMIC16k
# PCM5 ---> volume <---- iDisp1
# PCM6 ---> volume <---- iDisp2
# PCM7 ---> volume <---- iDisp3
# PCM8 ---> volume <---- iDisp4
# PCM10 <----volume <---- DMIC01
# PCM11 <----volume <---- DMIC16k
dnl PIPELINE_PCM_ADD(pipeline,
dnl pipe id, pcm, max channels, format,

View File

@ -28,9 +28,9 @@ DEBUG_START
# PCM1 <--- volume <---- ALH 0x103 BE dailink 1
# PCM2 ---> volume ----> ALH 0x202 BE dailink 2
# PCM4 <--- volume <---- ALH 0x2 BE dailink 4
# PCM5 ---> volume <---- iDisp1
# PCM6 ---> volume <---- iDisp2
# PCM7 ---> volume <---- iDisp3
# PCM5 ---> volume ----> iDisp1
# PCM6 ---> volume ----> iDisp2
# PCM7 ---> volume ----> iDisp3
dnl PIPELINE_PCM_ADD(pipeline,
dnl pipe id, pcm, max channels, format,

View File

@ -34,12 +34,13 @@ DEBUG_START
# |
# |
# PCM3 <---- demux <----- ALH0x103 (Speaker -max98373)
# PCM4 <---- volume <---- DMIC01 (dmic 48k capture)
# PCM5 <---- kpb <---- DMIC16k (dmic 16k capture)
# PCM6 ----> volume -----> iDisp1
# PCM7 ----> volume -----> iDisp2
# PCM8 ----> volume -----> iDisp3
# PCM5 ----> volume -----> iDisp1
# PCM6 ----> volume -----> iDisp2
# PCM7 ----> volume -----> iDisp3
# PCM9 ----> volume -----> iDisp4
# PCM10 <---- volume <---- DMIC01 (dmic 48k capture)
# PCM12 <---- kpb <---- DMIC16k (dmic 16k capture)
define(`SDW', 1)
@ -75,7 +76,9 @@ include(`sof-smart-amplifier.m4')
dnl PIPELINE_PCM_ADD(pipeline,
dnl pipe id, pcm, max channels, format,
dnl frames, deadline, priority, core)
dnl period, priority, core,
dnl pcm_min_rate, pcm_max_rate, pipeline_rate,
dnl time_domain, sched_comp)
# 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
@ -98,10 +101,10 @@ define(CHANNELS, `4')
# define kfbm with volume
define(KFBM_TYPE, `vol-kfbm')
# define pcm, pipeline and dai id
define(DMIC_PCM_48k_ID, `4')
define(DMIC_PCM_48k_ID, `10')
define(DMIC_PIPELINE_48k_ID, `11')
define(DMIC_DAI_LINK_48k_ID, `4')
define(DMIC_PCM_16k_ID, `5')
define(DMIC_PCM_16k_ID, `12')
define(DMIC_PIPELINE_16k_ID, `12')
define(DMIC_PIPELINE_KWD_ID, `13')
define(DMIC_DAI_LINK_16k_ID, `5')
@ -110,6 +113,13 @@ define(KWD_PIPE_SCH_DEADLINE_US, 5000)
# include the generic dmic with kwd
include(`platform/intel/intel-generic-dmic-kwd.m4')
# Low Latency playback pipeline 6 on PCM 5 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
6, 5, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)
# Low Latency playback pipeline 7 on PCM 6 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
@ -131,13 +141,6 @@ PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
1000, 0, 0,
48000, 48000, 48000)
# Low Latency playback pipeline 10 on PCM 9 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
10, 9, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)
#
# DAIs configuration
#
@ -145,7 +148,7 @@ PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
dnl DAI_ADD(pipeline,
dnl pipe id, dai type, dai_index, dai_be,
dnl buffer, periods, format,
dnl frames, deadline, priority, core)
dnl deadline, priority, core, time_domain)
# playback DAI is ALH(ALH0 PIN2) using 2 periods
# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0
@ -164,29 +167,29 @@ DAI_ADD(sof/pipe-dai-capture.m4,
# playback DAI is iDisp1 using 2 periods
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-playback.m4,
7, HDA, 0, iDisp1,
PIPELINE_SOURCE_7, 2, s32le,
6, HDA, 0, iDisp1,
PIPELINE_SOURCE_6, 2, s32le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
# playback DAI is iDisp2 using 2 periods
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-playback.m4,
8, HDA, 1, iDisp2,
PIPELINE_SOURCE_8, 2, s32le,
7, HDA, 1, iDisp2,
PIPELINE_SOURCE_7, 2, s32le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
# playback DAI is iDisp3 using 2 periods
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-playback.m4,
9, HDA, 2, iDisp3,
PIPELINE_SOURCE_9, 2, s32le,
8, HDA, 2, iDisp3,
PIPELINE_SOURCE_8, 2, s32le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
# playback DAI is iDisp4 using 2 periods
# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-playback.m4,
10, HDA, 3, iDisp4,
PIPELINE_SOURCE_10, 2, s32le,
9, HDA, 3, iDisp4,
PIPELINE_SOURCE_9, 2, s32le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)
#
@ -195,10 +198,10 @@ DAI_ADD(sof/pipe-dai-playback.m4,
dnl PCM_PLAYBACK_ADD(name, pcm_id, playback)
PCM_PLAYBACK_ADD(Headphone, 0, PIPELINE_PCM_1)
PCM_CAPTURE_ADD(Headset mic, 1, PIPELINE_PCM_2)
PCM_PLAYBACK_ADD(HDMI1, 6, PIPELINE_PCM_7)
PCM_PLAYBACK_ADD(HDMI2, 7, PIPELINE_PCM_8)
PCM_PLAYBACK_ADD(HDMI3, 8, PIPELINE_PCM_9)
PCM_PLAYBACK_ADD(HDMI4, 9, PIPELINE_PCM_10)
PCM_PLAYBACK_ADD(HDMI1, 5, PIPELINE_PCM_6)
PCM_PLAYBACK_ADD(HDMI2, 6, PIPELINE_PCM_7)
PCM_PLAYBACK_ADD(HDMI3, 7, PIPELINE_PCM_8)
PCM_PLAYBACK_ADD(HDMI4, 8, PIPELINE_PCM_9)
#
# BE configurations - overrides config in ACPI if present