完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我们正在使用 imx8mp android 11 bsp,我们想要启用 UVC+UAC 复合小工具功能,我们启用的内核配置:
CONFIG_USB_CONFIGFS_F_UVC=y CONFIG_USB_CONFIGFS_F_UAC1=y CONFIG_USB_CONFIGFS_F_UAC2=y 并使用以下脚本启用 UVC 和 UAC: 停止 adbd echo "" > /config/usb_gadget/g1/UDC mkdir /config/usb_gadget/g1/functions/uvc.0 mkdir /config/usb_gadget/g1/functions/uac1.0 cd /config/usb_gadget/g1/functions/ uvc.0 echo 3072 > streaming_maxpacket echo 0 > streaming_maxburst echo 1 > streaming_interval mkdir 控制/header/h ln -s control/header/h control/class/fs/ ln -s control/header/h control/class/ss mkdir - p 流媒体/mjpeg/m/720p 回声 1280 > 流媒体/mjpeg/m/720p/wWidth 回声 720 > 流媒体/mjpeg/m/720p/wHeight 回声 29491200 > 流媒体/mjpeg/m/720p/dwMinBitRate 回声 29491200 > 流媒体/mjpeg /m/720p/dwMaxBitRate 回显 3110400 >流媒体/mjpeg/m/720p/dwMaxVideoFrameBufferSize echo 333333 > streaming/mjpeg/m/720p/dwDefaultFrameInterval echo "333333\n666666\n1000000\n" > streaming/mjpeg/m/720p/dwFrameInterval mkdir 流/头/h ln -s 流/mjpeg/m 流/头/ h ln -s streaming/header/h streaming/class/fs/ ln -s streaming/header/h streaming/class/hs/ ln -s streaming/header/h streaming/class/ss/ echo "uvc_uac1" > /config /usb_gadget/g1/configs/b.1/strings/0x409/configuration rm /config/usb_gadget/g1/configs/b.1/function0 rm /config/usb_gadget/g1/configs/b.1/function1 echo "0x1d6b" > /config/usb_gadget/g1/idVendor echo "0x0104" > /config/usb_gadget/g1/idProduct ln -s /config/usb_gadget/g1/functions/uvc.0 /config/usb_gadget/g1/configs/b.1/function0 ln -s /config/usb_gadget/g1/functions/uac1.0 /config/usb_gadget/g1/configs/b.1/function1 echo "38100000.dwc3" > /config/usb_gadget/g1/UDC uvc_gadget -v /dev/video2 -u /dev/video6 运行脚本后,我可以看到主机可以检测到 UVC + UAC [ 4166.912769] uvcvideo: 发现 UVC 1.00 设备 LATAM (1d6b:0104) [ 4166.924081] 输入: LATAM: UVC Camera as /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6:1.0/输入/输入38 kevinwei@kevinwei-TUF-Gaming-FX505GT:~$ cat /proc/asound/cards 0 [NVidia]: HDA-Intel - HDA NVidia HDA NVidia at 0xa4080000 irq 17 1 [sofsklhdacard]: sof-hda-dsp - sof-hda -dsp ASUSTeKCOMPUTERINC.-TUFGamingFX505GT-1.0-FX505GT 2 [LATAM]:USB 音频 - LATAM Pegatron LATAM,usb-0000:00:14.0-6,高速 但我使用下面的命令来尝试 UAC 设备,imx8mp 内核会崩溃 1.主机: gst-launch-1.0 -v filesrc location=c304-2.wav ! 波解析!音频转换!alsasink 设备=hw:2 2. imx8mp 设备: gst-launch-1.0 -v alsasrc device=hw:6 ! 音频/x-raw,速率=48000!音频转换!alsasink device=hw:5 // 到扬声器 imx8mp 内核会崩溃: [269.974571]警告:CPU:3 PID:1903 at drivers/usb/gadget/composite.c:427 usb_function_activate+0x88/0x94 [269.987846] 链接的模块:fec ptp pps_core realtek pci_imx6 snd_soc_imx_rpmsg snd_soc _rpmsg_wm8960_i2c snd_soc_rpmsg_wm8960 imx_audio_rpmsg snd_soc_fsl_rpmsg imx_pcm_rpmsg i2c_rpmsg_imx imx_dsp_r0 [269.987993 [270.153933] CPU:3 P ID:1903 Comm:gst-launch-1.0 Tainted:GCO 5.10.72-g44cf7994ab03-dirty #35 [270.167393] 硬件 名称:LATAM R11 (DT) [ 270.174958] pstate: 20400085 (nzCv daIf +PAN -UAO -TCO BTYPE=--) [270.184520] pc:usb_function_activate+0x88/0x94 [270.192685] lr:usb_function_activate+0x28/0x94 [270.200852 ] sp:ffffffc0289fba80 [270.207720] x29:ffffffc028 9fba80 x28: 0000000000000243 [ 270.216583] x27: 0000000000020002 x26: ffffff8012c7ca00 [ 270.225447] x25: ffffff80112789c0 x24: ffffff80da80dba8 [ 270.234311] x23: 0000000000000000 x22: ffffff80ca0ee600 [ 270.243175] x21: ffffff80c9170000 x20: ffffff80ca16d470 [ 270.252039] x19: ffffff80ca16d500 x18: ffffffc02815d078 [ 270.260908] x17: 0000000000000002 x16: ffffffffffffffff [ 270.269767] x15: 0000000000000030 x14: 0000000000000006 [ 270.278631 ] x13: ffffff80112789c8 x12: 00000000534f434b [ 270.287495] x11: 0000000000000000 x10: 0000000000000001 [ 270.296358] x9 : 0000000000000000 x8 : 0000000000000000 [ 270.305222] x7 : 0000000000000000 x6 : 000000000000003f [ 270.314087] x5 : 0000000000000040 x4 : 0000000000000100 [ 270.322950] x3 : ffffff80df044e00 x2 : ffffff80df044e00 [ 270.331815] x1 : 0000000000000000 x0:0000000000000000 [270.340678]调用跟踪: [270.346682]usb_function_activate+0x88/0x94 [270.354502]uvc_function_connect+0x20/0x60 [270.36 2238] uvc_v4l2_open+0x68/0x8c [270.369366] v4l2_open+0xe0/0x11c [270.376234 ] chrdev_open+0x1c4/0x230 [270.383361]do_dentry_open+0x234/0x42c [270.390749]vfs_open+0x30/0x40 [ 270.397442] path_openat+0x8b8/0xaf0 [ 270.404570] do_filp_open+0x7c/0x12c [ 270.411698] do_sys_openat2+0x80/0x168 [ 270.419000] __arm64_sys_openat+0x74/ 0xa0 [ 270.426564] el0_svc_common+0xb8/0x1a4 [270.433863] do_el0_svc+0x28/0x7c [270.440731 ] el0_svc+0x14/0x24 [270.447338] el0_sync_handler+0x6c/0xb4 [270.454726] el0_sync+0x1b4/0x1c0 [270.461592] --- [结束跟踪 e38e44029c5dcd28]--- [ 2 70.469865] configfs-gadget 小工具:uvc:UVC 连接失败-22 [270.479836] configfs-gadget 小工具:uvc:uvc_function_disable() 那么如何在 imx8mp android 11 bsp 上启用 UVC+UAC 复合小工具? |
|
相关推荐
|
|
只有小组成员才能发言,加入小组>>
1935个成员聚集在这个小组
加入小组我的项目我做主,使用GN+Ninja来完成构建系统(VSCode开发RT106X)
36430 浏览 0 评论
NXP IMX8应用处理器快速入门必备:技巧、使用、设计指南
5000 浏览 1 评论
6115 浏览 1 评论
6821 浏览 0 评论
NXP i.MX6UL开发板(linux系统烧录+规格+硬件+模块移植)使用手册
4253 浏览 0 评论
655浏览 2评论
求助,S32G上Core M启动后如何让Core A在Flash指定位置加载uboot?
646浏览 2评论
ESP32-WROVER-IE + LAN8720以太网,GPIO0电压只有1.6v,无法正常进入spi flash boot模式如何解决?
647浏览 2评论
求分享适用于PN7160 Android的NFC工厂测试应用程序
737浏览 2评论
850浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-28 02:27 , Processed in 0.953019 second(s), Total 75, Slave 59 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (威廉希尔官方网站 图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号