summaryrefslogtreecommitdiff
path: root/sound/soc/ti/j721e-evm.c
AgeCommit message (Collapse)AuthorFilesLines
2024-01-22ASoC: ti: j721e-evm: Use devm_kcalloc() instead of devm_kzalloc()Erick Archer1-2/+2
Use 2-factor multiplication argument form devm_kcalloc() instead of devm_kzalloc(). Link: https://github.com/KSPP/linux/issues/162 Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com> Signed-off-by: Erick Archer <erick.archer@gmx.com> Link: https://msgid.link/r/20240109181101.3806-1-erick.archer@gmx.com Signed-off-by: Mark Brown <broonie@kernel.org>
2023-09-25ASoC: ti: convert not to use asoc_xxx()Kuninori Morimoto1-6/+6
ASoC is now unified asoc_xxx() into snd_soc_xxx(). This patch convert asoc_xxx() to snd_soc_xxx(). Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87bke8s25q.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-05-16ASoC: ti: j721e-evm: Fix refcount leak in j721e_soc_probe_*Miaoqian Lin1-11/+33
of_parse_phandle() returns a node pointer with refcount incremented, we should use of_node_put() on it when not needed anymore. Add missing of_node_put() to avoid refcount leak. Fixes: 6748d0559059 ("ASoC: ti: Add custom machine driver for j721e EVM (CPB and IVI)") Signed-off-by: Miaoqian Lin <linmq006@gmail.com> Link: https://lore.kernel.org/r/20220512111331.44774-1-linmq006@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-12-20ASoC: ti: Use dev_err_probe() helperKuninori Morimoto1-7/+3
Use the dev_err_probe() helper, instead of open-coding the same operation. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/20211214020843.2225831-13-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-08-06Merge some cs42l42 patches into asoc-5.15Mark Brown1-6/+12
2021-07-19ASoC: ti: j721e-evm: Convert the audio domain IDs to enumPeter Ujfalusi1-13/+17
Convert the J721E_AUDIO_DOMAIN_* from defines to enum to make it possible to extend the number of domains in the future. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@gmail.com> Link: https://lore.kernel.org/r/20210717122820.1467-4-peter.ujfalusi@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-07-19ASoC: ti: j721e-evm: Check for not initialized parent_clk_idPeter Ujfalusi1-1/+1
During probe the parent_clk_id is set to -1 which should not be used to array index within hsdiv_rates[]. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@gmail.com> Link: https://lore.kernel.org/r/20210717122820.1467-3-peter.ujfalusi@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2021-07-19ASoC: ti: j721e-evm: Fix unbalanced domain activity tracking during startupPeter Ujfalusi1-5/+11
In case of an error within j721e_audio_startup() the domain->active must be decremented to avoid unbalanced counter. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@gmail.com> Link: https://lore.kernel.org/r/20210717122820.1467-2-peter.ujfalusi@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-09-28ASoC: ti: j721e-evm: Fix compiler warning when CONFIG_OF=nPeter Ujfalusi1-1/+1
Remove the use of of_match_ptr() macro for of_match_table to fix compiler warning when CONFIG_OF=n: sound/soc/ti/j721e-evm.c:528:34: warning: unused variable 'j721e_audio_of_match' [-Wunused-const-variable] Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20200928074330.13029-1-peter.ujfalusi@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-09-11ASoC: ti: j721e-evm: Add support for j7200-cpb audioPeter Ujfalusi1-0/+11
When j7200 SOM is attached to the CPB we only have parent clock for 48KHz family and the rate of the parent clock is 2359296000Hz. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20200910124110.19361-3-peter.ujfalusi@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-23ASoC: ti: use asoc_substream_to_rtd()Kuninori Morimoto1-3/+3
Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87tuy30yv5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-03ASoC: ti: j721e-evm: Fix missing unlock on error in j721e_audio_hw_params()Wei Yongjun1-1/+1
Add the missing unlock before return from function j721e_audio_hw_params() in the error handling case. Fixes: 6748d0559059 ("ASoC: ti: Add custom machine driver for j721e EVM (CPB and IVI)") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20200703030910.75047-1-weiyongjun1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2020-07-01ASoC: ti: Add custom machine driver for j721e EVM (CPB and IVI)Peter Ujfalusi1-0/+896
The audio support on the board is using pcm3168a codec connected to McASP10 serializers in parallel setup. The pcm3168a SCKI clock is coming via the j721e AUDIO_REFCLK2 pin. In order to support 48KHz and 44.1KHz family of sampling rates the parent clock for AUDIO_REFCLK2 needs to be changed between PLL4 (for 48KHz) and PLL15 (for 44.1KHz). The same PLLs are used for McASP10's AUXCLK clock via different HSDIVIDER. Generic card can not be used for the board as we need to switch between clock paths for different sampling rate families and also need to change the slot_width between 16 and 24 bit audio. The audio support on the Infotainment Expansion Board consists of McASP0 connected to two pcm3168a codecs with dedicated set of serializers to each. The SCKI for pcm3168a is sourced from j721e AUDIO_REFCLK0 pin. It is extending the audio support on the CPB. Due to the fact that the same PLL4/15 is used by both domains (CPB/IVI) there are cross restriction on sampling rates. The IVI side is represented as multicodec setup. PCMs available on a plain CPB (no IVI addon): hw:0,0 - cpb playback (8 channels) hw:0,1 - cpb capture (6 channels) When the IVI addon is present, additional two PCMs will be present: hw:0,2 - ivi multicodec playback (16 channels) hw:0,3 - ivi multicodec capture (12 channels) Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20200630125843.11561-4-peter.ujfalusi@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>