1# 2# Topology for SKL+ HDA for testing ASRC 3# 4 5# if XPROC is not defined, define with default pipe 6ifdef(`DMICPROC', , `define(DMICPROC, eq-iir-volume)') 7ifdef(`DMIC16KPROC', , `define(DMIC16KPROC, eq-iir-volume)') 8 9# Include topology builder 10include(`utils.m4') 11include(`dai.m4') 12include(`pipeline.m4') 13include(`hda.m4') 14 15# Include TLV library 16include(`common/tlv.m4') 17 18# Include Token library 19include(`sof/tokens.m4') 20 21# Include bxt DSP configuration 22include(`platform/intel/bxt.m4') 23 24DEBUG_START 25 26# Define pipeline id for intel-generic-dmic.m4 27# to generate dmic setting 28 29ifelse(CHANNELS, `0', , 30` 31define(DMIC_PCM_48k_ID, `6') 32define(DMIC_PCM_16k_ID, `7') 33define(DMIC_DAI_LINK_48k_ID, `6') 34define(DMIC_DAI_LINK_16k_ID, `7') 35define(DMIC_PIPELINE_48k_ID, `10') 36define(DMIC_PIPELINE_16k_ID, `11') 37 38include(`platform/intel/intel-generic-dmic.m4') 39' 40) 41 42# 43# Define the pipelines 44# 45# PCM0 <---> volume (pipe 1,2) <----> HDA Analog (HDA Analog playback/capture) 46# PCM1 <---> volume (pipe 3,4) <----> HDA Digital (HDA Digital playback/capture) 47# PCM3 ----> volume (pipe 7) -----> iDisp1 (HDMI/DP playback, BE link 3) 48# PCM4 ----> Volume (pipe 8) -----> iDisp2 (HDMI/DP playback, BE link 4) 49# PCM5 ----> volume (pipe 9) -----> iDisp3 (HDMI/DP playback, BE link 5) 50# 51 52# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le. 53# 1000us deadline with priority 0 on core 0 54PIPELINE_PCM_ADD(sof/pipe-asrc-volume-playback.m4, 55 1, 0, 2, s24le, 56 1000, 0, 0, 57 8000, 48000, 48000) 58 59# Low Latency capture pipeline 2 on PCM 0 using max 2 channels of s24le. 60# 1000us deadline with priority 0 on core 0 61PIPELINE_PCM_ADD(sof/pipe-asrc-volume-capture.m4, 62 2, 0, 2, s24le, 63 1000, 0, 0, 64 48000, 48000, 48000) 65 66# Low Latency playback pipeline 3 on PCM 1 using max 2 channels of s24le. 67# 1000us deadline with priority 0 on core 0 68PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 69 3, 1, 2, s24le, 70 1000, 0, 0, 71 48000, 48000, 48000) 72 73# Low Latency capture pipeline 4 on PCM 1 using max 2 channels of s24le. 74# 1000us deadline with priority 0 on core 0 75PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, 76 4, 1, 2, s24le, 77 1000, 0, 0, 78 48000, 48000, 48000) 79 80# Low Latency playback pipeline 7 on PCM 3 using max 2 channels of s24le. 81# 1000us deadline with priority 0 on core 0 82PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 83 7, 3, 2, s24le, 84 1000, 0, 0, 85 48000, 48000, 48000) 86 87# Low Latency playback pipeline 8 on PCM 4 using max 2 channels of s24le. 88# 1000us deadline with priority 0 on core 0 89PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 90 8, 4, 2, s24le, 91 1000, 0, 0, 92 48000, 48000, 48000) 93 94# Low Latency playback pipeline 9 on PCM 5 using max 2 channels of s24le. 95# 1000us deadline with priority 0 on core 0 96PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 97 9, 5, 2, s24le, 98 1000, 0, 0, 99 48000, 48000, 48000) 100 101# 102# DAIs configuration 103# 104 105# playback DAI is HDA Analog using 2 periods 106# Dai buffers use s32le format, 1000us deadline with priority 0 on core 0 107DAI_ADD(sof/pipe-dai-playback.m4, 108 1, HDA, 0, Analog Playback and Capture, 109 PIPELINE_SOURCE_1, 2, s32le, 110 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) 111 112# capture DAI is HDA Analog using 2 periods 113# Dai buffers use s32le format, 1000us deadline with priority 0 on core 0 114DAI_ADD(sof/pipe-dai-capture.m4, 115 2, HDA, 1, Analog Playback and Capture, 116 PIPELINE_SINK_2, 2, s32le, 117 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) 118 119# playback DAI is HDA Digital using 2 periods 120# Dai buffers use s32le format, 1000us deadline with priority 0 on core 0 121DAI_ADD(sof/pipe-dai-playback.m4, 122 3, HDA, 2, Digital Playback and Capture, 123 PIPELINE_SOURCE_3, 2, s32le, 124 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) 125 126# capture DAI is HDA Digital using 2 periods 127# Dai buffers use s32le format, 1000us deadline with priority 0 on core 0 128DAI_ADD(sof/pipe-dai-capture.m4, 129 4, HDA, 3, Digital Playback and Capture, 130 PIPELINE_SINK_4, 2, s32le, 131 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) 132 133# playback DAI is iDisp1 using 2 periods 134# Dai buffers use s32le format, 1000us deadline with priority 0 on core 0 135DAI_ADD(sof/pipe-dai-playback.m4, 136 7, HDA, 4, iDisp1, 137 PIPELINE_SOURCE_7, 2, s32le, 138 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) 139 140# playback DAI is iDisp2 using 2 periods 141# Dai buffers use s32le format, 1000us deadline with priority 0 on core 0 142DAI_ADD(sof/pipe-dai-playback.m4, 143 8, HDA, 5, iDisp2, 144 PIPELINE_SOURCE_8, 2, s32le, 145 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) 146 147# playback DAI is iDisp3 using 2 periods 148# Dai buffers use s32le format, 1000us deadline with priority 0 on core 0 149DAI_ADD(sof/pipe-dai-playback.m4, 150 9, HDA, 6, iDisp3, 151 PIPELINE_SOURCE_9, 2, s32le, 152 1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER) 153 154PCM_DUPLEX_ADD(HDA Analog, 0, PIPELINE_PCM_1, PIPELINE_PCM_2) 155PCM_DUPLEX_ADD(HDA Digital, 1, PIPELINE_PCM_3, PIPELINE_PCM_4) 156PCM_PLAYBACK_ADD(HDMI1, 3, PIPELINE_PCM_7) 157PCM_PLAYBACK_ADD(HDMI2, 4, PIPELINE_PCM_8) 158PCM_PLAYBACK_ADD(HDMI3, 5, PIPELINE_PCM_9) 159 160# 161# BE configurations - overrides config in ACPI if present 162# 163 164# HDA outputs 165DAI_CONFIG(HDA, 0, 4, Analog Playback and Capture, 166 HDA_CONFIG(HDA_CONFIG_DATA(HDA, 0, 48000, 2))) 167DAI_CONFIG(HDA, 1, 5, Digital Playback and Capture, 168 HDA_CONFIG(HDA_CONFIG_DATA(HDA, 1, 48000, 2))) 169# 3 HDMI/DP outputs (ID: 3,4,5) 170DAI_CONFIG(HDA, 4, 1, iDisp1, 171 HDA_CONFIG(HDA_CONFIG_DATA(HDA, 4, 48000, 2))) 172DAI_CONFIG(HDA, 5, 2, iDisp2, 173 HDA_CONFIG(HDA_CONFIG_DATA(HDA, 5, 48000, 2))) 174DAI_CONFIG(HDA, 6, 3, iDisp3, 175 HDA_CONFIG(HDA_CONFIG_DATA(HDA, 6, 48000, 2))) 176 177 178VIRTUAL_DAPM_ROUTE_IN(codec0_in, HDA, 1, IN, 1) 179VIRTUAL_DAPM_ROUTE_IN(codec1_in, HDA, 3, IN, 2) 180VIRTUAL_DAPM_ROUTE_OUT(codec0_out, HDA, 0, OUT, 3) 181VIRTUAL_DAPM_ROUTE_OUT(codec1_out, HDA, 2, OUT, 4) 182 183# codec2 is not supported in dai links but it exists 184# in dapm routes, so hack this one to HDA1 185VIRTUAL_DAPM_ROUTE_IN(codec2_in, HDA, 3, IN, 5) 186VIRTUAL_DAPM_ROUTE_OUT(codec2_out, HDA, 2, OUT, 6) 187 188VIRTUAL_DAPM_ROUTE_OUT(iDisp1_out, HDA, 4, OUT, 7) 189VIRTUAL_DAPM_ROUTE_OUT(iDisp2_out, HDA, 5, OUT, 8) 190VIRTUAL_DAPM_ROUTE_OUT(iDisp3_out, HDA, 6, OUT, 9) 191 192VIRTUAL_WIDGET(iDisp3 Tx, out_drv, 0) 193VIRTUAL_WIDGET(iDisp2 Tx, out_drv, 1) 194VIRTUAL_WIDGET(iDisp1 Tx, out_drv, 2) 195VIRTUAL_WIDGET(Analog CPU Playback, out_drv, 3) 196VIRTUAL_WIDGET(Digital CPU Playback, out_drv, 4) 197VIRTUAL_WIDGET(Alt Analog CPU Playback, out_drv, 5) 198VIRTUAL_WIDGET(Analog CPU Capture, input, 6) 199VIRTUAL_WIDGET(Digital CPU Capture, input, 7) 200VIRTUAL_WIDGET(Alt Analog CPU Capture, input, 8) 201 202DEBUG_END 203