usb: gadget: uvc: configfs: Add bFrameIndex attributes
PATCH v7 1/1 usb: gadget: uvc: configfs: Add bFrameIndex attributes
Quoted 12 lines · Laurent Pinchart
From: Joel Pepper <[email protected]>
- Add bFrameIndex as a
UVCG_FRAME_ATTR_ROfor each frame size.
- Automatically assign ascending bFrameIndex to each frame in a format.Before all "bFrameindex" attributes were set to "1" with no way to configure the gadget otherwise. This resulted in the host always negotiating for bFrameIndex 1 (i.e. the first framesize of the gadget). After the negotiation the host driver will set the user or application selected framesize, while the gadget is actually set to the first framesize.
Quoted 8 lines
Now, when the containing format is linked into the streaming header, iterate over all child frame descriptors and assign ascending indices. The automatically assigned indices can be read from the new read only bFrameIndex configsfs attribute in each frame descriptor item.
Signed-off-by Joel Pepper <[email protected]>[Simplified documentation, renamed function, blank space update]Signed-off-by Laurent Pinchart <[email protected]>
please rebase on testing/next, but give me a couple hours to go through the rest of my inbox first ;)
checking file Documentation/ABI/testing/configfs-usb-gadget-uvc Hunk #1 succeeded at 177 (offset -4 lines).
Hunk #2 succeeded at 228 (offset -8 lines).
checking file drivers/usb/gadget/function/uvc_configfs.c Hunk #1 succeeded at 720 (offset -121 lines).
Hunk #2 succeeded at 757 (offset -133 lines).
Hunk #3 succeeded at 996 (offset -137 lines).
Hunk #4 succeeded at 1179 (offset -137 lines).
Hunk #5 FAILED at 1395.
1 out of 5 hunks FAILED