Unable to Enable the UVC driver for R13.1 WP76xx Yocto 2.5 (SWI9X07Y_02.28.03.03)

Hi all ,
I was trying to enable UVC driver for WP76xx ( SWI9X07Y_02.28.03.03-Yocto-2.5) .
I have followed below steps to do so
Created a configuration file named as camera.cfg (329 Bytes) camera.cfg in meta-swi/meta-swi-mdm9x28/recipes-
kernel/linux/files/ folder with below contents:
CONFIG_MEDIA_SUPPORT=m
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_USB_SUPPORT=y
CONFIG_VIDEO_DEV=m
CONFIG_VIDEO_V4L2=m
CONFIG_VIDEOBUF2_CORE=m
CONFIG_VIDEOBUF2_MEMOPS=m
CONFIG_VIDEOBUF2_VMALLOC=m
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_V4L_PLATFORM_DRIVERS=y

and modified the linux-quic_git.bb file as shown in the attachment linux-quic_git.bb (8.7 KB) . Also edited f_uvc.c kernel source code in /kernel/drivers/usb/gadget/function/ (File attached ) f_uvc.c (23.2 KB) .

I am unable to find the driver in the image generated . Please Let me know if i am missing something .

Thanks & Regards

  • AK

You may give a try on directly modifying ./kernel/arch/arm/configs/mdm9607_defconfig

CONFIG_MEDIA_SUPPORT=m
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_USB_SUPPORT=y
CONFIG_VIDEO_DEV=m
CONFIG_VIDEO_V4L2=m
CONFIG_VIDEOBUF2_CORE=m
CONFIG_VIDEOBUF2_MEMOPS=m
CONFIG_VIDEOBUF2_VMALLOC=m
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
CONFIG_V4L_PLATFORM_DRIVERS=y

Hi @jyijyi ,
Thanks for the configuration . I was able to enable UVC driver . But now i am trying to enable USB audio with below config

CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=m

which is getting failed with below error

ome/akshay/Documents/YOCTO/yocto/build_bin/tmp/work-shared/swi-mdm9x28-wp/kernel-source/kernel/Makefile:146: *** No X.509 certificates found *
| CC [M] crypto/seqiv.o
| CC [M] crypto/ctr.o
| CC [M] block/test-iosched.o
| CC [M] crypto/ccm.o
| CC [M] crypto/arc4.o
| CC [M] fs/quota/quota_v1.o
| CC [M] crypto/michael_mic.o
| CC [M] fs/quota/quota_v2.o
| CC [M] crypto/ansi_cprng.o
| CC [M] fs/quota/quota_tree.o
| CC [M] sound/core/rawmidi.o
| CC [M] net/bluetooth/af_bluetooth.o
| CC [M] drivers/bluetooth/hci_vhci.o
| CC [M] net/bluetooth/hci_core.o
| CC [M] drivers/bluetooth/hci_ldisc.o

/home/akshay/Documents/YOCTO/yocto/build_bin/tmp/work-shared/swi-mdm9x28-wp/kernel-source/sound/core/rawmidi.c: In function ‘snd_rawmidi_output_params’:
| /home/akshay/Documents/YOCTO/yocto/build_bin/tmp/work-shared/swi-mdm9x28-wp/kernel-source/sound/core/rawmidi.c:651:16: warning: unused variable ‘flags’ [-Wunused-variable]
| error, forbidden warning: rawmidi.c:651
| /home/akshay/Documents/YOCTO/yocto/build_bin/tmp/work-shared/swi-mdm9x28-wp/kernel-source/scripts/Makefile.build:257: recipe for target ‘sound/core/rawmidi.o’ failed
| make[4]: *** [sound/core/rawmidi.o] Error 1
| /home/akshay/Documents/YOCTO/yocto/build_bin/tmp/work-shared/swi-mdm9x28-wp/kernel-source/scripts/Makefile.build:402: recipe for target ‘sound/core’ failed
| make[3]: *** [sound/core] Error 2
| /home/akshay/Documents/YOCTO/yocto/build_bin/tmp/work-shared/swi-mdm9x28-wp/kernel-source/Makefile:969: recipe for target ‘sound’ failed
| make[2]: *** [sound] Error 2

What could be the reason ? Am i missing something ?

From the document below, it is working fine in R9 yocto source code. You might have a quick try on that and see if this is only happening to R13 yocto source.

BTW, from your compilation log, it seems just the warning makes the error, you might go to kernel source code to comment out something:

| /home/akshay/Documents/YOCTO/yocto/build_bin/tmp/work-shared/swi-mdm9x28-wp/kernel-source/sound/core/rawmidi.c:651:16: warning: unused variable ‘flags’ [-Wunused-variable]
| error, forbidden warning: rawmidi.c:651

Hi @jyijyi ,
I tried with R10.1 Yocto source code the USB-AUDIO drivers gets enabled where as same fails in R13.1 or above . Let me try to comment out things I will keep you updated .

Thanks & Regards
-Akshay K

How about R9 yocto source?
It should be OK to compile.

@jyijyi , Yes in R9 We will not experience any issues adding USB-Audio drivers .

Then you can diff what has been change in rawmidi.c

Hi @jyijyi ,

Thanks for the quick response . I have commented below lines in respective source codes which will resolve the error .

/yocto/kernel/sound/core/rawmidi.c => line 651 and 626 (unsigned long flags;)
/yocto/kernel/sound/usb/card.c => 626 (struct usb_mixer_interface *mixer;)

Thanks & Regards

  • Akshay K