€•‹šŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ"/translations/zh_CN/usb/gadget_uvc”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/zh_TW/usb/gadget_uvc”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/it_IT/usb/gadget_uvc”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/ja_JP/usb/gadget_uvc”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/ko_KR/usb/gadget_uvc”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/pt_BR/usb/gadget_uvc”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/sp_SP/usb/gadget_uvc”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒLinux UVC Gadget Driver”h]”hŒLinux UVC Gadget Driver”…””}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³Œ WIDTH=$1 HEIGHT=$2 FORMAT=$3 NAME=$4 wdir=$FUNCTION/streaming/$FORMAT/$NAME/${HEIGHT}p mkdir -p $wdir echo $WIDTH > $wdir/wWidth echo $HEIGHT > $wdir/wHeight echo $(( $WIDTH * $HEIGHT * 2 )) > $wdir/dwMaxVideoFrameBufferSize cat < $wdir/dwFrameInterval 666666 100000 5000000 EOF } create_frame 1280 720 mjpeg mjpeg create_frame 1920 1080 mjpeg mjpeg create_frame 1280 720 uncompressed yuyv create_frame 1920 1080 uncompressed yuyv”h]”hXpcreate_frame() { # Example usage: # create_frame WIDTH=$1 HEIGHT=$2 FORMAT=$3 NAME=$4 wdir=$FUNCTION/streaming/$FORMAT/$NAME/${HEIGHT}p mkdir -p $wdir echo $WIDTH > $wdir/wWidth echo $HEIGHT > $wdir/wHeight echo $(( $WIDTH * $HEIGHT * 2 )) > $wdir/dwMaxVideoFrameBufferSize cat < $wdir/dwFrameInterval 666666 100000 5000000 EOF } create_frame 1280 720 mjpeg mjpeg create_frame 1920 1080 mjpeg mjpeg create_frame 1280 720 uncompressed yuyv create_frame 1920 1080 uncompressed yuyv”…””}”hjpsbah}”(h]”h ]”h"]”h$]”h&]”jjj‰j Œbash”j }”uh1jöh³hÊh´Kchjh²hubhÝ)”}”(hŒ‹The only uncompressed format currently supported is YUYV, which is detailed at Documentation/userspace-api/media/v4l/pixfmt-packed-yuv.rst.”h]”hŒ‹The only uncompressed format currently supported is YUYV, which is detailed at Documentation/userspace-api/media/v4l/pixfmt-packed-yuv.rst.”…””}”(hj€h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K€hjh²hubeh}”(h]”Œformats-and-frames”ah ]”h"]”Œformats and frames”ah$]”h&]”uh1hµhj]h²hh³hÊh´K9ubh¶)”}”(hhh]”(h»)”}”(hŒColor Matching Descriptors”h]”hŒColor Matching Descriptors”…””}”(hj™h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj–h²hh³hÊh´K„ubhÝ)”}”(hXIt's possible to specify some colometry information for each format you create. This step is optional, and default information will be included if this step is skipped; those default values follow those defined in the Color Matching Descriptor section of the UVC specification.”h]”hXIt’s possible to specify some colometry information for each format you create. This step is optional, and default information will be included if this step is skipped; those default values follow those defined in the Color Matching Descriptor section of the UVC specification.”…””}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K…hj–h²hubhÝ)”}”(hŒºTo create a Color Matching Descriptor, create a configfs item and set its three attributes to your desired settings and then link to it from the format you wish it to be associated with:”h]”hŒºTo create a Color Matching Descriptor, create a configfs item and set its three attributes to your desired settings and then link to it from the format you wish it to be associated with:”…””}”(hjµh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KŠhj–h²hubj÷)”}”(hX‹# Create a new Color Matching Descriptor mkdir $FUNCTION/streaming/color_matching/yuyv pushd $FUNCTION/streaming/color_matching/yuyv echo 1 > bColorPrimaries echo 1 > bTransferCharacteristics echo 4 > bMatrixCoefficients popd # Create a symlink to the Color Matching Descriptor from the format's config item ln -s $FUNCTION/streaming/color_matching/yuyv $FUNCTION/streaming/uncompressed/yuyv”h]”hX‹# Create a new Color Matching Descriptor mkdir $FUNCTION/streaming/color_matching/yuyv pushd $FUNCTION/streaming/color_matching/yuyv echo 1 > bColorPrimaries echo 1 > bTransferCharacteristics echo 4 > bMatrixCoefficients popd # Create a symlink to the Color Matching Descriptor from the format's config item ln -s $FUNCTION/streaming/color_matching/yuyv $FUNCTION/streaming/uncompressed/yuyv”…””}”hjÃsbah}”(h]”h ]”h"]”h$]”h&]”jjj‰j Œbash”j }”uh1jöh³hÊh´KŽhj–h²hubhÝ)”}”(hX™For details about the valid values, consult the UVC specification. Note that a default color matching descriptor exists and is used by any format which does not have a link to a different Color Matching Descriptor. It's possible to change the attribute settings for the default descriptor, so bear in mind that if you do that you are altering the defaults for any format that does not link to a different one.”h]”hX›For details about the valid values, consult the UVC specification. Note that a default color matching descriptor exists and is used by any format which does not have a link to a different Color Matching Descriptor. It’s possible to change the attribute settings for the default descriptor, so bear in mind that if you do that you are altering the defaults for any format that does not link to a different one.”…””}”(hjÓh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kžhj–h²hubeh}”(h]”Œcolor-matching-descriptors”ah ]”h"]”Œcolor matching descriptors”ah$]”h&]”uh1hµhj]h²hh³hÊh´K„ubh¶)”}”(hhh]”(h»)”}”(hŒHeader linking”h]”hŒHeader linking”…””}”(hjìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjéh²hh³hÊh´K§ubhÝ)”}”(hX}The UVC specification requires that Format and Frame descriptors be preceded by Headers detailing things such as the number and cumulative size of the different Format descriptors that follow. This and similar operations are achieved in configfs by linking between the configfs item representing the header and the config items representing those other descriptors, in this manner:”h]”hX}The UVC specification requires that Format and Frame descriptors be preceded by Headers detailing things such as the number and cumulative size of the different Format descriptors that follow. This and similar operations are achieved in configfs by linking between the configfs item representing the header and the config items representing those other descriptors, in this manner:”…””}”(hjúh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´K©hjéh²hubj÷)”}”(hXKmkdir $FUNCTION/streaming/header/h # This section links the format descriptors and their associated frames # to the header cd $FUNCTION/streaming/header/h ln -s ../../uncompressed/yuyv ln -s ../../mjpeg/mjpeg # This section ensures that the header will be transmitted for each # speed's set of descriptors. If support for a particular speed is not # needed then it can be skipped here. cd ../../class/fs ln -s ../../header/h cd ../../class/hs ln -s ../../header/h cd ../../class/ss ln -s ../../header/h cd ../../../control mkdir header/h ln -s header/h class/fs ln -s header/h class/ss”h]”hXKmkdir $FUNCTION/streaming/header/h # This section links the format descriptors and their associated frames # to the header cd $FUNCTION/streaming/header/h ln -s ../../uncompressed/yuyv ln -s ../../mjpeg/mjpeg # This section ensures that the header will be transmitted for each # speed's set of descriptors. If support for a particular speed is not # needed then it can be skipped here. cd ../../class/fs ln -s ../../header/h cd ../../class/hs ln -s ../../header/h cd ../../class/ss ln -s ../../header/h cd ../../../control mkdir header/h ln -s header/h class/fs ln -s header/h class/ss”…””}”hjsbah}”(h]”h ]”h"]”h$]”h&]”jjj‰j Œbash”j }”uh1jöh³hÊh´K¯hjéh²hubeh}”(h]”Œheader-linking”ah ]”h"]”Œheader linking”ah$]”h&]”uh1hµhj]h²hh³hÊh´K§ubh¶)”}”(hhh]”(h»)”}”(hŒExtension Unit Support”h]”hŒExtension Unit Support”…””}”(hj#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj h²hh³hÊh´KÉubhÝ)”}”(hX|A UVC Extension Unit (XU) basically provides a distinct unit to which control set and get requests can be addressed. The meaning of those control requests is entirely implementation dependent, but may be used to control settings outside of the UVC specification (for example enabling or disabling video effects). An XU can be inserted into the UVC unit chain or left free-hanging.”h]”hX|A UVC Extension Unit (XU) basically provides a distinct unit to which control set and get requests can be addressed. The meaning of those control requests is entirely implementation dependent, but may be used to control settings outside of the UVC specification (for example enabling or disabling video effects). An XU can be inserted into the UVC unit chain or left free-hanging.”…””}”(hj1h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KËhj h²hubhÝ)”}”(hŒˆConfiguring an extension unit involves creating an entry in the appropriate directory and setting its attributes appropriately, like so:”h]”hŒˆConfiguring an extension unit involves creating an entry in the appropriate directory and setting its attributes appropriately, like so:”…””}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´KÑhj h²hubj÷)”}”(hX2mkdir $FUNCTION/control/extensions/xu.0 pushd $FUNCTION/control/extensions/xu.0 # Set the bUnitID of the Processing Unit as the source for this # Extension Unit echo 2 > baSourceID # Set this XU as the source of the default output terminal. This inserts # the XU into the UVC chain between the PU and OT such that the final # chain is IT > PU > XU.0 > OT cat bUnitID > ../../terminal/output/default/baSourceID # Flag some controls as being available for use. The bmControl field is # a bitmap with each bit denoting the availability of a particular # control. For example to flag the 0th, 2nd and 3rd controls available: echo 0x0d > bmControls # Set the GUID; this is a vendor-specific code identifying the XU. echo -e -n "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10" > guidExtensionCode popd”h]”hX2mkdir $FUNCTION/control/extensions/xu.0 pushd $FUNCTION/control/extensions/xu.0 # Set the bUnitID of the Processing Unit as the source for this # Extension Unit echo 2 > baSourceID # Set this XU as the source of the default output terminal. This inserts # the XU into the UVC chain between the PU and OT such that the final # chain is IT > PU > XU.0 > OT cat bUnitID > ../../terminal/output/default/baSourceID # Flag some controls as being available for use. The bmControl field is # a bitmap with each bit denoting the availability of a particular # control. For example to flag the 0th, 2nd and 3rd controls available: echo 0x0d > bmControls # Set the GUID; this is a vendor-specific code identifying the XU. echo -e -n "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10" > guidExtensionCode popd”…””}”hjMsbah}”(h]”h ]”h"]”h$]”h&]”jjj‰j Œbash”j }”uh1jöh³hÊh´KÔhj h²hubhÝ)”}”(hX The bmControls attribute and the baSourceID attribute are multi-value attributes. This means that you may write multiple newline separated values to them. For example to flag the 1st, 2nd, 9th and 10th controls as being available you would need to write two values to bmControls, like so:”h]”hX The bmControls attribute and the baSourceID attribute are multi-value attributes. This means that you may write multiple newline separated values to them. For example to flag the 1st, 2nd, 9th and 10th controls as being available you would need to write two values to bmControls, like so:”…””}”(hj]h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kìhj h²hubj÷)”}”(hŒ%cat << EOF > bmControls 0x03 0x03 EOF”h]”hŒ%cat << EOF > bmControls 0x03 0x03 EOF”…””}”hjksbah}”(h]”h ]”h"]”h$]”h&]”jjj‰j Œbash”j }”uh1jöh³hÊh´Kñhj h²hubhÝ)”}”(hŒThe multi-value nature of the baSourceID attribute belies the fact that XUs can be multiple-input, though note that this currently has no significant effect.”h]”hŒThe multi-value nature of the baSourceID attribute belies the fact that XUs can be multiple-input, though note that this currently has no significant effect.”…””}”(hj{h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Køhj h²hubhÝ)”}”(hXœThe bControlSize attribute reflects the size of the bmControls attribute, and similarly bNrInPins reflects the size of the baSourceID attributes. Both attributes are automatically increased / decreased as you set bmControls and baSourceID. It is also possible to manually increase or decrease bControlSize which has the effect of truncating entries to the new size, or padding entries out with 0x00, for example:”h]”hXœThe bControlSize attribute reflects the size of the bmControls attribute, and similarly bNrInPins reflects the size of the baSourceID attributes. Both attributes are automatically increased / decreased as you set bmControls and baSourceID. It is also possible to manually increase or decrease bControlSize which has the effect of truncating entries to the new size, or padding entries out with 0x00, for example:”…””}”(hj‰h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Kûhj h²hubj÷)”}”(hŒ“$ cat bmControls 0x03 0x05 $ cat bControlSize 2 $ echo 1 > bControlSize $ cat bmControls 0x03 $ echo 2 > bControlSize $ cat bmControls 0x03 0x00”h]”hŒ“$ cat bmControls 0x03 0x05 $ cat bControlSize 2 $ echo 1 > bControlSize $ cat bmControls 0x03 $ echo 2 > bControlSize $ cat bmControls 0x03 0x00”…””}”hj—sbah}”(h]”h ]”h"]”h$]”h&]”jjuh1jöh³hÊh´Mhj h²hubhÝ)”}”(hŒ2bNrInPins and baSourceID function in the same way.”h]”hŒ2bNrInPins and baSourceID function in the same way.”…””}”(hj¥h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhj h²hubeh}”(h]”Œextension-unit-support”ah ]”h"]”Œextension unit support”ah$]”h&]”uh1hµhj]h²hh³hÊh´KÉubh¶)”}”(hhh]”(h»)”}”(hŒFConfiguring Supported Controls for Camera Terminal and Processing Unit”h]”hŒFConfiguring Supported Controls for Camera Terminal and Processing Unit”…””}”(hj¾h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj»h²hh³hÊh´MubhÝ)”}”(hX}The Camera Terminal and Processing Units in the UVC chain also have bmControls attributes which function similarly to the same field in an Extension Unit. Unlike XUs however, the meaning of the bitflag for these units is defined in the UVC specification; you should consult the "Camera Terminal Descriptor" and "Processing Unit Descriptor" sections for an enumeration of the flags.”h]”hX…The Camera Terminal and Processing Units in the UVC chain also have bmControls attributes which function similarly to the same field in an Extension Unit. Unlike XUs however, the meaning of the bitflag for these units is defined in the UVC specification; you should consult the “Camera Terminal Descriptor†and “Processing Unit Descriptor†sections for an enumeration of the flags.”…””}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mhj»h²hubj÷)”}”(hXP# Set the Processing Unit's bmControls, flagging Brightness, Contrast # and Hue as available controls: echo 0x05 > $FUNCTION/control/processing/default/bmControls # Set the Camera Terminal's bmControls, flagging Focus Absolute and # Focus Relative as available controls: echo 0x60 > $FUNCTION/control/terminal/camera/default/bmControls”h]”hXP# Set the Processing Unit's bmControls, flagging Brightness, Contrast # and Hue as available controls: echo 0x05 > $FUNCTION/control/processing/default/bmControls # Set the Camera Terminal's bmControls, flagging Focus Absolute and # Focus Relative as available controls: echo 0x60 > $FUNCTION/control/terminal/camera/default/bmControls”…””}”hjÚsbah}”(h]”h ]”h"]”h$]”h&]”jjj‰j Œbash”j }”uh1jöh³hÊh´Mhj»h²hubhÝ)”}”(hŒòIf you do not set these fields then by default the Auto-Exposure Mode control for the Camera Terminal and the Brightness control for the Processing Unit will be flagged as available; if they are not supported you should set the field to 0x00.”h]”hŒòIf you do not set these fields then by default the Auto-Exposure Mode control for the Camera Terminal and the Brightness control for the Processing Unit will be flagged as available; if they are not supported you should set the field to 0x00.”…””}”(hjêh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M)hj»h²hubhÝ)”}”(hŒ«Note that the size of the bmControls field for a Camera Terminal or Processing Unit is fixed by the UVC specification, and so the bControlSize attribute is read-only here.”h]”hŒ«Note that the size of the bmControls field for a Camera Terminal or Processing Unit is fixed by the UVC specification, and so the bControlSize attribute is read-only here.”…””}”(hjøh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M.hj»h²hubeh}”(h]”ŒFconfiguring-supported-controls-for-camera-terminal-and-processing-unit”ah ]”h"]”ŒFconfiguring supported controls for camera terminal and processing unit”ah$]”h&]”uh1hµhj]h²hh³hÊh´Mubh¶)”}”(hhh]”(h»)”}”(hŒCustom Strings Support”h]”hŒCustom Strings Support”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´M3ubhÝ)”}”(hXString descriptors that provide a textual description for various parts of a USB device can be defined in the usual place within USB configfs, and may then be linked to from the UVC function root or from Extension Unit directories to assign those strings as descriptors:”h]”hXString descriptors that provide a textual description for various parts of a USB device can be defined in the usual place within USB configfs, and may then be linked to from the UVC function root or from Extension Unit directories to assign those strings as descriptors:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M5hjh²hubj÷)”}”(hXN# Create a string descriptor in us-EN and link to it from the function # root. The name of the link is significant here, as it declares this # descriptor to be intended for the Interface Association Descriptor. # Other significant link names at function root are vs0_desc and vs1_desc # For the VideoStreaming Interface 0/1 Descriptors. mkdir -p $GADGET/strings/0x409/iad_desc echo -n "Interface Associaton Descriptor" > $GADGET/strings/0x409/iad_desc/s ln -s $GADGET/strings/0x409/iad_desc $FUNCTION/iad_desc # Because the link to a String Descriptor from an Extension Unit clearly # associates the two, the name of this link is not significant and may # be set freely. mkdir -p $GADGET/strings/0x409/xu.0 echo -n "A Very Useful Extension Unit" > $GADGET/strings/0x409/xu.0/s ln -s $GADGET/strings/0x409/xu.0 $FUNCTION/control/extensions/xu.0”h]”hXN# Create a string descriptor in us-EN and link to it from the function # root. The name of the link is significant here, as it declares this # descriptor to be intended for the Interface Association Descriptor. # Other significant link names at function root are vs0_desc and vs1_desc # For the VideoStreaming Interface 0/1 Descriptors. mkdir -p $GADGET/strings/0x409/iad_desc echo -n "Interface Associaton Descriptor" > $GADGET/strings/0x409/iad_desc/s ln -s $GADGET/strings/0x409/iad_desc $FUNCTION/iad_desc # Because the link to a String Descriptor from an Extension Unit clearly # associates the two, the name of this link is not significant and may # be set freely. mkdir -p $GADGET/strings/0x409/xu.0 echo -n "A Very Useful Extension Unit" > $GADGET/strings/0x409/xu.0/s ln -s $GADGET/strings/0x409/xu.0 $FUNCTION/control/extensions/xu.0”…””}”hj-sbah}”(h]”h ]”h"]”h$]”h&]”jjj‰j Œbash”j }”uh1jöh³hÊh´M:hjh²hubeh}”(h]”Œcustom-strings-support”ah ]”h"]”Œcustom strings support”ah$]”h&]”uh1hµhj]h²hh³hÊh´M3ubh¶)”}”(hhh]”(h»)”}”(hŒThe interrupt endpoint”h]”hŒThe interrupt endpoint”…””}”(hjHh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjEh²hh³hÊh´MOubhÝ)”}”(hX·The VideoControl interface has an optional interrupt endpoint which is by default disabled. This is intended to support delayed response control set requests for UVC (which should respond through the interrupt endpoint rather than tying up endpoint 0). At present support for sending data through this endpoint is missing and so it is left disabled to avoid confusion. If you wish to enable it you can do so through the configfs attribute:”h]”hX·The VideoControl interface has an optional interrupt endpoint which is by default disabled. This is intended to support delayed response control set requests for UVC (which should respond through the interrupt endpoint rather than tying up endpoint 0). At present support for sending data through this endpoint is missing and so it is left disabled to avoid confusion. If you wish to enable it you can do so through the configfs attribute:”…””}”(hjVh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´MQhjEh²hubj÷)”}”(hŒ.echo 1 > $FUNCTION/control/enable_interrupt_ep”h]”hŒ.echo 1 > $FUNCTION/control/enable_interrupt_ep”…””}”hjdsbah}”(h]”h ]”h"]”h$]”h&]”jjj‰j Œbash”j }”uh1jöh³hÊh´MXhjEh²hubeh}”(h]”Œthe-interrupt-endpoint”ah ]”h"]”Œthe interrupt endpoint”ah$]”h&]”uh1hµhj]h²hh³hÊh´MOubh¶)”}”(hhh]”(h»)”}”(hŒBandwidth configuration”h]”hŒBandwidth configuration”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj|h²hh³hÊh´M]ubhÝ)”}”(hŒ‹There are three attributes which control the bandwidth of the USB connection. These live in the function root and can be set within limits:”h]”hŒ‹There are three attributes which control the bandwidth of the USB connection. These live in the function root and can be set within limits:”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´M_hj|h²hubj÷)”}”(hX<# streaming_interval sets bInterval. Values range from 1..255 echo 1 > $FUNCTION/streaming_interval # streaming_maxpacket sets wMaxPacketSize. Valid values are 1024/2048/3072 echo 3072 > $FUNCTION/streaming_maxpacket # streaming_maxburst sets bMaxBurst. Valid values are 1..15 echo 1 > $FUNCTION/streaming_maxburst”h]”hX<# streaming_interval sets bInterval. Values range from 1..255 echo 1 > $FUNCTION/streaming_interval # streaming_maxpacket sets wMaxPacketSize. Valid values are 1024/2048/3072 echo 3072 > $FUNCTION/streaming_maxpacket # streaming_maxburst sets bMaxBurst. Valid values are 1..15 echo 1 > $FUNCTION/streaming_maxburst”…””}”hj›sbah}”(h]”h ]”h"]”h$]”h&]”jjj‰j Œbash”j }”uh1jöh³hÊh´Mbhj|h²hubhÝ)”}”(hXThe values passed here will be clamped to valid values according to the UVC specification (which depend on the speed of the USB connection). To understand how the settings influence bandwidth you should consult the UVC specifications, but a rule of thumb is that increasing the streaming_maxpacket setting will improve bandwidth (and thus the maximum possible framerate), whilst the same is true for streaming_maxburst provided the USB connection is running at SuperSpeed. Increasing streaming_interval will reduce bandwidth and framerate.”h]”hXThe values passed here will be clamped to valid values according to the UVC specification (which depend on the speed of the USB connection). To understand how the settings influence bandwidth you should consult the UVC specifications, but a rule of thumb is that increasing the streaming_maxpacket setting will improve bandwidth (and thus the maximum possible framerate), whilst the same is true for streaming_maxburst provided the USB connection is running at SuperSpeed. Increasing streaming_interval will reduce bandwidth and framerate.”…””}”(hj«h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´Mnhj|h²hubeh}”(h]”Œbandwidth-configuration”ah ]”h"]”Œbandwidth configuration”ah$]”h&]”uh1hµhj]h²hh³hÊh´M]ubeh}”(h]”Œ'configuring-the-gadget-through-configfs”ah ]”h"]”Œ'configuring the gadget through configfs”ah$]”h&]”uh1hµhh·h²hh³hÊh´Kubh¶)”}”(hhh]”(h»)”}”(hŒThe userspace application”h]”hŒThe userspace application”…””}”(hjÌh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÉh²hh³hÊh´MwubhÝ)”}”(hX§By itself, the UVC Gadget driver cannot do anything particularly interesting. It must be paired with a userspace program that responds to UVC control requests and fills buffers to be queued to the V4L2 device that the driver creates. How those things are achieved is implementation dependent and beyond the scope of this document, but a reference application can be found at https://gitlab.freedesktop.org/camera/uvc-gadget”h]”(hXwBy itself, the UVC Gadget driver cannot do anything particularly interesting. It must be paired with a userspace program that responds to UVC control requests and fills buffers to be queued to the V4L2 device that the driver creates. How those things are achieved is implementation dependent and beyond the scope of this document, but a reference application can be found at ”…””}”(hjÚh²hh³Nh´NubhŒ reference”“”)”}”(hŒ0https://gitlab.freedesktop.org/camera/uvc-gadget”h]”hŒ0https://gitlab.freedesktop.org/camera/uvc-gadget”…””}”(hjäh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”Œrefuri”jæuh1jâhjÚubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÜh³hÊh´MxhjÉh²hubeh}”(h]”Œthe-userspace-application”ah ]”h"]”Œthe userspace application”ah$]”h&]”uh1hµhh·h²hh³hÊh´Mwubeh}”(h]”Œlinux-uvc-gadget-driver”ah ]”h"]”Œlinux uvc gadget driver”ah$]”h&]”uh1hµhhh²hh³hÊh´Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÊuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hºNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j,Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÊŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”(jjj3j0jZjWjÆjÃjÔjÑjjj“jjæjãjjj¸jµj jjBj?jyjvj¾j»jþjûuŒ nametypes”}”(j‰j3‰jZ‰jƉjÔ‰j‰j“‰jæ‰j‰j¸‰j ‰jB‰jy‰j¾‰jþ‰uh}”(jh·j0hËjWj6jÃj]jÑjŠjj×jjjãj–jjéjµj jj»j?jjvjEj»j|jûjÉuŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.