Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    T113 Tina otg gadget uvc失败

    D1系列-RISC-V
    3
    5
    181
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • X
      xuxxxxx LV 3 last edited by

      参考了《Linux_USB_开发指南.pdf》,其中mass storage已经成功
      2c8a37b2-23a5-42af-9087-5bd30baa2437-image.png
      log:

      [   30.608897] rmmod_host_driver
      [   30.608897]
      [   30.615506] [ehci0-controller]: sunxi_usb_disable_ehci
      [   30.621256] [sunxi-ehci0]: remove, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xc0c6be88
      [   30.630996] sunxi-ehci 4101000.ehci0-controller: remove, state 4
      [   30.637701] usb usb3: USB disconnect, device number 1
      [   30.644409] sunxi-ehci 4101000.ehci0-controller: USB bus 3 deregistered
      [   30.652214] [ohci0-controller]: sunxi_usb_disable_ohci
      [   30.657952] [sunxi-ohci0]: remove, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xc0c6c118
      [   30.667684] sunxi-ohci 4101400.ohci0-controller: remove, state 4
      [   30.674437] usb usb4: USB disconnect, device number 1
      [   30.681026] sunxi-ohci 4101400.ohci0-controller: USB bus 4 deregistered
      [   32.528909] usb1-vbus: disabling
      [   34.248882]
      [   34.248882] insmod_device_driver
      [   34.248882]
      [   34.256049] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dummy regulator
      [   34.427355] sunxi_set_cur_vol_work()489 WARN: get power supply failed
      [   34.514007] android_work: sent uevent USB_STATE=CONNECTED
      [   34.575763] configfs-gadget gadget: high-speed config #1: c
      [   34.582056] android_work: sent uevent USB_STATE=CONFIGURED
      [   37.024543] random: crng init done
      

      然后再尝试uvc失败了,pc上没有识别:
      4a6206c8-f885-491b-92c6-491b4bb0d296-image.png

      log:

      [  130.902109] configfs-gadget gadget: uvc: uvc_function_bind()
      [  141.897361] rmmod_host_driver
      [  141.897361]
      [  141.903971] [ehci0-controller]: sunxi_usb_disable_ehci
      [  141.909723] [sunxi-ehci0]: remove, pdev->name: 4101000.ehci0-controller, sunxi_ehci: 0xc0c6be88
      [  141.919462] sunxi-ehci 4101000.ehci0-controller: remove, state 4
      [  141.926168] usb usb3: USB disconnect, device number 1
      [  141.932870] sunxi-ehci 4101000.ehci0-controller: USB bus 3 deregistered
      [  141.940680] [ohci0-controller]: sunxi_usb_disable_ohci
      [  141.946416] [sunxi-ohci0]: remove, pdev->name: 4101400.ohci0-controller, sunxi_ohci: 0xc0c6c118
      [  141.956154] sunxi-ohci 4101400.ohci0-controller: remove, state 4
      [  141.962907] usb usb4: USB disconnect, device number 1
      [  141.969512] sunxi-ohci 4101400.ohci0-controller: USB bus 4 deregistered
      [  145.537351]
      [  145.537351] insmod_device_driver
      [  145.537351]
      [  145.544516] sunxi_usb_udc 4100000.udc-controller: 4100000.udc-controller supply udc not found, using dummy regulator
      [  206.524188] random: crng init done
      

      从mass storage改成uvc设备重启过,然后configfs也重新配置过了。log对比看起来uvc模式都没有建立连接,大佬帮忙看看问题可能在哪里?

      X 1 Reply Last reply Reply Quote Share 0
      • X
        xuxxxxx LV 3 @xucw15990192241 last edited by

        是还需要在应用层运行什么程序吗?

        1 Reply Last reply Reply Quote Share 0
        • X
          xuxxxxx LV 3 last edited by

          configfs配置完成后,/dev/video2成功注册(gadget uvc设备),之后连接PC,运行了uvc-gadget之后PC端出现"UVC Camera"设备,,但PC端使用软件打开设备不能出图,同时linux出现报错,log:

          root@TinaLinux:~# ./uvc-gadget -c /dev/video0 g1/functions/uvc.usb0
          Device /dev/video0 opened: SKT-SL500C-125A: SKT-SL500C-125 (usb-sunxi-ehci-1.4).
          Device /dev/video2 opened: sunxi_usb_udc (gadget).
          [   24.861291] sunxi_set_cur_vol_work()489 WARN: get power supply failed
          [   24.947920] android_work: sent uevent USB_STATE=CONNECTED
          [   25.004974] configfs-gadget gadget: high-speed config #1: c
          [   25.011196] configfs-gadget gadget: uvc: uvc_function_set_alt(0, 0)
          [   25.018181] configfs-gadget gadget: uvc: reset UVC Control
          [   25.024307] configfs-gadget gadget: uvc: uvc_function_set_alt(1, 0)
          [   25.031356] configfs-gadget gadget: uvc: uvc_function_set_alt(1, 0)
          [   25.038398] android_work: sent uevent USB_STATE=CONFIGURED
          [   25.051649] configfs-gadget gadget: uvc: uvc_function_set_alt(1, 0)
          bRequestType a1 bRequest 81 wValue 0200 wIndex 0000 wLength 0001
          control request (req GET_CUR cs BRIGHTNESS)
          bRequestType a1 bRequest 81 wValue 0200 wIndex 0000 wLength 0001
          control request (req GET_CUR cs BRIGHTNESS)
          bRequestType a1 bRequest 81 wValue 0200 wIndex 0000 wLength 0001
          control request (req GET_CUR cs BRIGHTNESS)
          [   26.225582] sunxi_vbus_det_work()3493 WARN: get power supply failed
          [   26.232578] configfs-gadget gadget: uvc: uvc_function_disable()
          [   26.239233] android_work: sent uevent USB_STATE=DISCONNECTED
          [   32.525579] usb1-vbus: disabling
          [  108.515566] sunxi_vbus_det_work()3493 WARN: get power supply failed
          [  108.522566] android_work: did not send uevent (0 0 00000000)
          [  111.330935] ERR: Operation not supported
          [  111.335358] android_work: sent uevent USB_STATE=CONNECTED
          [  111.341394] ERR: Operation not supported
          [  111.345792] ERR: Operation not supported
          [  111.350195] ERR: Operation not supported
          [  111.354573] ERR: Operation not supported
          [  111.358959] ERR: Operation not supported
          [  111.363343] ERR: Operation not supported
          [  111.367738] ERR: Operation not supported
          [  111.377574] ERR: Operation not supported
          [  111.382104] ERR: Operation not supported
          [  115.495562] sunxi_vbus_det_work()3493 WARN: get power supply failed
          [  115.502589] android_work: sent uevent USB_STATE=DISCONNECTED
          

          不知道是不是常说的usb 端点不够导致的问题

          C 1 Reply Last reply Reply Quote Share 0
          • C
            chengwei_peng LV 6 last edited by

            应用端应该有个uvc的节点,然后将输出传递给PC,要不然PC给过来的信息都没有处理,表现为ERR: Operation not supported

            1 Reply Last reply Reply Quote Share 0
            • C
              chhjnavy LV 3 @xucw15990192241 last edited by

              @xucw15990192241 请问你这个问题解决了吗?我也遇到这个问题了

              1 Reply Last reply Reply Quote Share 0
              • 1 / 1
              • First post
                Last post

              Copyright © 2022 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

              行为准则 | 用户协议 | 隐私权政策