ASoC: tegra: Fix build for Linux v6.11

For Linux v6.11, the 'tx_slot' and 'rx_slot' arguments for the ASoC
set_channel_map() function were made constant. Add a test to conftest to
check for this and update the Tegra210 ADX and AMX driver accordingly.

Bug 4749580

Change-Id: I584d721ee46ae0af6312df4641fc4bbdbc1714f0
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3184824
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Jon Hunter
2024-06-13 14:45:15 +01:00
committed by mobile promotions
parent 55b09a913f
commit 8fbb56adb6
4 changed files with 31 additions and 0 deletions

View File

@@ -158,6 +158,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_card_jack_new_has_no_snd_soc_jack_
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_component_driver_struct_has_non_legacy_dai_naming
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_dai_link_struct_has_c2c_params_arg
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_dai_ops_struct_has_probe
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_dai_ops_struct_set_channel_map_has_const_slot_args
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_of_get_dai_name_has_index_arg
NV_CONFTEST_FUNCTION_COMPILE_TESTS += snd_soc_rtd_to_codec
NV_CONFTEST_FUNCTION_COMPILE_TESTS += simple_util_dai_init

View File

@@ -7659,6 +7659,26 @@ compile_test() {
compile_check_conftest "$CODE" "NV_SND_SOC_DAI_OPS_STRUCT_HAS_PROBE_PRESENT" "" "types"
;;
snd_soc_dai_ops_struct_set_channel_map_has_const_slot_args)
#
# Determine if the ASoC set_channel_map() has constant 'tx_slot' and
# 'rx_slot' arguments.
#
# Commit 965cc040bf06 ("ASoC: Constify channel mapping array arguments in
# set_channel_map()") updated the 'tx_slot' and 'rx_slot' arguments to be
# constant in Linux v6.11.
#
CODE="
#include <sound/soc.h>
int conftest_snd_soc_dai_ops(struct snd_soc_dai_ops *ops) {
int (*fn)(struct snd_soc_dai *dai, unsigned int tx_num,
const unsigned int *tx_slot, unsigned int rx_num,
const unsigned int *rx_slot) = ops->set_channel_map;
}"
compile_check_conftest "$CODE" "NV_SND_SOC_DAI_OPS_STRUCT_SET_CHANNEL_MAP_HAS_CONST_SLOT_ARGS" "" "types"
;;
snd_soc_of_get_dai_name_has_index_arg)
#
# Determine if the function 'snd_soc_of_get_dai_name()' has an index argument.