From d22a34869ecd49755badf8d5fe827d9bf573e190 Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Thu, 19 Dec 2024 10:03:35 +0800 Subject: [PATCH] topology1: sof-tgl-rt711-rt1308: add NOJACK support The NO_JACK flag is just to adjust the JACK_OFFSET to calculate the DMIC link ID. But it doesn't remove the jack PCMs. However, the way that machine driver set the link ID is changed. Now the formula define(DMIC_DAI_LINK_48k_ID, eval(JACK_OFFSET+AMP_OFFSET+AMP_REF_OFFSET)) is not always true. To not impact the existing topologies, the commit suggests to add a NOJACK flag like sof-icl-rt711-rt1308-rt715-hdmi.m4 does to remove the JACK PCMs. Signed-off-by: Bard Liao --- tools/topology/topology1/sof-tgl-rt711-rt1308.m4 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/topology/topology1/sof-tgl-rt711-rt1308.m4 b/tools/topology/topology1/sof-tgl-rt711-rt1308.m4 index 73f3bc7b67ae..5e241c81a347 100644 --- a/tools/topology/topology1/sof-tgl-rt711-rt1308.m4 +++ b/tools/topology/topology1/sof-tgl-rt711-rt1308.m4 @@ -112,10 +112,13 @@ ifdef(`BT_OFFLOAD', # Low Latency capture pipeline 2 on PCM 1 using max 2 channels of s32le. # Schedule 48 frames per 1000us deadline with priority 0 on core 0 +ifdef(`NOJACK', `', +` PIPELINE_PCM_ADD(sof/pipe-volume-switch-capture.m4, 2, 1, 2, s32le, 1000, 0, 0, 48000, 48000, 48000) +') ifdef(`EXT_AMP', ` @@ -163,6 +166,8 @@ dnl pipe id, dai type, dai_index, dai_be, dnl buffer, periods, format, dnl deadline, priority, core, time_domain) +ifdef(`NOJACK', `', +` # playback DAI is ALH(SDW0 PIN2) using 2 periods # Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0 DAI_ADD(sof/pipe-mixer-volume-dai-playback.m4, @@ -214,6 +219,7 @@ ifdef(`HEADSET_DEEP_BUFFER', ) ] } +') ifdef(`EXT_AMP', ` @@ -255,6 +261,8 @@ DAI_ADD(sof/pipe-dai-playback.m4, # PCM Low Latency, id 0 dnl PCM_PLAYBACK_ADD(name, pcm_id, playback) +ifdef(`NOJACK', `', +` PCM_PLAYBACK_ADD(Jack Out, 0, PIPELINE_PCM_30) ifdef(`HEADSET_DEEP_BUFFER', ` @@ -262,6 +270,7 @@ PCM_PLAYBACK_ADD(Jack Out DeepBuffer, 31, PIPELINE_PCM_31) ' ) PCM_CAPTURE_ADD(Jack In, 1, PIPELINE_PCM_2) +') ifdef(`EXT_AMP', ` PCM_PLAYBACK_ADD(Speaker, 2, PIPELINE_PCM_3) @@ -276,12 +285,15 @@ PCM_PLAYBACK_ADD(HDMI 4, 8, PIPELINE_PCM_9) #ALH dai index = ((link_id << 8) | PDI id) #ALH SDW0 Pin2 (ID: 0) +ifdef(`NOJACK', `', +` DAI_CONFIG(ALH, 2, 0, SDW0-Playback, ALH_CONFIG(ALH_CONFIG_DATA(ALH, 2, 48000, 2))) #ALH SDW0 Pin3 (ID: 1) DAI_CONFIG(ALH, 3, 1, SDW0-Capture, ALH_CONFIG(ALH_CONFIG_DATA(ALH, 3, 48000, 2))) +') ifdef(`EXT_AMP', `