On Thu, Dec 12, 2024 at 7:45 PM Mark Brown <broonie@xxxxxxxxxx> wrote:
>
> On Thu, Dec 12, 2024 at 03:45:07PM +0800, Shengjiu Wang wrote:
> > Implement the ASRC memory to memory function using
> > the compress framework, user can use this function with
> > compress ioctl interface.
> >
> > This feature can be shared by ASRC and EASRC drivers
>
> This breaks an x86 allmodconfig build (using GCC 13):
>
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:186:68: warning: ‘struct snd_compr_task_runtime’ declared inside parameter list will not be visible outside of this definition or declaration
> 186 | static void asrc_m2m_device_run(struct fsl_asrc_pair *pair, struct snd_compr_task_runtime *task)
> | ^~~~~~~~~~~~~~~~~~~~~~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c: In function ‘asrc_m2m_device_run’:
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:212:26: error: invalid use of undefined type ‘struct snd_compr_task_runtime’
> 212 | in_buf_len = task->input_size;
> | ^~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:279:13: error: invalid use of undefined type ‘struct snd_compr_task_runtime’
> 279 | task->output_size = out_dma_len;
> | ^~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c: At top level:
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:451:49: warning: ‘struct snd_compr_task_runtime’ declared inside parameter list will not be visible outside of this definition or declaration
> 451 | struct snd_compr_task_runtime *task)
> | ^~~~~~~~~~~~~~~~~~~~~~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c: In function ‘fsl_asrc_m2m_comp_task_create’:
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:465:13: error: invalid use of undefined type ‘struct snd_compr_task_runtime’
> 465 | task->input = dma_buf_export(&exp_info_in);
> | ^~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:466:24: error: invalid use of undefined type ‘struct snd_compr_task_runtime’
> 466 | if (IS_ERR(task->input)) {
> | ^~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:467:35: error: invalid use of undefined type ‘struct snd_compr_task_runtime’
> 467 | ret = PTR_ERR(task->input);
> | ^~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:475:13: error: invalid use of undefined type ‘struct snd_compr_task_runtime’
> 475 | task->output = dma_buf_export(&exp_info_out);
> | ^~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:476:24: error: invalid use of undefined type ‘struct snd_compr_task_runtime’
> 476 | if (IS_ERR(task->output)) {
> | ^~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:477:35: error: invalid use of undefined type ‘struct snd_compr_task_runtime’
> 477 | ret = PTR_ERR(task->output);
> | ^~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c: At top level:
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:523:48: warning: ‘struct snd_compr_task_runtime’ declared inside parameter list will not be visible outside of this definition or declaration
> 523 | struct snd_compr_task_runtime *task)
> | ^~~~~~~~~~~~~~~~~~~~~~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c: In function ‘fsl_asrc_m2m_comp_task_start’:
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:528:35: error: passing argument 2 of ‘asrc_m2m_device_run’ from incompatible pointer type [-Werror=incompatible-pointer-types]
> 528 | asrc_m2m_device_run(pair, task);
> | ^~~~
> | |
> | struct snd_compr_task_runtime *
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:186:92: note: expected ‘struct snd_compr_task_runtime *’ but argument is of type ‘struct snd_compr_task_runtime *’
> 186 | static void asrc_m2m_device_run(struct fsl_asrc_pair *pair, struct snd_compr_task_runtime *task)
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c: At top level:
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:534:47: warning: ‘struct snd_compr_task_runtime’ declared inside parameter list will not be visible outside of this definition or declaration
> 534 | struct snd_compr_task_runtime *task)
> | ^~~~~~~~~~~~~~~~~~~~~~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:540:47: warning: ‘struct snd_compr_task_runtime’ declared inside parameter list will not be visible outside of this definition or declaration
> 540 | struct snd_compr_task_runtime *task)
> | ^~~~~~~~~~~~~~~~~~~~~~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:623:10: error: ‘struct snd_compr_ops’ has no member named ‘task_create’
> 623 | .task_create = fsl_asrc_m2m_comp_task_create,
> | ^~~~~~~~~~~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:623:24: warning: excess elements in struct initializer
> 623 | .task_create = fsl_asrc_m2m_comp_task_create,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:623:24: note: (near initialization for ‘fsl_asrc_m2m_compr_ops’)
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:624:10: error: ‘struct snd_compr_ops’ has no member named ‘task_start’
> 624 | .task_start = fsl_asrc_m2m_comp_task_start,
> | ^~~~~~~~~~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:624:23: warning: excess elements in struct initializer
> 624 | .task_start = fsl_asrc_m2m_comp_task_start,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:624:23: note: (near initialization for ‘fsl_asrc_m2m_compr_ops’)
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:625:10: error: ‘struct snd_compr_ops’ has no member named ‘task_stop’
> 625 | .task_stop = fsl_asrc_m2m_comp_task_stop,
> | ^~~~~~~~~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:625:22: warning: excess elements in struct initializer
> 625 | .task_stop = fsl_asrc_m2m_comp_task_stop,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:625:22: note: (near initialization for ‘fsl_asrc_m2m_compr_ops’)
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:626:10: error: ‘struct snd_compr_ops’ has no member named ‘task_free’
> 626 | .task_free = fsl_asrc_m2m_comp_task_free,
> | ^~~~~~~~~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:626:22: warning: excess elements in struct initializer
> 626 | .task_free = fsl_asrc_m2m_comp_task_free,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:626:22: note: (near initialization for ‘fsl_asrc_m2m_compr_ops’)
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c: In function ‘fsl_asrc_m2m_init’:
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:701:41: error: ‘SND_COMPRESS_ACCEL’ undeclared (first use in this function); did you mean ‘SNDRV_COMPRESS_AVAIL’?
> 701 | ret = snd_compress_new(card, 0, SND_COMPRESS_ACCEL, "ASRC M2M", compr);
> | ^~~~~~~~~~~~~~~~~~
> | SNDRV_COMPRESS_AVAIL
> /build/stage/linux/sound/soc/fsl/fsl_asrc_m2m.c:701:41: note: each undeclared identifier is reported only once for each function it appears in
> cc1: some warnings being treated as errors
Hi Mark
I can't reproduce this issue with 'make allmodconfig'.
I tried the branches: for-6.13/for-6.14/for-next.
I suspect you are using the wrong branch, because I can
reproduce this issue on for-6.12. which is caused by the below
commit that is only applied from for-6.13.
04177158cf98 ("ALSA: compress_offload: introduce accel operation mode")
But could you please tell me your steps in detail?, so that I can
try more.
Best regards
Shengjiu Wang
[Index of Archives]
[Pulseaudio]
[Linux Audio Users]
[ALSA Devel]
[Fedora Desktop]
[Fedora SELinux]
[Big List of Linux Books]
[Yosemite News]
[KDE Users]