Kernel panic when I built-in the audio driver

When I built-in the defconfig file (CONFIG_SND_SOC_TEGRA210_AHUB,
CONFIG_SND_SOC_TEGRA210_DMIC,
CONFIG_SND_SOC_TEGRA210_I2S、
CONFIG_SND_SOC_TEGRA210_ADMAIF,
CONFIG_SND_SOC_TEGRA210_AMX,
CONFIG_SND_SOC_TEGRA210_ADX,
CONFIG_SND_SOC_TEGRA210_MIXER,
CONFIG_SND_SOC_TEGRA210_SFC,
CONFIG_SND_SOC_TEGRA210_MVC,
CONFIG_SND_SOC_TEGRA210_AFC,
CONFIG_SND_SOC_TEGRA210_IQC,
CONFIG_SND_SOC_TEGRA210_OPE,
CONFIG_SND_SOC_TEGRA210_ADSP,
CONFIG_TEGRA210_ADMA), the kernel will panic

The log content is:

[    2.576086] CPU:0, Error: cbb-noc@2300000, irq=15
[    2.658483] **************************************
[    2.658631] CPU:0, Error:cbb-noc
[    2.658721]  Error Logger            : 0
[    2.658816]  ErrLog0                 : 0x80030008
[    2.658922]    Transaction Type      : WR  - Write, Incrementing
[    2.659054]    Error Code            : SLV
[    2.659155]    Error Source          : Target
[    2.659247]    Error Description     : Target error detected by CBB slave
[    2.740582]          AXI2APB_1 bridge error: SFIFONE - Status FIFO Not Empty interrupt
[    2.823056]    AXI2APB_1 bridge error: TIM - Timer(Timeout) interrupt
[    2.823226]    AXI2APB_5 bridge error: RDFIFOF - Read Response FIFO Full interrupt
[    2.823425]    Packet header Lock    : 0
[    2.823517]    Packet header Len1    : 3
[    2.823608]    NOC protocol version  : version >= 2.7
[    2.823744]  ErrLog1                 : 0x320001
[    2.823830]  ErrLog2                 : 0x0
[    2.823906]    RouteId               : 0x320001
[    2.824002]    InitFlow              : ccroc_p2ps/I/ccroc_p2ps
[    2.824134]    Targflow              : axis_satellite_grout/T/axis_satellite_grout
[    2.824288]    TargSubRange          : 0
[    2.824375]    SeqId                 : 0
[    2.824449]  ErrLog3                 : 0x290a0a8
[    2.824535]  ErrLog4                 : 0x0
[    2.824610]    Address accessed      : 0x290a0a8
[    2.824713]  ErrLog5                 : 0x9f851
[    2.824799]    Non-Modify            : 0x1
[    2.824884]    AXI ID                : 0x0
[    2.824957]    Master ID             : CCPLEX
[    2.825044]    Security Group(GRPSEC): 0x7e
[    2.825148]    Cache                 : 0x1 -- Bufferable
[    2.825362]    Protection            : 0x2 -- Unprivileged, Non-Secure, Data Access
[    2.829337]    FALCONSEC             : 0x0
[    2.832485]    Virtual Queuing Channel(VQC): 0x0
[    2.837122]  **************************************
[    2.841898] kernel BUG at drivers/soc/tegra/cbb/tegra194-cbb.c:2057!
[    2.848500] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
[    2.853753] Modules linked in:
[    2.856743] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.10.192-jurassic #59
[    2.863895] Hardware name: NVIDIA Jetson Xavier NX Developer Kit (DT)
[    2.870213] pstate: 60400089 (nZCv daIf +PAN -UAO -TCO BTYPE=--)
[    2.876155] pc : tegra194_cbb_err_isr+0x19c/0x1b0
[    2.880618] lr : tegra194_cbb_err_isr+0x11c/0x1b0
[    2.885340] sp : ffff800010003df0
[    2.888758] x29: ffff800010003df0 x28: 0000000000000001
[    2.894527] x27: 0000000000000080 x26: ffffbf41766c4838
[    2.899783] x25: ffffbf41773b5fa0 x24: 0000000000000001
[    2.905208] x23: ffffbf4176a25008 x22: ffffbf41770b0b38
[    2.910888] x21: 000000000000000f x20: 0000000000000005
[    2.915968] x19: ffffbf41770b0b28 x18: 0000000000000010
[    2.921738] x17: 000000000c52ca59 x16: 0000000018b3da18
[    2.926907] x15: ffffbf4176efcb90 x14: 0720072007200720
[    2.932609] x13: 0720072007200720 x12: 0720072007200720
[    2.938010] x11: 0720072007200720 x10: 0720072007200720
[    2.943523] x9 : 0720072007200720 x8 : 07200720072a072a
[    2.948777] x7 : 072a072a072a072a x6 : c0000000ffffefff
[    2.954290] x5 : 0000000000057fa8 x4 : ffffbf4176f17760
[    2.959716] x3 : 00000000ffffffff x2 : ffffbf4174b61f00
[    2.965051] x1 : ffffbf4176efc640 x0 : 0000000100010001
[    2.970390] Call trace:
[    2.972845]  tegra194_cbb_err_isr+0x19c/0x1b0
[    2.977390]  __handle_irq_event_percpu+0x68/0x2b0
[    2.981936]  handle_irq_event_percpu+0x40/0xa0
[    2.986400]  handle_irq_event+0x50/0xa0
[    2.989918]  handle_fasteoi_irq+0xc0/0x170
[    2.994186]  generic_handle_irq+0x40/0x60
[    2.998212]  __handle_domain_irq+0x70/0xd0
[    3.002411]  efi_header_end+0xb0/0xf0
[    3.005913]  el1_irq+0xd0/0x180
[    3.008889]  cpuidle_enter_state+0xb8/0x410
[    3.013090]  cpuidle_enter+0x40/0x60
[    3.016331]  call_cpuidle+0x44/0x80
[    3.019830]  do_idle+0x208/0x270
[    3.023499]  cpu_startup_entry+0x30/0x60
[    3.027008]  rest_init+0xdc/0xe8
[    3.030501]  arch_call_rest_init+0x18/0x20
[    3.034441]  start_kernel+0x500/0x538
[    3.037777] Code: a9446bf9 a94573fb a8c67bfd d65f03c0 (d4210000)
[    3.044242] ---[ end trace f400f460fc55820d ]---
[    3.056278] Kernel panic - not syncing: Oops - BUG: Fatal exception in interrupt
[    3.056506] SMP: stopping secondary CPUs
[    3.070011] Kernel Offset: 0x3f4164990000 from 0xffff800010000000
[    3.070203] PHYS_OFFSET: 0xffff9804c0000000
[    3.070352] CPU features: 0x48240002,03802a30
[    3.075032] Memory Limit: none
[    3.083373] ---[ end Kernel panic - not syncing: Oops - BUG: Fatal exception in interrupt ]---

Which JetPack SW?
Have you check Audio Setup and Development — NVIDIA Jetson Linux Developer Guide 1 documentation?

hi kayccc,
I am using version l4t-35.5.0

Hi easyzoom

I will have to reproduce this error at my end to comment on this further.

Just curious about why you would like to use these drivers as built in? Presently we don’t test these drivers in built in mode.

hi spujar,
We need to release our product, so we need to use these drivers as built in

I am curious, when you changed these to built-in, did you use a dependency-aware editor, e.g., menuconfig or nconfig targets? Did you change the CONFIG_LOCALVERSION? Are you possibly trying to also load modules? Note that if you changed CONFIG_LOCALVERSION, then that is correct for this scenario since this is one way to prevent the old modules from being visible (you don’t want to run two drivers on the same device).

For a commercial product release, so long as the content is not required in boot stages, I would think that you are better off with modules. There might be cases where you don’t want the audio to be updatable, and then built-in would be useful, but what is your use-case for switching to built-in?

Hi easyzoom,

Can you check if following helps?

diff --git a/sound/soc/tegra/tegra210_ahub.c b/sound/soc/tegra/tegra210_ahub.c
index e210ff825..06bf6e0d6 100644
--- a/sound/soc/tegra/tegra210_ahub.c
+++ b/sound/soc/tegra/tegra210_ahub.c
@@ -1646,11 +1646,13 @@ static int tegra_ahub_probe(struct platform_device *pdev)
                return err;
        }

+       pm_runtime_enable(&pdev->dev);
+
        err = of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
-       if (err)
+       if (err) {
+               pm_runtime_disable(&pdev->dev);
                return err;
-
-       pm_runtime_enable(&pdev->dev);
+       }

        return 0;
 }

PS: You may want to make these drivers built in only if it is absolutely necessary. Agree with linuxdev on this.

Hi spujar,
I will try your suggested changes and report back with the test results later.

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

Is this still an issue to support? Any result can be shared?