Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tbs_pcie.c:1519:10: error: 'struct snd_pcm_ops' has no member named 'copy_user' in RHEL9.5 #371

Open
pszemus opened this issue Dec 13, 2024 · 3 comments

Comments

@pszemus
Copy link

pszemus commented Dec 13, 2024

Hello
I am having problems building the linux_media project for RedHat Enterprise Linux 9 (RHEL 9).
I've successfully built linux_media for RHEL < 9.5 (with some backport patches handling), but now, in RHEL 9.5, kernel 5.14.0-503.15.1.el9_5 has backported changes from kernel 6.6 and the snd_pcm_opts struct has the field copy_user renamed to copy.

This line tries to handle that: https://github.com/tbsdtv/linux_media/blob/latest/drivers/media/pci/tbscapture/tbs_pcie.c#L1518 but fails for RHEL's kernel because it's version is 5.14.0 while at the same time the copy field should be used.

v4l/tbs_pcie.c:1519:10: error: 'struct snd_pcm_ops' has no member named 'copy_user'
 1519 |         .copy_user =    tbs_pcie_audio_copy_user,
# grep -F *copy /usr/src/kernels/5.14.0-503.15.1.el9_5.x86_64/include/sound/pcm.h 
	int (*copy)(struct snd_pcm_substream *substream, int channel,

How to handle that case? Should we remove the #if LINUX_VERSION_CODE completely and rely only on backport patches in the media_build project (maybe this patch should be extended: https://github.com/tbsdtv/media_build/blob/latest/backports/v6.5_pcm_copy.patch)?

@crazycat69
Copy link

crazycat69 commented Dec 13, 2024

@pszemus
Copy link
Author

pszemus commented Dec 13, 2024

@crazycat69 Are you sure? The general approach seems right as snd_pcm_ops->copy was introduced in kernel 6.6.0. It is RedHat that backported this change to RHEL 9.5 (5.14.0-503.15.1.el9_5)

@crazycat69
Copy link

i not use distribs with agressively patched old kernels, but in your case need change tbs_pcie.c and disable v6.5_pcm_copy.patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants