From 6d6294385bee38accb199e2a53804ef1b536c606 Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Thu, 3 Dec 2026 08:56:36 +0800 Subject: [PATCH 1/3] topology1: rtnr: add missing put handler for google-aec-rtnr bytes control The RTNR bytes control in pipe-google-rtc-audio-processing-rtnr-capture.m4 calls CONTROLBYTES_EXTOPS() without the put argument, which expands to put "" in the generated conf. Newer alsa-lib rejects the empty ops string and fails to build sof-mt8195-mt6359-max98390-rt5682-google-aec-rtnr: (lookup_ops) [error.topology] wrong kcontrol ops value string '' (tplg_load_config) [error.topology] failed to parse topology Pass 258 for put as the other read-only RTNR pipelines do. The control is still created with C_CONTROLBYTES_READONLY, so it stays read-only. Signed-off-by: Bard Liao --- .../sof/pipe-google-rtc-audio-processing-rtnr-capture.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/topology/topology1/sof/pipe-google-rtc-audio-processing-rtnr-capture.m4 b/tools/topology/topology1/sof/pipe-google-rtc-audio-processing-rtnr-capture.m4 index 96b62685a53b..27f42932de78 100644 --- a/tools/topology/topology1/sof/pipe-google-rtc-audio-processing-rtnr-capture.m4 +++ b/tools/topology/topology1/sof/pipe-google-rtc-audio-processing-rtnr-capture.m4 @@ -49,7 +49,7 @@ CONTROLBYTES_PRIV(DEF_RTNR_PRIV, # RTNR Bytes control with max value of 255 C_CONTROLBYTES_READONLY(DEF_RTNR_BYTES, PIPELINE_ID, CONTROLBYTES_OPS(bytes, 258 binds the mixer control to bytes get handlers, 258), - CONTROLBYTES_EXTOPS(258 binds the mixer control to bytes get handlers, 258), + CONTROLBYTES_EXTOPS(258 binds the mixer control to bytes get/put handlers, 258, 258), , , , CONTROLBYTES_MAX(, 256), , From 702346c989f77e4f86048ee89a5f1034a2004821 Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Thu, 3 Dec 2026 21:51:36 +0800 Subject: [PATCH 2/3] topology1: sdw: rename MFC to MFC_CS and add MFC_RTK The MFC option maps the jack, amp and mic DAIs of a multi-function codec on a single SoundWire link to ALH pins. The pin order must follow the codec DAI order used by the kernel sof_sdw machine driver, which allocates pins starting from 2 in DAI order, playback before capture. The existing MFC pin mapping matches Cirrus Logic cs42l43 (jack out, mic, jack in, amp), but Realtek SDCA codecs such as RT722 expose their DAIs as jack (playback/capture), amp, mic. Using the cs42l43 mapping for RT722 makes the topology DAI index differ from the one the kernel sends in DAI_CONFIG, and the firmware rejects it with -ENODEV. Rename MFC to MFC_CS for the Cirrus Logic pin order and add MFC_RTK for the Realtek pin order. Both share the same DAI link names. The generated sof-rpl-cs42l43-l0 topology is unchanged. Signed-off-by: Bard Liao --- tools/topology/topology1/CMakeLists.txt | 2 +- .../sof-icl-rt711-rt1308-rt715-hdmi.m4 | 22 +++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/tools/topology/topology1/CMakeLists.txt b/tools/topology/topology1/CMakeLists.txt index 2f5f0eeaa4e4..ac80923098cd 100644 --- a/tools/topology/topology1/CMakeLists.txt +++ b/tools/topology/topology1/CMakeLists.txt @@ -140,7 +140,7 @@ set(TPLGS "sof-icl-rt711-rt1308-rt715-hdmi\;sof-rpl-rt711-l0-rt1316-l12\;-DPLATFORM=rpl\;-DUAJ_LINK=0\;-DAMP_1_LINK=1\;-DAMP_2_LINK=2\;-DEXT_AMP_REF\;-DNO_LOCAL_MIC\;-DDYNAMIC=1" "sof-icl-rt711-rt1308-rt715-hdmi\;sof-rpl-rt711-l0-rt1318-l12-rt714-l3\;-DPLATFORM=rpl\;-DUAJ_LINK=0\;-DAMP_1_LINK=1\;-DAMP_2_LINK=2\;-DEXT_AMP_REF\;-DMIC_LINK=3\;-DDYNAMIC=1" "sof-icl-rt711-rt1308-rt715-hdmi\;sof-rpl-rt711-l0-rt1318-l12\;-DPLATFORM=rpl\;-DUAJ_LINK=0\;-DAMP_1_LINK=1\;-DAMP_2_LINK=2\;-DEXT_AMP_REF\;-DNO_LOCAL_MIC\;-DDYNAMIC=1" - "sof-icl-rt711-rt1308-rt715-hdmi\;sof-rpl-cs42l43-l0\;-DPLATFORM=adl\;-DUAJ_LINK=0\;-DMIC_LINK=0\;-DAMP_1_LINK=0\;-DMONO\;-DMFC" + "sof-icl-rt711-rt1308-rt715-hdmi\;sof-rpl-cs42l43-l0\;-DPLATFORM=adl\;-DUAJ_LINK=0\;-DMIC_LINK=0\;-DAMP_1_LINK=0\;-DMONO\;-DMFC_CS" "sof-tgl-rt711-rt1308\;sof-tgl-rt711-rt1308-2ch\;-DCHANNELS=2\;-DEXT_AMP\;-DDMICPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_48khz.m4\;-DDMIC16KPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_16khz.m4\;-DPLATFORM=tgl" "sof-tgl-rt711-rt1308\;sof-tgl-rt711-rt1308-4ch\;-DCHANNELS=4\;-DEXT_AMP\;-DDMICPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_48khz.m4\;-DDMIC16KPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_16khz.m4\;-DPLATFORM=tgl" "sof-tgl-rt711-rt1308\;sof-tgl-rt711-4ch\;-DCHANNELS=4\;-DDMICPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_48khz.m4\;-DDMIC16KPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_16khz.m4\;-DPLATFORM=tgl" diff --git a/tools/topology/topology1/sof-icl-rt711-rt1308-rt715-hdmi.m4 b/tools/topology/topology1/sof-icl-rt711-rt1308-rt715-hdmi.m4 index 26430f3d45fe..429a73d7ed05 100644 --- a/tools/topology/topology1/sof-icl-rt711-rt1308-rt715-hdmi.m4 +++ b/tools/topology/topology1/sof-icl-rt711-rt1308-rt715-hdmi.m4 @@ -59,14 +59,32 @@ define(`ALH_JACK_IN_NAME', `SDW'eval(UAJ_LINK)`-Capture') define(`ALH_AMP_OUT_NAME', `SDW'eval(AMP_1_LINK)`-Playback') define(`ALH_DMIC_IN_NAME', `SDW'eval(MIC_LINK)`-Capture') -ifdef(`MFC', ` +# Multi-function codec (jack, amp and mic on one SDW link). +# The pin order follows the codec DAI order in the kernel machine driver. + +# Cirrus Logic: jack out, mic, jack in, amp +ifdef(`MFC_CS', ` +define(`MFC') undefine(`ALH_JACK_IN_PIN') undefine(`ALH_AMP_OUT_PIN') undefine(`ALH_DMIC_IN_PIN') define(`ALH_JACK_IN_PIN', `4') define(`ALH_AMP_OUT_PIN', `5') -define(`ALH_DMIC_IN_PIN', `3') +define(`ALH_DMIC_IN_PIN', `3')' +) + +# Realtek: jack out, jack in, amp, mic +ifdef(`MFC_RTK', ` +define(`MFC') +undefine(`ALH_JACK_IN_PIN') +undefine(`ALH_AMP_OUT_PIN') +undefine(`ALH_DMIC_IN_PIN') +define(`ALH_JACK_IN_PIN', `3') +define(`ALH_AMP_OUT_PIN', `4') +define(`ALH_DMIC_IN_PIN', `5')' +) +ifdef(`MFC', ` # align the partial string match of full dai link name undefine(`ALH_JACK_OUT_NAME') undefine(`ALH_JACK_IN_NAME') From 07c3648d2398ebd18f9db69f0bedfae23d196ab0 Mon Sep 17 00:00:00 2001 From: Bard Liao Date: Thu, 3 Dec 2026 21:51:36 +0800 Subject: [PATCH 3/3] topology1: add sof-rpl-rt722-l0 topology Add a topology1 target for Raptor Lake with a Realtek RT722 SDCA multi-function codec on SoundWire link 0. RT722 provides headset jack, speaker amplifier and DMIC functions on a single SoundWire link, so reuse the sof-icl-rt711-rt1308-rt715-hdmi template with the multi-function codec option: - UAJ_LINK, AMP_1_LINK and MIC_LINK all set to link 0 - MONO, as there is only one amplifier link (no demux needed) - MFC_RTK, to use the Realtek pin mapping (jack out, jack in, amp, mic) and the Playback-SimpleJack/Capture-SimpleJack/ Playback-SmartAmp/Capture-SmartMic DAI link names - DYNAMIC=1, consistent with the other RPL SoundWire targets Signed-off-by: Bard Liao --- tools/topology/topology1/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/topology/topology1/CMakeLists.txt b/tools/topology/topology1/CMakeLists.txt index ac80923098cd..7a36a87da500 100644 --- a/tools/topology/topology1/CMakeLists.txt +++ b/tools/topology/topology1/CMakeLists.txt @@ -141,6 +141,7 @@ set(TPLGS "sof-icl-rt711-rt1308-rt715-hdmi\;sof-rpl-rt711-l0-rt1318-l12-rt714-l3\;-DPLATFORM=rpl\;-DUAJ_LINK=0\;-DAMP_1_LINK=1\;-DAMP_2_LINK=2\;-DEXT_AMP_REF\;-DMIC_LINK=3\;-DDYNAMIC=1" "sof-icl-rt711-rt1308-rt715-hdmi\;sof-rpl-rt711-l0-rt1318-l12\;-DPLATFORM=rpl\;-DUAJ_LINK=0\;-DAMP_1_LINK=1\;-DAMP_2_LINK=2\;-DEXT_AMP_REF\;-DNO_LOCAL_MIC\;-DDYNAMIC=1" "sof-icl-rt711-rt1308-rt715-hdmi\;sof-rpl-cs42l43-l0\;-DPLATFORM=adl\;-DUAJ_LINK=0\;-DMIC_LINK=0\;-DAMP_1_LINK=0\;-DMONO\;-DMFC_CS" + "sof-icl-rt711-rt1308-rt715-hdmi\;sof-rpl-rt722-l0\;-DPLATFORM=rpl\;-DUAJ_LINK=0\;-DMIC_LINK=0\;-DAMP_1_LINK=0\;-DMONO\;-DMFC_RTK\;-DDYNAMIC=1" "sof-tgl-rt711-rt1308\;sof-tgl-rt711-rt1308-2ch\;-DCHANNELS=2\;-DEXT_AMP\;-DDMICPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_48khz.m4\;-DDMIC16KPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_16khz.m4\;-DPLATFORM=tgl" "sof-tgl-rt711-rt1308\;sof-tgl-rt711-rt1308-4ch\;-DCHANNELS=4\;-DEXT_AMP\;-DDMICPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_48khz.m4\;-DDMIC16KPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_16khz.m4\;-DPLATFORM=tgl" "sof-tgl-rt711-rt1308\;sof-tgl-rt711-4ch\;-DCHANNELS=4\;-DDMICPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_48khz.m4\;-DDMIC16KPROC_FILTER1=eq_iir_coef_highpass_40hz_20db_16khz.m4\;-DPLATFORM=tgl"