[jsarha:topic/sof-dev-rebase 157/166] sound/soc/sof/ipc4-topology.c:935:19: error: invalid use of undefined type 'struct nhlt_specific_cfg'

From: kernel test robot
Date: Sat Apr 09 2022 - 01:44:11 EST


tree: https://github.com/jsarha/linux topic/sof-dev-rebase
head: 3ff7648fec76d20e7c2a7ca996977b9dc888e913
commit: f2d413f094a5d618a34f38db5309a8d374c916de [157/166] ASoC: SOF: ipc4-topology: Add support for SSP/DMIC DAI's
config: mips-allyesconfig (https://download.01.org/0day-ci/archive/20220409/202204091339.7ykKngBy-lkp@xxxxxxxxx/config)
compiler: mips-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/jsarha/linux/commit/f2d413f094a5d618a34f38db5309a8d374c916de
git remote add jsarha https://github.com/jsarha/linux
git fetch --no-tags jsarha topic/sof-dev-rebase
git checkout f2d413f094a5d618a34f38db5309a8d374c916de
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

sound/soc/sof/ipc4-topology.c: In function 'snd_sof_get_nhlt_endpoint_data':
>> sound/soc/sof/ipc4-topology.c:935:19: error: invalid use of undefined type 'struct nhlt_specific_cfg'
935 | *len = cfg->size >> 2;
| ^~
sound/soc/sof/ipc4-topology.c:936:26: error: invalid use of undefined type 'struct nhlt_specific_cfg'
936 | *dst = (u32 *)cfg->caps;
| ^~


vim +935 sound/soc/sof/ipc4-topology.c

888
889 static int snd_sof_get_nhlt_endpoint_data(struct snd_sof_dev *sdev, struct snd_sof_dai *dai,
890 struct snd_pcm_hw_params *params, u32 dai_index,
891 u32 linktype, u8 dir, u32 **dst, u32 *len)
892 {
893 struct sof_ipc4_fw_data *ipc4_data = sdev->private;
894 struct nhlt_specific_cfg *cfg;
895 int sample_rate, channel_count;
896 int bit_depth, ret;
897 u32 nhlt_type;
898
899 /* convert to NHLT type */
900 switch (linktype) {
901 case SOF_DAI_INTEL_DMIC:
902 nhlt_type = NHLT_LINK_DMIC;
903 bit_depth = params_width(params);
904 channel_count = params_channels(params);
905 sample_rate = params_rate(params);
906 break;
907 case SOF_DAI_INTEL_SSP:
908 nhlt_type = NHLT_LINK_SSP;
909 ret = snd_sof_get_hw_config_params(sdev, dai, &sample_rate, &channel_count,
910 &bit_depth);
911 break;
912 default:
913 return 0;
914 }
915
916 if (ret < 0)
917 return ret;
918
919 dev_dbg(sdev->dev, "%s: dai index %d nhlt type %d direction %d\n",
920 __func__, dai_index, nhlt_type, dir);
921
922 /* find NHLT blob with matching params */
923 cfg = intel_nhlt_get_endpoint_blob(sdev->dev, ipc4_data->nhlt, dai_index, nhlt_type,
924 bit_depth, bit_depth, channel_count, sample_rate,
925 dir, 0);
926
927 if (!cfg) {
928 dev_err(sdev->dev,
929 "no matching blob for sample rate: %d sample width: %d channels: %d\n",
930 sample_rate, bit_depth, channel_count);
931 return -EINVAL;
932 }
933
934 /* config length should be in dwords */
> 935 *len = cfg->size >> 2;
936 *dst = (u32 *)cfg->caps;
937
938 return 0;
939 }
940

--
0-DAY CI Kernel Test Service
https://01.org/lkp