Files
linux-nv-oot/sound
Sameer Pujar f44cfefe5d ASoC: tegra-alt: use regmap macros for timeout
Following print is seen while using regmap_read_poll_timeout() macro
in snd_soc_dai_ops trigger() callback in ADMAIF driver,
 *** BUG: scheduling while atomic ***
and kernel panic happens there after. This happens because above macro
is not atomic safe and trigger() is called in atomic context.

Earlier this addressed by using readx_poll_timeout_atomic() macro.
Though this works fine driver needs to keep a reference to base address.
To avoid this new macro was pushed and is accepted in upstream and
following is the commit - https://lkml.org/lkml/2020/1/9/985

This patch makes use of regmap macros where there is a need of timeout
functionality. Following is the guideline that can be followed.
 * use regmap_read_poll_timeout_atomic() where the caller is in atomic
   context.
   ex: trigger() etc.,
 * use regmap_read_poll_timeout() when the caller is known to be running
   in non-atomic context.
   ex: hw_param(), prepare() etc.,

Based on this audio drivers are updated. ASRC and ARAD drivers will be
taken up in a separate change.

Bug 200566596

Change-Id: Iea88adc60de5919e456a36a30152212652a8ecd3
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2274874
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sharad Gupta <sharadg@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2022-09-29 15:30:21 +05:30
..