tree:
https://github.com/thesofproject/linux pr/3423
head: ec98881d3d07dbf2b30b80188a030a688820b1f0
commit: 9e5b6cc2f5a30ddfe3cf17ba0f997cc67d1fb93e [18/37] Fixup! ASoC: SOF: Introduce
IPC-specific PCM ops
config: x86_64-sof-customedconfig-sof-defconfig
(
https://download.01.org/0day-ci/archive/20220212/202202120334.Wou16c2j-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
#
https://github.com/thesofproject/linux/commit/9e5b6cc2f5a30ddfe3cf17ba0f9...
git remote add thesofproject
https://github.com/thesofproject/linux
git fetch --no-tags thesofproject pr/3423
git checkout 9e5b6cc2f5a30ddfe3cf17ba0f997cc67d1fb93e
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash sound/soc/sof/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Note: the thesofproject/pr/3423 HEAD ec98881d3d07dbf2b30b80188a030a688820b1f0 builds
fine.
It only hurts bisectability.
All errors (new ones prefixed by >>):
sound/soc/sof/pcm.c: In function 'sof_pcm_hw_params':
> sound/soc/sof/pcm.c:125:38: error: initialization of 'const
struct ipc_pcm_ops *' from incompatible pointer type 'const struct sof_ipc_pcm_ops
* const' [-Werror=incompatible-pointer-types]
125 | const struct
ipc_pcm_ops *pcm_ops = sdev->ipc->ops->pcm;
| ^~~~
> sound/soc/sof/pcm.c:142:13: error: dereferencing pointer to
incomplete type 'const struct ipc_pcm_ops'
142 | if
(pcm_ops->hw_free && spcm->prepared[substream->stream]) {
| ^~
sound/soc/sof/pcm.c: In function 'sof_pcm_hw_free':
sound/soc/sof/pcm.c:194:38: error: initialization of 'const struct ipc_pcm_ops
*' from incompatible pointer type 'const struct sof_ipc_pcm_ops * const'
[-Werror=incompatible-pointer-types]
194 | const struct ipc_pcm_ops *pcm_ops = sdev->ipc->ops->pcm;
| ^~~~
sound/soc/sof/pcm.c:210:13: error: dereferencing pointer to incomplete type 'const
struct ipc_pcm_ops'
210 | if (pcm_ops->hw_free && spcm->prepared[substream->stream]) {
| ^~
sound/soc/sof/pcm.c: In function 'sof_pcm_trigger':
sound/soc/sof/pcm.c:277:38: error: initialization of 'const struct ipc_pcm_ops
*' from incompatible pointer type 'const struct sof_ipc_pcm_ops * const'
[-Werror=incompatible-pointer-types]
277 | const struct ipc_pcm_ops *pcm_ops = sdev->ipc->ops->pcm;
| ^~~~
sound/soc/sof/pcm.c:342:13: error: dereferencing pointer to incomplete type 'const
struct ipc_pcm_ops'
342 | if (pcm_ops->trigger)
| ^~
sound/soc/sof/pcm.c: In function 'sof_pcm_dai_link_fixup':
sound/soc/sof/pcm.c:569:38: error: initialization of 'const struct ipc_pcm_ops
*' from incompatible pointer type 'const struct sof_ipc_pcm_ops * const'
[-Werror=incompatible-pointer-types]
569 | const struct ipc_pcm_ops *pcm_ops = sdev->ipc->ops->pcm;
| ^~~~
sound/soc/sof/pcm.c:590:13: error: dereferencing pointer to incomplete type 'const
struct ipc_pcm_ops'
590 | if (pcm_ops->dai_link_fixup)
| ^~
cc1: some warnings being treated as errors
vim +125 sound/soc/sof/pcm.c
1f5320325c4390f Ranjani Sridharan 2021-03-04 117
1c91d77e1775e0d Kuninori Morimoto 2019-10-02 118 static int sof_pcm_hw_params(struct
snd_soc_component *component,
1c91d77e1775e0d Kuninori Morimoto 2019-10-02 119 struct snd_pcm_substream
*substream,
868bd00f4955146 Liam Girdwood 2019-04-12 120 struct snd_pcm_hw_params
*params)
868bd00f4955146 Liam Girdwood 2019-04-12 121 {
868bd00f4955146 Liam Girdwood 2019-04-12 122 struct snd_sof_dev *sdev =
snd_soc_component_get_drvdata(component);
dca6262db3dc58b Ranjani Sridharan 2021-12-07 123 struct snd_soc_pcm_runtime *rtd =
asoc_substream_to_rtd(substream);
9cce2adefa0084c Peter Ujfalusi 2021-12-01 124 struct
snd_sof_platform_stream_params platform_params = { 0 };
dca6262db3dc58b Ranjani Sridharan 2021-12-07 @125 const struct ipc_pcm_ops *pcm_ops =
sdev->ipc->ops->pcm;
dca6262db3dc58b Ranjani Sridharan 2021-12-07 126 struct snd_pcm_runtime *runtime =
substream->runtime;
868bd00f4955146 Liam Girdwood 2019-04-12 127 struct snd_sof_pcm *spcm;
868bd00f4955146 Liam Girdwood 2019-04-12 128 int ret;
868bd00f4955146 Liam Girdwood 2019-04-12 129
868bd00f4955146 Liam Girdwood 2019-04-12 130 /* nothing to do for BE */
868bd00f4955146 Liam Girdwood 2019-04-12 131 if (rtd->dai_link->no_pcm)
868bd00f4955146 Liam Girdwood 2019-04-12 132 return 0;
868bd00f4955146 Liam Girdwood 2019-04-12 133
ee1e79b72e3cf5e Ranjani Sridharan 2019-12-04 134 spcm =
snd_sof_find_spcm_dai(component, rtd);
868bd00f4955146 Liam Girdwood 2019-04-12 135 if (!spcm)
868bd00f4955146 Liam Girdwood 2019-04-12 136 return -EINVAL;
868bd00f4955146 Liam Girdwood 2019-04-12 137
cfe8191b1bbf2b4 Kai Vehmanen 2020-01-10 138 /*
cfe8191b1bbf2b4 Kai Vehmanen 2020-01-10 139 * Handle repeated calls to
hw_params() without free_pcm() in
cfe8191b1bbf2b4 Kai Vehmanen 2020-01-10 140 * between. At least ALSA OSS
emulation depends on this.
cfe8191b1bbf2b4 Kai Vehmanen 2020-01-10 141 */
dd8fe9f9ecf2b67 Ranjani Sridharan 2021-12-07 @142 if (pcm_ops->hw_free &&
spcm->prepared[substream->stream]) {
dd8fe9f9ecf2b67 Ranjani Sridharan 2021-12-07 143 ret =
pcm_ops->hw_free(component, substream);
cfe8191b1bbf2b4 Kai Vehmanen 2020-01-10 144 if (ret < 0)
cfe8191b1bbf2b4 Kai Vehmanen 2020-01-10 145 return ret;
cfe8191b1bbf2b4 Kai Vehmanen 2020-01-10 146
dd8fe9f9ecf2b67 Ranjani Sridharan 2021-12-07 147
spcm->prepared[substream->stream] = false;
dd8fe9f9ecf2b67 Ranjani Sridharan 2021-12-07 148 }
dd8fe9f9ecf2b67 Ranjani Sridharan 2021-12-07 149
ee1e79b72e3cf5e Ranjani Sridharan 2019-12-04 150 dev_dbg(component->dev,
"pcm: hw params stream %d dir %d\n",
868bd00f4955146 Liam Girdwood 2019-04-12 151 spcm->pcm.pcm_id,
substream->stream);
868bd00f4955146 Liam Girdwood 2019-04-12 152
dca6262db3dc58b Ranjani Sridharan 2021-12-07 153 /* if this is a repeated hw_params
without hw_free, skip setting up widgets */
dca6262db3dc58b Ranjani Sridharan 2021-12-07 154 if
(!spcm->stream[substream->stream].list) {
dca6262db3dc58b Ranjani Sridharan 2021-12-07 155 ret =
sof_pcm_setup_connected_widgets(sdev, rtd, spcm, substream->stream);
868bd00f4955146 Liam Girdwood 2019-04-12 156 if (ret < 0)
868bd00f4955146 Liam Girdwood 2019-04-12 157 return ret;
868bd00f4955146 Liam Girdwood 2019-04-12 158 }
868bd00f4955146 Liam Girdwood 2019-04-12 159
dca6262db3dc58b Ranjani Sridharan 2021-12-07 160 /* create compressed page table for
audio firmware */
dca6262db3dc58b Ranjani Sridharan 2021-12-07 161 if (runtime->buffer_changed) {
b298e5e1ae3165d Pierre-Louis Bossart 2022-01-25 162 ret = create_page_table(component,
substream, runtime->dma_area,
dca6262db3dc58b Ranjani Sridharan 2021-12-07 163 runtime->dma_bytes);
868bd00f4955146 Liam Girdwood 2019-04-12 164
868bd00f4955146 Liam Girdwood 2019-04-12 165 if (ret < 0)
868bd00f4955146 Liam Girdwood 2019-04-12 166 return ret;
868bd00f4955146 Liam Girdwood 2019-04-12 167 }
868bd00f4955146 Liam Girdwood 2019-04-12 168
dca6262db3dc58b Ranjani Sridharan 2021-12-07 169 ret =
snd_sof_pcm_platform_hw_params(sdev, substream, params, &platform_params);
868bd00f4955146 Liam Girdwood 2019-04-12 170 if (ret < 0) {
dca6262db3dc58b Ranjani Sridharan 2021-12-07 171 dev_err(component->dev,
"platform hw params failed\n");
868bd00f4955146 Liam Girdwood 2019-04-12 172 return ret;
868bd00f4955146 Liam Girdwood 2019-04-12 173 }
868bd00f4955146 Liam Girdwood 2019-04-12 174
dca6262db3dc58b Ranjani Sridharan 2021-12-07 175 if (pcm_ops->hw_params) {
dca6262db3dc58b Ranjani Sridharan 2021-12-07 176 ret =
pcm_ops->hw_params(component, substream, params, &platform_params);
1f5320325c4390f Ranjani Sridharan 2021-03-04 177 if (ret < 0)
1f5320325c4390f Ranjani Sridharan 2021-03-04 178 return ret;
1f5320325c4390f Ranjani Sridharan 2021-03-04 179 }
1f5320325c4390f Ranjani Sridharan 2021-03-04 180
04c8027764bc82a Kai Vehmanen 2019-07-22 181
spcm->prepared[substream->stream] = true;
04c8027764bc82a Kai Vehmanen 2019-07-22 182
868bd00f4955146 Liam Girdwood 2019-04-12 183 /* save pcm hw_params */
868bd00f4955146 Liam Girdwood 2019-04-12 184
memcpy(&spcm->params[substream->stream], params, sizeof(*params));
868bd00f4955146 Liam Girdwood 2019-04-12 185
dca6262db3dc58b Ranjani Sridharan 2021-12-07 186 return 0;
868bd00f4955146 Liam Girdwood 2019-04-12 187 }
868bd00f4955146 Liam Girdwood 2019-04-12 188
:::::: The code at line 125 was first introduced by commit
:::::: dca6262db3dc58b380d1281507c436c3d9f652f9 ASoC: SOF: Define hw_params PCM op for
IPC3
:::::: TO: Ranjani Sridharan <ranjani.sridharan(a)linux.intel.com>
:::::: CC: Pierre-Louis Bossart <pierre-louis.bossart(a)linux.intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org