Re: how to test g_webcam

2019-10-16 Thread Roger Quadros

Hi,

On 15/10/2019 18:26, Gopal, Saranya wrote:

Hi Quadros,


I used the a different uvc-gadget application from this location [1] and it 
seems
to
work quite fine with builtin video pattern and jpg image but not with V4L2
capture source.

So something is broken in uvc-gadget at [2]

[1] https://github.com/wlhe/uvc-gadget
[2] http://git.ideasonboard.org/uvc-gadget.git


I think support for pattern and JPG image was intentionally removed from 
uvc-gadget with this commit:
http://git.ideasonboard.org/uvc-gadget.git/commitdiff/00b892305694ea796728c1f97831bc3c59a8e3da?hp=53b139a22810e00aa0ce872853b45107c4edee98


Thanks. It would be nice to know what was the intention.
It does cripple uvc-gadget testing on platforms that don't have a V4L2 capture 
source.

cheers,
-roger


Thanks,
Saranya


cheers,
-roger
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


RE: how to test g_webcam

2019-10-15 Thread Gopal, Saranya
Hi Quadros,

> I used the a different uvc-gadget application from this location [1] and it 
> seems
> to
> work quite fine with builtin video pattern and jpg image but not with V4L2
> capture source.
> 
> So something is broken in uvc-gadget at [2]
> 
> [1] https://github.com/wlhe/uvc-gadget
> [2] http://git.ideasonboard.org/uvc-gadget.git

I think support for pattern and JPG image was intentionally removed from 
uvc-gadget with this commit:
http://git.ideasonboard.org/uvc-gadget.git/commitdiff/00b892305694ea796728c1f97831bc3c59a8e3da?hp=53b139a22810e00aa0ce872853b45107c4edee98
Thanks,
Saranya
> 
> cheers,
> -roger
> --
> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
> Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


Re: how to test g_webcam

2019-10-15 Thread Roger Quadros

Hi,

On 14/10/2019 17:22, Felipe Balbi wrote:


Hi,

Roger Quadros  writes:

Hmm, Link Change is disabled by default upstream, unless you're running
on anything older than 2.50a. I don't remember the version you're using,
though :-p


2.02a


Thanks :-)


   irq/170-dwc3-270   [000] d...   173.408918: dwc3_event: event 
(0101): Reset [U0]
   irq/170-dwc3-270   [000] d...   173.463787: dwc3_event: event 
(0201): Connection Done [U0]
   irq/170-dwc3-270   [000] d...   173.463796: dwc3_gadget_ep_cmd: ep0out: cmd 
'Set Endpoint Configuration' [401] params 8200 0500  --> 
status: Successful
   irq/170-dwc3-270   [000] d...   173.463799: dwc3_gadget_ep_enable: ep0out: 
mps 64/512 streams 0 burst 1 ring 0/0 flags E:swBp:>
   irq/170-dwc3-270   [000] d...   173.463803: dwc3_gadget_ep_cmd: ep0in: cmd 
'Set Endpoint Configuration' [401] params 8200 02000500  --> 
status: Successful
   irq/170-dwc3-270   [000] d...   173.463804: dwc3_gadget_ep_enable: ep0in: 
mps 64/512 streams 0 burst 1 ring 0/0 flags E:swbp:<


hmm, High speed? Can we get traces for superspeed too?


We can after I figure out the -ENODEV issue I reported above.


cool


 uvc-gadget-275   [001] d...   173.712586: dwc3_prepare_trb: ep0out: 
trb 4a151d32 buf ae85b000 size 8 ctrl 0c23 (HLcs:SC:setup)
 uvc-gadget-275   [001] d...   173.712592: dwc3_gadget_ep_cmd: ep0out: cmd 
'Start Transfer' [406] params  ae85b000  --> status: Successful
   irq/170-dwc3-270   [000] d...   173.712688: dwc3_event: event 
(c040): ep0out: Transfer Complete (sIL) [Setup Phase]
   irq/170-dwc3-270   [000] d...   173.712690: dwc3_ctrl_req: a1 81 00 02 
00 00 01 00


Another one...


0xa1 GetRequest directed to video data endpoint of a VideoStreaming interface,
0x81 GET_CUR (Current setting attribute),
0002 CT_AE_MODE_CONTROL (Auto-exposure control selector),
 interface?,
length 0001,


Thanks for these :-)


 uvc-gadget-275   [001] d...   215.933842: dwc3_gadget_ep_cmd: ep1in: cmd 
'End Transfer' [30c08] params    --> status: Successful
 uvc-gadget-275   [001] .n..   215.933980: dwc3_ep_dequeue: ep2in: req 
f1fb458c length 0/1024 zsI ==> -11
 uvc-gadget-275   [001] .n..   215.940651: dwc3_ep_dequeue: ep2in: req 
5be7fd9f length 0/1024 zsI ==> -11
 uvc-gadget-275   [001] .n..   215.947297: dwc3_ep_dequeue: ep2in: req 
996abf23 length 0/1024 zsI ==> -11
 uvc-gadget-275   [001] .n..   215.953954: dwc3_ep_dequeue: ep2in: req 
d9961026 length 0/1024 zsI ==> -11
 uvc-gadget-275   [001] .n..   215.960615: dwc3_free_request: ep2in: req 
f1fb458c length 0/1024 zsI ==> -11
 uvc-gadget-275   [001] .n..   215.960617: dwc3_free_request: ep2in: req 
5be7fd9f length 0/1024 zsI ==> -11
 uvc-gadget-275   [001] .n..   215.960618: dwc3_free_request: ep2in: req 
996abf23 length 0/1024 zsI ==> -11
 uvc-gadget-275   [001] .n..   215.960619: dwc3_free_request: ep2in: req 
d9961026 length 0/1024 zsI ==> -11


So, first things first:

Let's figure out what those class requests are and why are they *always*
stalled. UVC class spec should answer that.


I tried to decipher 2 class specific requests that we get.



Then we need to find out why it takes 1.5 seconds for uvc-gadget to
queue more data.



Not sure how to do that.


Look at the source for uvc-gadget. If I were to guess, I'd say
uvc-gadget prepares frames as a function of the requested bandwidth.

It probably goes to sleep periodically until it thinks there's more data
to send.



I used the a different uvc-gadget application from this location [1] and it 
seems to
work quite fine with builtin video pattern and jpg image but not with V4L2 
capture source.

So something is broken in uvc-gadget at [2]

[1] https://github.com/wlhe/uvc-gadget
[2] http://git.ideasonboard.org/uvc-gadget.git

cheers,
-roger
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


Re: how to test g_webcam

2019-10-14 Thread Felipe Balbi


Hi,

Roger Quadros  writes:
>> Hmm, Link Change is disabled by default upstream, unless you're running
>> on anything older than 2.50a. I don't remember the version you're using,
>> though :-p
>
> 2.02a

Thanks :-)

>>>   irq/170-dwc3-270   [000] d...   173.408918: dwc3_event: event 
>>> (0101): Reset [U0]
>>>   irq/170-dwc3-270   [000] d...   173.463787: dwc3_event: event 
>>> (0201): Connection Done [U0]
>>>   irq/170-dwc3-270   [000] d...   173.463796: dwc3_gadget_ep_cmd: 
>>> ep0out: cmd 'Set Endpoint Configuration' [401] params 8200 0500 
>>>  --> status: Successful
>>>   irq/170-dwc3-270   [000] d...   173.463799: dwc3_gadget_ep_enable: 
>>> ep0out: mps 64/512 streams 0 burst 1 ring 0/0 flags E:swBp:>
>>>   irq/170-dwc3-270   [000] d...   173.463803: dwc3_gadget_ep_cmd: 
>>> ep0in: cmd 'Set Endpoint Configuration' [401] params 8200 02000500 
>>>  --> status: Successful
>>>   irq/170-dwc3-270   [000] d...   173.463804: dwc3_gadget_ep_enable: 
>>> ep0in: mps 64/512 streams 0 burst 1 ring 0/0 flags E:swbp:<
>> 
>> hmm, High speed? Can we get traces for superspeed too?
>
> We can after I figure out the -ENODEV issue I reported above.

cool

>>> uvc-gadget-275   [001] d...   173.712586: dwc3_prepare_trb: ep0out: 
>>> trb 4a151d32 buf ae85b000 size 8 ctrl 0c23 (HLcs:SC:setup)
>>> uvc-gadget-275   [001] d...   173.712592: dwc3_gadget_ep_cmd: 
>>> ep0out: cmd 'Start Transfer' [406] params  ae85b000  --> 
>>> status: Successful
>>>   irq/170-dwc3-270   [000] d...   173.712688: dwc3_event: event 
>>> (c040): ep0out: Transfer Complete (sIL) [Setup Phase]
>>>   irq/170-dwc3-270   [000] d...   173.712690: dwc3_ctrl_req: a1 81 00 
>>> 02 00 00 01 00
>> 
>> Another one...
>
> 0xa1 GetRequest directed to video data endpoint of a VideoStreaming interface,
> 0x81 GET_CUR (Current setting attribute),
> 0002 CT_AE_MODE_CONTROL (Auto-exposure control selector),
>  interface?,
> length 0001,

Thanks for these :-)

>>> uvc-gadget-275   [001] d...   215.933842: dwc3_gadget_ep_cmd: 
>>> ep1in: cmd 'End Transfer' [30c08] params    --> 
>>> status: Successful
>>> uvc-gadget-275   [001] .n..   215.933980: dwc3_ep_dequeue: ep2in: 
>>> req f1fb458c length 0/1024 zsI ==> -11
>>> uvc-gadget-275   [001] .n..   215.940651: dwc3_ep_dequeue: ep2in: 
>>> req 5be7fd9f length 0/1024 zsI ==> -11
>>> uvc-gadget-275   [001] .n..   215.947297: dwc3_ep_dequeue: ep2in: 
>>> req 996abf23 length 0/1024 zsI ==> -11
>>> uvc-gadget-275   [001] .n..   215.953954: dwc3_ep_dequeue: ep2in: 
>>> req d9961026 length 0/1024 zsI ==> -11
>>> uvc-gadget-275   [001] .n..   215.960615: dwc3_free_request: ep2in: 
>>> req f1fb458c length 0/1024 zsI ==> -11
>>> uvc-gadget-275   [001] .n..   215.960617: dwc3_free_request: ep2in: 
>>> req 5be7fd9f length 0/1024 zsI ==> -11
>>> uvc-gadget-275   [001] .n..   215.960618: dwc3_free_request: ep2in: 
>>> req 996abf23 length 0/1024 zsI ==> -11
>>> uvc-gadget-275   [001] .n..   215.960619: dwc3_free_request: ep2in: 
>>> req d9961026 length 0/1024 zsI ==> -11
>> 
>> So, first things first:
>> 
>> Let's figure out what those class requests are and why are they *always*
>> stalled. UVC class spec should answer that.
>
> I tried to decipher 2 class specific requests that we get.
>
>> 
>> Then we need to find out why it takes 1.5 seconds for uvc-gadget to
>> queue more data.
>> 
>
> Not sure how to do that.

Look at the source for uvc-gadget. If I were to guess, I'd say
uvc-gadget prepares frames as a function of the requested bandwidth.

It probably goes to sleep periodically until it thinks there's more data
to send.

Best

-- 
balbi


Re: how to test g_webcam

2019-10-14 Thread Roger Quadros




On 14/10/2019 15:38, Felipe Balbi wrote:


Hi,

Roger Quadros  writes:

I'm having a hard time to figure out how to get g_webcam working with
the tip of http://git.ideasonboard.org/uvc-gadget.git

Platform I'm using is dra7-evm with dwc3 controller.


which arguments are you passing to g_webcam?


I've tried a couple of things

modprobe g_webcam streaming_maxpacket=1024

modprobe g_webcam streaming_maxpacket=3072 streaming_maxburst=9

but nothing worked.


I managed to get things working on am335x-bone (musb) using the
uvc-gadget.sh script provided at http://git.ideasonboard.org/uvc-gadget.git
which uses configfs.

It seems to use "streaming_maxpacket=1024".


setting commit control, length = 26
Setting format to 0x56595559 1280x720
=== Setting frame rate to 15 fps
Starting video stream.



am335x-bone does work with g_webcam (streaming_maxpacket=1024) however, notice 
fps below


setting commit control, length = 26
Setting format to 0x56595559 1280x720
=== Setting frame rate to 0 fps
Starting video stream.


using uvc-gadget.sh with dwc3 fails like so


root@lta0400828a:~# ./uvc-gadget.sh start
Detecting platform:
   board : TI DRA742
   udc   : 4889.usb
Creating the USB gadget
Creating gadget directory g1
OK
Setting Vendor and Product ID's
OK
Setting English strings
OK
Creating Config
Creating functions...
 Creating UVC gadget functionality : uvc.0
OK
[   20.165439] configfs-gadget gadget: uvc: uvc_function_bind()
Binding USB Device Controller
[   20.171431] configfs-gadget 4889.usb: failed to start g1: -19


fair enough. Let's get dwc3 tracepoints to try and figure this out. -19
is ENODEV, btw. That's weird.


dwc3 trace is below.


oh, you already did :-)


# tracer: nop
#
# entries-in-buffer/entries-written: 830/830   #P:2
#
#  _-=> irqs-off
# / _=> need-resched
#| / _---=> hardirq/softirq
#|| / _--=> preempt-depth
#||| / delay
#   TASK-PID   CPU#  TIMESTAMP  FUNCTION
#  | |   |      | |
 uvc-gadget.sh-241   [000] 98.963663: dwc3_alloc_request: ep0out: req 
b52ce5b9 length 0/0 zsI ==> 0
 uvc-gadget.sh-241   [000] 98.969442: dwc3_alloc_request: ep0out: req 
2e97646a length 0/0 zsI ==> 0
 uvc-gadget.sh-241   [000] dn..98.970354: dwc3_gadget_ep_cmd: ep0out: cmd 
'Start New Configuration' [409] params    --> status: 
Successful
 uvc-gadget.sh-241   [000] dn..98.970359: dwc3_gadget_ep_cmd: ep0out: cmd 
'Set Endpoint Transfer Resource' [402] params 0001   --> 
status: Successful
 uvc-gadget.sh-241   [000] dn..98.970362: dwc3_gadget_ep_cmd: ep0in: cmd 
'Set Endpoint Transfer Resource' [402] params 0001   --> 
status: Successful
 uvc-gadget.sh-241   [000] dn..98.970366: dwc3_gadget_ep_cmd: ep1out: cmd 
'Set Endpoint Transfer Resource' [402] params 0001   --> 
status: Successful
 uvc-gadget.sh-241   [000] dn..98.970369: dwc3_gadget_ep_cmd: ep1in: cmd 
'Set Endpoint Transfer Resource' [402] params 0001   --> 
status: Successful
 uvc-gadget.sh-241   [000] dn..98.970372: dwc3_gadget_ep_cmd: ep2out: cmd 
'Set Endpoint Transfer Resource' [402] params 0001   --> 
status: Successful
 uvc-gadget.sh-241   [000] dn..98.970375: dwc3_gadget_ep_cmd: ep2in: cmd 
'Set Endpoint Transfer Resource' [402] params 0001   --> 
status: Successful
 uvc-gadget.sh-241   [000] dn..98.970379: dwc3_gadget_ep_cmd: ep3out: cmd 
'Set Endpoint Transfer Resource' [402] params 0001   --> 
status: Successful
 uvc-gadget.sh-241   [000] dn..98.970382: dwc3_gadget_ep_cmd: ep3in: cmd 
'Set Endpoint Transfer Resource' [402] params 0001   --> 
status: Successful
 uvc-gadget.sh-241   [000] dn..98.970385: dwc3_gadget_ep_cmd: ep4out: cmd 
'Set Endpoint Transfer Resource' [402] params 0001   --> 
status: Successful
 uvc-gadget.sh-241   [000] dn..98.970388: dwc3_gadget_ep_cmd: ep4in: cmd 
'Set Endpoint Transfer Resource' [402] params 0001   --> 
status: Successful
 uvc-gadget.sh-241   [000] dn..98.970391: dwc3_gadget_ep_cmd: ep5out: cmd 
'Set Endpoint Transfer Resource' [402] params 0001   --> 
status: Successful
 uvc-gadget.sh-241   [000] dn..98.970394: dwc3_gadget_ep_cmd: ep5in: cmd 
'Set Endpoint Transfer Resource' [402] params 0001   --> 
status: Successful
 uvc-gadget.sh-241   [000] dn..98.970398: dwc3_gadget_ep_cmd: ep6out: cmd 
'Set Endpoint Transfer Resource' [402] params 0001   --> 
status: Successful
 uvc-gadget.sh-241   [000] dn..98.970401: dwc3_gadget_ep_cmd: ep6in: cmd 
'Set Endpoint Transfer Resource' [402]

Re: how to test g_webcam

2019-10-14 Thread Felipe Balbi


Hi,

Roger Quadros  writes:
>>> I'm having a hard time to figure out how to get g_webcam working with
>>> the tip of http://git.ideasonboard.org/uvc-gadget.git
>>>
>>> Platform I'm using is dra7-evm with dwc3 controller.
>> 
>> which arguments are you passing to g_webcam?
>
> I've tried a couple of things
>
> modprobe g_webcam streaming_maxpacket=1024
>
> modprobe g_webcam streaming_maxpacket=3072 streaming_maxburst=9
>
> but nothing worked.
>
>
> I managed to get things working on am335x-bone (musb) using the
> uvc-gadget.sh script provided at http://git.ideasonboard.org/uvc-gadget.git
> which uses configfs.
>
> It seems to use "streaming_maxpacket=1024".
>
>> setting commit control, length = 26
>> Setting format to 0x56595559 1280x720
>> === Setting frame rate to 15 fps
>> Starting video stream.
>
>
> am335x-bone does work with g_webcam (streaming_maxpacket=1024) however, 
> notice fps below
>
>> setting commit control, length = 26
>> Setting format to 0x56595559 1280x720
>> === Setting frame rate to 0 fps
>> Starting video stream.
>
> using uvc-gadget.sh with dwc3 fails like so
>
>> root@lta0400828a:~# ./uvc-gadget.sh start
>> Detecting platform:
>>   board : TI DRA742
>>   udc   : 4889.usb
>> Creating the USB gadget
>> Creating gadget directory g1
>> OK
>> Setting Vendor and Product ID's
>> OK
>> Setting English strings
>> OK
>> Creating Config
>> Creating functions...
>> Creating UVC gadget functionality : uvc.0
>> OK
>> [   20.165439] configfs-gadget gadget: uvc: uvc_function_bind()
>> Binding USB Device Controller
>> [   20.171431] configfs-gadget 4889.usb: failed to start g1: -19

fair enough. Let's get dwc3 tracepoints to try and figure this out. -19
is ENODEV, btw. That's weird.

> dwc3 trace is below.

oh, you already did :-)

> # tracer: nop
> #
> # entries-in-buffer/entries-written: 830/830   #P:2
> #
> #  _-=> irqs-off
> # / _=> need-resched
> #| / _---=> hardirq/softirq
> #|| / _--=> preempt-depth
> #||| / delay
> #   TASK-PID   CPU#  TIMESTAMP  FUNCTION
> #  | |   |      | |
> uvc-gadget.sh-241   [000] 98.963663: dwc3_alloc_request: ep0out: 
> req b52ce5b9 length 0/0 zsI ==> 0
> uvc-gadget.sh-241   [000] 98.969442: dwc3_alloc_request: ep0out: 
> req 2e97646a length 0/0 zsI ==> 0
> uvc-gadget.sh-241   [000] dn..98.970354: dwc3_gadget_ep_cmd: ep0out: 
> cmd 'Start New Configuration' [409] params    --> 
> status: Successful
> uvc-gadget.sh-241   [000] dn..98.970359: dwc3_gadget_ep_cmd: ep0out: 
> cmd 'Set Endpoint Transfer Resource' [402] params 0001   
> --> status: Successful
> uvc-gadget.sh-241   [000] dn..98.970362: dwc3_gadget_ep_cmd: ep0in: 
> cmd 'Set Endpoint Transfer Resource' [402] params 0001   
> --> status: Successful
> uvc-gadget.sh-241   [000] dn..98.970366: dwc3_gadget_ep_cmd: ep1out: 
> cmd 'Set Endpoint Transfer Resource' [402] params 0001   
> --> status: Successful
> uvc-gadget.sh-241   [000] dn..98.970369: dwc3_gadget_ep_cmd: ep1in: 
> cmd 'Set Endpoint Transfer Resource' [402] params 0001   
> --> status: Successful
> uvc-gadget.sh-241   [000] dn..98.970372: dwc3_gadget_ep_cmd: ep2out: 
> cmd 'Set Endpoint Transfer Resource' [402] params 0001   
> --> status: Successful
> uvc-gadget.sh-241   [000] dn..98.970375: dwc3_gadget_ep_cmd: ep2in: 
> cmd 'Set Endpoint Transfer Resource' [402] params 0001   
> --> status: Successful
> uvc-gadget.sh-241   [000] dn..98.970379: dwc3_gadget_ep_cmd: ep3out: 
> cmd 'Set Endpoint Transfer Resource' [402] params 0001   
> --> status: Successful
> uvc-gadget.sh-241   [000] dn..98.970382: dwc3_gadget_ep_cmd: ep3in: 
> cmd 'Set Endpoint Transfer Resource' [402] params 0001   
> --> status: Successful
> uvc-gadget.sh-241   [000] dn..98.970385: dwc3_gadget_ep_cmd: ep4out: 
> cmd 'Set Endpoint Transfer Resource' [402] params 0001   
> --> status: Successful
> uvc-gadget.sh-241   [000] dn..98.970388: dwc3_gadget_ep_cmd: ep4in: 
> cmd 'Set Endpoint Transfer Resource' [402] params 0001   
> --> status: Successful
> uvc-gadget.sh-241   [000] dn..98.970391: dwc3_gadget_ep_cmd: ep5out: 
> cmd 'Set Endpoint Transfer Resource' [402] params 0001   
> --> status: Successful
> uvc-gadget.sh-241   [000] dn..98.970394: dwc3_gadget_ep_cmd: ep5in: 
> cmd 'Set Endpoint Transfer Resource' [402] params 0001   
> --> status: Successful
> uvc-gadget.sh-241   [000] dn..98.970398: dwc3_gadget_ep_cmd: ep6out: 
> cmd 'Set Endpoint Transfer Resource' [402] params

Re: how to test g_webcam

2019-10-14 Thread Roger Quadros

+Bin

Hi,

On 11/10/2019 16:06, Felipe Balbi wrote:


Hi,

Roger Quadros  writes:


Hi,

I'm having a hard time to figure out how to get g_webcam working with
the tip of http://git.ideasonboard.org/uvc-gadget.git

Platform I'm using is dra7-evm with dwc3 controller.


which arguments are you passing to g_webcam?


I've tried a couple of things

modprobe g_webcam streaming_maxpacket=1024

modprobe g_webcam streaming_maxpacket=3072 streaming_maxburst=9

but nothing worked.


I managed to get things working on am335x-bone (musb) using the
uvc-gadget.sh script provided at http://git.ideasonboard.org/uvc-gadget.git
which uses configfs.

It seems to use "streaming_maxpacket=1024".


setting commit control, length = 26
Setting format to 0x56595559 1280x720
=== Setting frame rate to 15 fps
Starting video stream.



am335x-bone does work with g_webcam (streaming_maxpacket=1024) however, notice 
fps below


setting commit control, length = 26
Setting format to 0x56595559 1280x720
=== Setting frame rate to 0 fps
Starting video stream.


using uvc-gadget.sh with dwc3 fails like so


root@lta0400828a:~# ./uvc-gadget.sh start
Detecting platform:
  board : TI DRA742
  udc   : 4889.usb
Creating the USB gadget
Creating gadget directory g1
OK
Setting Vendor and Product ID's
OK
Setting English strings
OK
Creating Config
Creating functions...
Creating UVC gadget functionality : uvc.0
OK
[   20.165439] configfs-gadget gadget: uvc: uvc_function_bind()
Binding USB Device Controller
[   20.171431] configfs-gadget 4889.usb: failed to start g1: -19
./uvc-gadget.sh: 213: echo: echo: I/O error



If I limit dwc3 controller to high-speed using DT property then it goes further
but still doesn't work. i.e. I don't see any video on the Host.

root@lta0400828a:~# /usr/src/uvc-gadget/build/uvc-gadget -c /dev/video0
[  172.749851] usb 1-1: reset high-speed USB device number 2 using xhci-hcd
Device /dev/video0 opened: UVC Camera (046d:0825) (usb-xhci-hcd.0.auto-1).
Device /dev/video2 opened: dwc3-gadget (gadget).
[  173.687713] configfs-gadget gadget: high-speed config #1: c
[  173.693320] configfs-gadget gadget: uvc: uvc_function_set_alt(0, 0)
[  173.699613] configfs-gadget gadget: uvc: reset UVC Control
[  173.705141] configfs-gadget gadget: uvc: uvc_function_set_alt(1, 0)
bRequestType a1 bRequest 86 wValue 0200 wIndex 0100 wLength 0001[  173.713306] 
configfs-gadget gadget: uvc: uvc_function_set_alt(1, 0)

control request (req 86 cs 02)
bRequestType a1 bRequest 81 wValue 0200 wIndex  wLength 0001
control request (req 81 cs 02)
bRequestType a1 bRequest 86 wValue 0200 wIndex 0200 wLength 0001
control request (req 86 cs 02)
bRequestType a1 bRequest 81 wValue 0200 wIndex  wLength 0001
control request (req 81 cs 02)
bRequestType a1 bRequest 87 wValue 0100 wIndex 0001 wLength 001a
streaming request (req 87 cs 01)
bRequestType 21 bRequest 01 wValue 0100 wIndex 0001 wLength 001a
streaming request (req 01 cs 01)
setting probe control, length = 26
bRequestType a1 bRequest 81 wValue 0100 wIndex 0001 wLength 001a
streaming request (req 81 cs 01)
bRequestType a1 bRequest 87 wValue 0200 wIndex 0200 wLength 0002
control request (req 87 cs 02)
bRequestType a1 bRequest 81 wValue 0200 wIndex  wLength 0001
control request (req 81 cs 02)
bRequestType a1 bRequest 87 wValue 0200 wIndex 0200 wLength 0002
control request (req 87 cs 02)
bRequestType a1 bRequest 81 wValue 0200 wIndex  wLength 0001
control request (req 81 cs 02)
bRequestType a1 bRequest 87 wValue 0200 wIndex 0200 wLength 0002
control request (req 87 cs 02)
bRequestType a1 bRequest 81 wValue 0200 wIndex  wLength 0001
control request (req 81 cs 02)
bRequestType a1 bRequest 87 wValue 0200 wIndex 0200 wLength 0002
control request (req 87 cs 02)
bRequestType a1 bRequest 81 wValue 0200 wIndex  wLength 0001
control request (req 81 cs 02)
bRequestType a1 bRequest 87 wValue 0200 wIndex 0200 wLength 0002
control request (req 87 cs 02)
bRequestType a1 bRequest 81 wValue 0200 wIndex  wLength 0001
control request (req 81 cs 02)
bRequestType a1 bRequest 87 wValue 0200 wIndex 0200 wLength 0002
control request (req 87 cs 02)
bRequestType a1 bRequest 81 wValue 0200 wIndex  wLength 0001
control request (req 81 cs 02)
bRequestType a1 bRequest 87 wValue 0200 wIndex 0200 wLength 0002
control request (req 87 cs 02)
bRequestType a1 bRequest 81 wValue 0200 wIndex  wLength 0001
control request (req 81 cs 02)
bRequestType a1 bRequest 87 wValue 0200 wIndex 0200 wLength 0002
control request (req 87 cs 02)
bRequestType a1 bRequest 81 wValue 0200 wIndex  wLength 0001
control request (req 81 cs 02)
bRequestType a1 bRequest 87 wValue 0200 wIndex 0200 wLength 0002
control request (req 87 cs 02)
bRequestType a1 bRequest 81 wV[  185.108699] configfs-gadget gadget: uvc: 
uvc_function_set_alt(1, 1)
[  185.119467] configfs-gadget gadget: uvc: reset UVC
alue 0200 wIndex  wLength 0001
control request (req 81 cs 02)
bRequestType 21 bRequest 01 wValue 0100 wIndex 0001 wLength 001

Re: how to test g_webcam

2019-10-11 Thread Felipe Balbi


Hi,

Roger Quadros  writes:

> Hi,
>
> I'm having a hard time to figure out how to get g_webcam working with
> the tip of http://git.ideasonboard.org/uvc-gadget.git
>
> Platform I'm using is dra7-evm with dwc3 controller.

which arguments are you passing to g_webcam?


> What platform was g_webcam and uvc-gadget last tested with?

I think we went through this a while back, but the problem back then was
related to bad arguments being passed to g_webcam. You should still be
able to find our discussion on linux-usb.

-- 
balbi