xerpi / vita-udcd-uvc

PSVita UDCD USB Video Class plugin
468 stars 23 forks source link

Testing latest commits and test with MacOS. #49

Closed fpmweb closed 3 years ago

fpmweb commented 4 years ago

Hello xerpi,

I have compiled your latest commits to see if it could work on my Mac but it doesn't work either :( If I can help you solve the problem for Mac, tell me where to look and I will help you.

Thanks for your time and your great work.

fpmweb commented 4 years ago

My test with lsub on Mac (macOS Catalina):

Bus 020 Device 019: ID 054c:1337 Sony Corporation PSVita Serial: UDCD UVC

and lsub -vd:

            PSVita:

              Product ID: 0x1337
              Vendor ID: 0x054c  (Sony Corporation)
              Version: 1.00
              Serial Number: UDCD UVC
              Speed: Up to 480 Mb/s
              Manufacturer: SONY
              Location ID: 0x14210000 / 19
              Current Available (mA): 500
              Current Required (mA): 500
              Extra Operating Current (mA): 0
fpmweb commented 4 years ago

And with dmesg:

PSVita@14210000 <class AppleUSBDevice, id 0x10000850c, registered, matched, active, busy 0 (1 ms), retain 15>

xerpi commented 4 years ago

Hi, I installed a macOS VM and tried to debug why it doesn't work on macOS but I didn't manage to find the cause :(

fpmweb commented 4 years ago

First of all, thanks for your time. It's a shame that your plugin doesn't work on MacOS. The truth is that it is a great plugin and many people in the scene expect it. If I can review something from my Mac you just have to tell me.

Thanks xerpi!

erhoof commented 4 years ago

"Mac UVC driver is expecting some kind of info from 0x84(UVC_GET_RES)" Do you remember that? https://www.reddit.com/r/vitahacks/comments/95256o/poc_v6_psvita_usb_streaming_uvc_usb_video_class/ Maybe this will help you

xerpi commented 4 years ago

I've forgotten about that! I'll try to implement that request, but I don't have a Mac so I need testers.

Rydgel commented 4 years ago

I can help testing too, I have a mac and know how to compile stuff

tetsuoScene commented 4 years ago

Xerpi, I have a MAC and I have the development environment ready to do git pull, compile and test ;)

xerpi commented 4 years ago

I'm a bit busy during workdays, so to debug do the following:

If you have done that, open the video player on Mac and paste here the generated log found at ux0:dump/udcd_uvc_log.txt.

tetsuoScene commented 4 years ago

Ok, I'll try.

By the way, consider putting the PS VITA. This would be the request: make DEBUG=1 PSVITAIP=XXX.XXX.X.X send

tetsuoScene commented 4 years ago

This is the log:

udcd_uvc by xerpi
uvc_driver_start
uvc_udcd_configure 1 3 0x0187d028 1
uvc_udcd_configure 2 3 0x0187e028 1
uvc_udcd_attach 2
usb_driver_process_request(recipient: 0, arg: ffffffff)
  request: 8 type: 80 wValue: 0 wIndex: 0 wLength: 1
usb_driver_process_request(recipient: 0, arg: ffffffff)
  request: 6 type: 80 wValue: 300 wIndex: 0 wLength: ff
usb_driver_process_request(recipient: 0, arg: ffffffff)
  request: 8 type: 80 wValue: 0 wIndex: 0 wLength: 1
uvc_udcd_change 1 0
usb_driver_process_request(recipient: 1, arg: ffffffff)
  request: b type: 1 wValue: 0 wIndex: 1 wLength: 0
uvc_udcd_change 1 0
usb_driver_process_request(recipient: 1, arg: ffffffff)
  request: b type: 1 wValue: 0 wIndex: 1 wLength: 0
usb_driver_process_request(recipient: 1, arg: 1)
  request: 1 type: 21 wValue: 100 wIndex: 1 wLength: 22
  uvc_handle_video_streaming_req 100, 1
Probe SET_CUR, bFormatIndex: 1, bmFramingInfo: 0
usb_driver_process_request(recipient: 1, arg: 1)
  request: 81 type: a1 wValue: 100 wIndex: 1 wLength: 22
  uvc_handle_video_streaming_req 100, 81
Probe GET_CUR, bFormatIndex: 1, bmFramingInfo: 0
usb_driver_process_request(recipient: 1, arg: 1)
  request: 1 type: 21 wValue: 200 wIndex: 1 wLength: 22
  uvc_handle_video_streaming_req 200, 1
Commit SET_CUR, bFormatIndex: 1, bmFramingInfo: 0
usb_driver_process_request(recipient: 2, arg: ffffffff)
  request: 1 type: 2 wValue: 0 wIndex: 81 wLength: 0
NV12 CSC: 2657us xfer: 17010us
NV12 CSC: 2640us xfer: 17005us
NV12 CSC: 2646us xfer: 16979us
NV12 CSC: 2646us xfer: 17022us
NV12 CSC: 2638us xfer: 17075us
NV12 CSC: 2626us xfer: 17026us
NV12 CSC: 2643us xfer: 16994us
NV12 CSC: 2633us xfer: 17061us
NV12 CSC: 2636us xfer: 17080us
NV12 CSC: 2616us xfer: 17083us
NV12 CSC: 2621us xfer: 17021us
NV12 CSC: 2638us xfer: 17076us
NV12 CSC: 2640us xfer: 17047us
NV12 CSC: 2623us xfer: 17038us
NV12 CSC: 2645us xfer: 17032us
NV12 CSC: 2637us xfer: 17039us
NV12 CSC: 2627us xfer: 17030us
NV12 CSC: 2651us xfer: 17049us
NV12 CSC: 2601us xfer: 17071us
NV12 CSC: 2642us xfer: 17087us
NV12 CSC: 2632us xfer: 17050us
NV12 CSC: 2647us xfer: 17012us
NV12 CSC: 2643us xfer: 17042us
NV12 CSC: 2633us xfer: 17063us
NV12 CSC: 2645us xfer: 17072us
NV12 CSC: 2638us xfer: 17016us
NV12 CSC: 2633us xfer: 17090us
NV12 CSC: 2631us xfer: 17083us
NV12 CSC: 2639us xfer: 17050us

etc.....

xerpi commented 4 years ago

That's interesting because I don't see why UVC_GET_RES (0x84) being sent.

Maybe the problem is that macOS doesn't support NV12 frames?

tetsuoScene commented 4 years ago

I don’t think that’s a problem.

I am attaching the log file with one more test: udcd_uvc_log.txt

xerpi commented 4 years ago

The logs look good to me... Can you try changing this line:https://github.com/xerpi/vita-udcd-uvc/blob/master/include/usb_descriptors.h#L116 to UVC_GUID_FORMAT_YUY2?

tetsuoScene commented 4 years ago

Done, but don't work. New log file: udcd_uvc_log.txt

AaronFatalis commented 4 years ago

Following this, would love to get this to work on my Mac, so I can offer testing from my end as well, just instruct me on what I need to provide to assist.

tetsuoScene commented 4 years ago

Following this, would love to get this to work on my Mac, so I can offer testing from my end as well, just instruct me on what I need to provide to assist.

https://github.com/xerpi/vita-udcd-uvc/issues/49#issuecomment-623401005

tetsuoScene commented 4 years ago

If you need anything. Here I'm to try.

Thanks!

AuroraWright commented 4 years ago

@xerpi not sure if that's of any help but I have 2 UVC devices (a webcam and a capture card) which do work on Mac, I posted a lsusb of both here https://github.com/xerpi/vita-udcd-uvc/issues/4#issuecomment-593750722 . If you want to, I can also try dumping their traffic using this https://aud1os.wordpress.com/2017/10/22/usb-monitoring-with-wireshark/ (never used wireshark before tbh) and/or the Vita traffic

Mich-Cr commented 4 years ago

help hello good afternoon we are June 9, 2020 any solution to use udcd-uvc on mac? Captura de Pantalla 2020-06-02 a la(s) 16 38 34

tetsuoScene commented 4 years ago

No, doesn't work on mac :(

csutedja commented 4 years ago

is there going to be a fix?

xerpi commented 4 years ago

For now you can use Parallels to run a small Linux distro on macOS...

xfangfang commented 3 years ago

Here's a version that works for MacOS, but there's a problem with it (two columns of pixels on the left of each frame appear on the right side of the screen)

Anyone interested in fixing this problem can see this pr: vita-udcd-uvc/pull/72

vita-udcd-uvc-builds-for-mac

xerpi commented 3 years ago

Thanks to @xfangfang for discovering the potential issue! I've pushed new commits to master. Can you try if this version works on macOS? It works fine on Android. udcd_uvc.zip

xfangfang commented 3 years ago

It works!

dochardware commented 3 years ago

works for me. thanks!

![Screen Shot 2020-09-26 at 2.41.31 AM.png…]()

Rydgel commented 3 years ago

Good job everyone!