I am trying to integrate a CS47L35 codec from Cirrus Logic to the Xavier NX. In /sys/kernel/debug/asoc/jetson-xaviernx-ape/codec:cs47l35-codec/dapm/, I see the prefix “x” in the widgets. So I wanted to know which piece of code adds that prefix.
In DTS file, in the sound node, you would have added a dai link connecting desired codec dai(cs47l35 in your case) and i2s. The “name-prefix” property of the dai-link specifies the prefix for the dapm widgets specific to the dai-link path. This shall be internally parsed by kernel sound drivers.
“Configure DAPM Routes” subsection at link offers detailed description. Please note
I have been told that prefixing is slightly bugged in the core on the 4.9 kernel (which I am using). So I wanted to know which piece of code adds it. I have been going through the kernel code and I think tegra_asoc_populate_codec_confs() in the nvidia/sound/soc/tegra-alt/utils/tegra_asoc_machine_alt.c file is responsible for this… So can you please verify this?
If your target is integration of codec, please specify the name-prefix correctly and codec integration will wor kfine provided your routes and other relevant props are fine
tegra_asoc_populate_codec_confs() populates the codec info field((of which name-prefix is one). To understand further usage of the field, you might need to explore code further including alsa core