From 1901c59a6bf9bb014305d0ccc259884f7f3781c7 Mon Sep 17 00:00:00 2001 From: Brent Lu Date: Thu, 13 Jun 2024 13:59:53 +0800 Subject: [PATCH] topology1: sof-hda-generic: support BT offload pipelines Add pipelines for BT offload on SSP2. The topology file name will be sof-hda-generic-2ch-bt-ssp2.tplg or sof-hda-generic-4ch-bt-ssp2.tplg since IPC3 platforms (prior to mtl) are using SSP2 for BT offload feature. Signed-off-by: Brent Lu --- tools/topology/topology1/CMakeLists.txt | 2 ++ tools/topology/topology1/sof-hda-generic-idisp.m4 | 9 +++++++++ tools/topology/topology1/sof-hda-generic.m4 | 9 +++++++++ 3 files changed, 20 insertions(+) diff --git a/tools/topology/topology1/CMakeLists.txt b/tools/topology/topology1/CMakeLists.txt index 54452c61e3e0..19f89894b4f4 100644 --- a/tools/topology/topology1/CMakeLists.txt +++ b/tools/topology/topology1/CMakeLists.txt @@ -30,9 +30,11 @@ set(TPLGS "sof-hda-generic\;sof-hda-generic-1ch\;-DCHANNELS=2\;-DHSPROC=volume\;-DDMICPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_48khz.m4\;-DDMIC16KPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_16khz.m4\;-DDYNAMIC=1" "sof-hda-generic\;sof-hda-generic-1ch-pdm1\;-DPDM1\;-DCHANNELS=2\;-DHSPROC=volume\;-DDMICPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_48khz.m4\;-DDMIC16KPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_16khz.m4\;-DDYNAMIC=1" "sof-hda-generic\;sof-hda-generic-2ch\;-DCHANNELS=2\;-DHSPROC=volume\;-DDMICPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_48khz.m4\;-DDMIC16KPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_16khz.m4\;-DDYNAMIC=1" + "sof-hda-generic\;sof-hda-generic-2ch-bt-ssp2\;-DCHANNELS=2\;-DHSPROC=volume\;-DDMICPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_48khz.m4\;-DDMIC16KPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_16khz.m4\;-DDYNAMIC=1\;-DBT_OFFLOAD" "sof-hda-generic\;sof-hda-generic-2ch-pdm1\;-DPDM1\;-DCHANNELS=2\;-DHSPROC=volume\;-DDMICPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_48khz.m4\;-DDMIC16KPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_16khz.m4\;-DDYNAMIC=1" "sof-hda-generic\;sof-hda-generic-3ch\;-DCHANNELS=4\;-DHSPROC=volume\;-DDMICPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_48khz.m4\;-DDMIC16KPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_16khz.m4\;-DDYNAMIC=1" "sof-hda-generic\;sof-hda-generic-4ch\;-DCHANNELS=4\;-DHSPROC=volume\;-DDMICPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_48khz.m4\;-DDMIC16KPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_16khz.m4\;-DDYNAMIC=1" + "sof-hda-generic\;sof-hda-generic-4ch-bt-ssp2\;-DCHANNELS=4\;-DHSPROC=volume\;-DDMICPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_48khz.m4\;-DDMIC16KPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_16khz.m4\;-DDYNAMIC=1\;-DBT_OFFLOAD" ## end HDaudio codec topologies "sof-hda-generic-idisp\;sof-hda-generic-idisp\;-DCHANNELS=0\;-DDYNAMIC=1" diff --git a/tools/topology/topology1/sof-hda-generic-idisp.m4 b/tools/topology/topology1/sof-hda-generic-idisp.m4 index 65cd7f6a3804..c4b0686cc4c1 100644 --- a/tools/topology/topology1/sof-hda-generic-idisp.m4 +++ b/tools/topology/topology1/sof-hda-generic-idisp.m4 @@ -37,6 +37,15 @@ include(`platform/intel/intel-generic-dmic.m4') ' ) +ifdef(`BT_OFFLOAD', ` +# BT offload support +define(`BT_PIPELINE_PB_ID', `7') +define(`BT_PIPELINE_CP_ID', `8') +define(`BT_DAI_LINK_ID', 8) +define(`BT_PCM_ID', `8') +define(`HW_CONFIG_ID', 8) +include(`platform/intel/intel-generic-bt.m4')') + # # Define the pipelines # diff --git a/tools/topology/topology1/sof-hda-generic.m4 b/tools/topology/topology1/sof-hda-generic.m4 index 485ef520c496..d7fd82662e8e 100644 --- a/tools/topology/topology1/sof-hda-generic.m4 +++ b/tools/topology/topology1/sof-hda-generic.m4 @@ -37,6 +37,15 @@ include(`platform/intel/intel-generic-dmic.m4') ' ) +ifdef(`BT_OFFLOAD', ` +# BT offload support +define(`BT_PIPELINE_PB_ID', `12') +define(`BT_PIPELINE_CP_ID', `13') +define(`BT_DAI_LINK_ID', 8) +define(`BT_PCM_ID', `8') +define(`HW_CONFIG_ID', 8) +include(`platform/intel/intel-generic-bt.m4')') + # The pipeline naming notation is pipe-mixer-PROCESSING-dai-DIRECTION.m4 # HSPROC is set by makefile, if not the default above is applied define(PIPE_HEADSET_PLAYBACK, `sof/pipe-mixer-`HSPROC'-dai-playback.m4')