[TAS2557 / TAS2563] Implement driver from kernel source


I would like to add driver to TAS2557 to my system, which is in source kernel for Jetpack 4.6.1. Finally I will use TAS2563 which is compatible with TAS2557 (information is based on TI webside).
Can you tell me what I should do to use this driver with I2S3 (pins 220, 222, 224,226) and I2C3 (232, 234)

Please refer to NVIDIA Jetson Linux Driver Package Software Features : Audio Setup and Development | NVIDIA Docs



Thanks for this link. I spent last days on implement TAS2563 IC in Linux system. Finally I use driver from manufacturer (lpaa-android-drivers/tas2505-linux-driver - Unnamed repository; edit this file 'description' to name the repository.).
What I did:

  1. placed driver to kernel source - kernel/kernel-4.9/sound/soc/codecs and added driver to Kconfig & Makefile
    tas2505.c (22.1 KB)
    tas2505.h (3.2 KB)

  2. Modified device tree:
    tegra210-porg-p3448-common.dtsi (22.1 KB)

  3. Modified kernel/nvidia/sound/soc/tegra_alt/machine_driver/tegra_machine_driver_mobile.c:
    tegra_machine_driver_mobile.c (23.6 KB)

  4. Selected SND_SOC_TAS2505 in kernel/nvidia/sound/soc/tegra_alt/Kconfig

  5. Added “CONFIG_SND_SOC_TAS2505=y” in file kernel/kernel-4.9/arch/arm64/configs/tegra_defconfig

Main problem is with load driver in system (sound card doesn’t display in system). I get error:
[ 1.832278] tegra-asoc: sound: ASoC: CPU DAI DAP not registered
[ 1.838808] tegra-asoc: sound: snd_soc_register_card failed (-517)

I read about this error but solutions on forum didn’t help me to resolve this problem.
Below is dmesg log with enable debug for soc-core.c and tegra210_i2s_alt.c::
dmesg_log_all.txt (77.3 KB)

Can you give me some advice what is wrong?

Since you replaced the kernel, what do you see for:
uname -r

Also, are there modules or files at:
/lib/modules/$(uname -r)/kernel/
(it doesn’t matter what files are there, I just want to know they are present for the kernel to find)

I work on Jetpack 4.6.1 and module p3448-0002-b00 in custom carrier board (layout is fine because I run this IC without driver - manualy)