Files
linux-nv-oot/sound/soc/tegra/tegra210_ahub.h
Sheetal f9f0e26a20 ASoC: tegra: Memory leak due to BE HW constraint
- The issue was happening because dapm core was not deallocating
  the hw contraints rules memory.
  Memory leak backtrace from cat /sys/kernel/debug/kmemleak:
    [<0000000046fdaf4f>] slab_post_alloc_hook+0x6c/0x3e0
    [<00000000989dfc0e>] __kmalloc_track_caller+0x1b8/0x400
    [<00000000505e39ec>] krealloc+0xe8/0x160
    [<000000009cc82a21>] snd_pcm_hw_rule_add+0x164/0x1a0
    [<00000000aa77851e>] snd_pcm_hw_constraint_list+0x28/0x30
    [<000000009b2cd5c6>] tegra210_ahub_write_ram+0xa8/0xb60
    [<00000000a61d7069>] snd_soc_dai_startup+0x40/0xa0
    [<00000000a7452879>] snd_soc_dai_link_event+0x334/0x600
    [<000000008c5771de>] dapm_seq_check_event+0x120/0x330
    [<00000000be740a3d>] dapm_seq_run_coalesced+0xb0/0x250
    [<0000000003732007>] dapm_seq_run+0xf0/0x510
    [<00000000cbb85eb0>] dapm_power_widgets+0x58c/0xac0
    [<00000000b96c5548>] snd_soc_dapm_stream_event+0x128/0x170
    [<0000000027bb14bc>] soc_pcm_prepare+0x70/0x110
    [<00000000d44b9075>] snd_pcm_do_prepare+0x34/0x50
    [<000000005664d4d5>] snd_pcm_action_single+0x4c/0xa0

- For BE dais HW constraints won't take any impact and only for FE
  dais it is required. So added it in component driver open callback.

Bug 200773796

Signed-off-by: Sheetal <sheetal@nvidia.com>
Change-Id: Ic4c1bf881b914bda03bda8e97816cf1c6dee4052
Reviewed-on: https://git-master.nvidia.com/r/c/linux-5.10/+/2596443
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Mohan Kumar D <mkumard@nvidia.com>
Reviewed-by: Viswanath L <viswanathl@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:50:28 +05:30

4.8 KiB