← Documents Documentation/ABI/testing/configfs-usb-gadget-uvc GitHub 원문 ↗

Linux 6.18.37 · ABI / testing

USB gadget UVC function configfs ABI

UVC gadget function의 endpoint 전송 조건, VideoControl descriptor topology, extension unit, VideoStreaming class·color matching·format·frame·header descriptor와 V4L2 function name sysfs attribute를 설명합니다.

Source pathDocumentation/ABI/testing/configfs-usb-gadget-uvc
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

Function directory와 control interface

configfs-usb-gadget-uvc:1-40

Function endpoint의 burst·packet·interval과 interface 이름을 설정하고, VideoControl interface number 및 interrupt endpoint 사용 여부와 speed별 class descriptor 연결 지점을 설명합니다.

Camera·output terminals와 processing unit

configfs-usb-gadget-uvc:42-114

Camera input terminal에서 processing unit을 거쳐 output terminal로 이어지는 VideoControl topology의 ID, 연결 관계, control bitmap과 focal length·digital magnification 속성을 설명합니다.

Extension unit와 control header

configfs-usb-gadget-uvc:116-155

Vendor-specific extension unit의 GUID, input pins, source IDs, control bitmap과 control header의 clock frequency 및 UVC version attributes를 설명합니다.

Streaming interface, class, color matching

configfs-usb-gadget-uvc:156-225

VideoStreaming interface number와 FS·HS·SS class descriptors, 기본 및 추가 color matching descriptor의 matrix·transfer·primary attributes를 설명합니다.

MJPEG format과 frame descriptors

configfs-usb-gadget-uvc:227-284

MJPEG format index, controls, interlace·aspect ratio·flags·default frame과 각 frame의 interval, buffer size, bitrate, dimensions, capabilities를 설명합니다.

Uncompressed format과 frame descriptors

configfs-usb-gadget-uvc:286-343

Uncompressed format의 bits per pixel과 GUID를 포함한 format descriptor 및 frame interval·buffer size·bitrate·dimensions·capabilities attributes를 설명합니다.

Frame-based format과 frame descriptors

configfs-usb-gadget-uvc:345-407

Frame-based format descriptor와 packed fixed-frame-size video의 stride alignment를 나타내는 dwBytesPerLine을 포함한 frame descriptor를 설명합니다.

Streaming header와 V4L2 function name

configfs-usb-gadget-uvc:409-438

Streaming header의 trigger·still capture·terminal link·interface capability attributes와 생성된 video4linux device에서 UVC configfs function instance 이름을 읽는 sysfs 경로를 설명합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 What: /config/usb-gadget/gadget/functions/uvc.name
2 Date: Dec 2014
3 KernelVersion: 4.0
4 Description: UVC function directory
5
6 =================== =============================
7 streaming_maxburst 0..15 (ss only)
8 streaming_maxpacket 1..1023 (fs), 1..3072 (hs/ss)
9 streaming_interval 1..16
10 function_name string [32]
11 =================== =============================
12
13 What: /config/usb-gadget/gadget/functions/uvc.name/control
14 Date: Dec 2014
15 KernelVersion: 4.0
16 Description: Control descriptors
17
18 All attributes read only except enable_interrupt_ep:
19
20 =================== =============================
21 bInterfaceNumber USB interface number for this
22 streaming interface
23 enable_interrupt_ep flag to enable the interrupt
24 endpoint for the VC interface
25 =================== =============================
26
27 What: /config/usb-gadget/gadget/functions/uvc.name/control/class
28 Date: Dec 2014
29 KernelVersion: 4.0
30 Description: Class descriptors
31
32 What: /config/usb-gadget/gadget/functions/uvc.name/control/class/ss
33 Date: Dec 2014
34 KernelVersion: 4.0
35 Description: Super speed control class descriptors
36
37 What: /config/usb-gadget/gadget/functions/uvc.name/control/class/fs
38 Date: Dec 2014
39 KernelVersion: 4.0
40 Description: Full speed control class descriptors
41
42 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal
43 Date: Dec 2014
44 KernelVersion: 4.0
45 Description: Terminal descriptors
46
47 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/output
48 Date: Dec 2014
49 KernelVersion: 4.0
50 Description: Output terminal descriptors
51
52 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/output/default
53 Date: Dec 2014
54 KernelVersion: 4.0
55 Description: Default output terminal descriptors
56
57 All attributes read only except bSourceID:
58
59 ============== =============================================
60 iTerminal index of string descriptor
61 bSourceID id of the terminal to which this terminal
62 is connected
63 bAssocTerminal id of the input terminal to which this output
64 terminal is associated
65 wTerminalType terminal type
66 bTerminalID a non-zero id of this terminal
67 ============== =============================================
68
69 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/camera
70 Date: Dec 2014
71 KernelVersion: 4.0
72 Description: Camera terminal descriptors
73
74 What: /config/usb-gadget/gadget/functions/uvc.name/control/terminal/camera/default
75 Date: Dec 2014
76 KernelVersion: 4.0
77 Description: Default camera terminal descriptors
78
79 All attributes read only except bmControls, which is read/write:
80
81 ======================== ====================================
82 bmControls bitmap specifying which controls are
83 supported for the video stream
84 wOcularFocalLength the value of Locular
85 wObjectiveFocalLengthMax the value of Lmin
86 wObjectiveFocalLengthMin the value of Lmax
87 iTerminal index of string descriptor
88 bAssocTerminal id of the output terminal to which
89 this terminal is connected
90 wTerminalType terminal type
91 bTerminalID a non-zero id of this terminal
92 ======================== ====================================
93
94 What: /config/usb-gadget/gadget/functions/uvc.name/control/processing
95 Date: Dec 2014
96 KernelVersion: 4.0
97 Description: Processing unit descriptors
98
99 What: /config/usb-gadget/gadget/functions/uvc.name/control/processing/default
100 Date: Dec 2014
101 KernelVersion: 4.0
102 Description: Default processing unit descriptors
103
104 All attributes read only except bmControls, which is read/write:
105
106 =============== ========================================
107 iProcessing index of string descriptor
108 bmControls bitmap specifying which controls are
109 supported for the video stream
110 wMaxMultiplier maximum digital magnification x100
111 bSourceID id of the terminal to which this unit is
112 connected
113 bUnitID a non-zero id of this unit
114 =============== ========================================
115
116 What: /config/usb-gadget/gadget/functions/uvc.name/control/extensions
117 Date: Nov 2022
118 KernelVersion: 6.1
119 Description: Extension unit descriptors
120
121 What: /config/usb-gadget/gadget/functions/uvc.name/control/extensions/name
122 Date: Nov 2022
123 KernelVersion: 6.1
124 Description: Extension Unit (XU) Descriptor
125
126 bLength, bUnitID and iExtension are read-only. All others are
127 read-write.
128
129 ================= ========================================
130 bLength size of the descriptor in bytes
131 bUnitID non-zero ID of this unit
132 guidExtensionCode Vendor-specific code identifying the XU
133 bNumControls number of controls in this XU
134 bNrInPins number of input pins for this unit
135 baSourceID list of the IDs of the units or terminals
136 to which this XU is connected
137 bControlSize size of the bmControls field in bytes
138 bmControls list of bitmaps detailing which vendor
139 specific controls are supported
140 iExtension index of a string descriptor that describes
141 this extension unit
142 ================= ========================================
143
144 What: /config/usb-gadget/gadget/functions/uvc.name/control/header
145 Date: Dec 2014
146 KernelVersion: 4.0
147 Description: Control header descriptors
148
149 What: /config/usb-gadget/gadget/functions/uvc.name/control/header/name
150 Date: Dec 2014
151 KernelVersion: 4.0
152 Description: Specific control header descriptors
153
154 dwClockFrequency
155 bcdUVC
156 What: /config/usb-gadget/gadget/functions/uvc.name/streaming
157 Date: Dec 2014
158 KernelVersion: 4.0
159 Description: Streaming descriptors
160
161 All attributes read only:
162
163 ================ =============================
164 bInterfaceNumber USB interface number for this
165 streaming interface
166 ================ =============================
167
168 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/class
169 Date: Dec 2014
170 KernelVersion: 4.0
171 Description: Streaming class descriptors
172
173 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/class/ss
174 Date: Dec 2014
175 KernelVersion: 4.0
176 Description: Super speed streaming class descriptors
177
178 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/class/hs
179 Date: Dec 2014
180 KernelVersion: 4.0
181 Description: High speed streaming class descriptors
182
183 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/class/fs
184 Date: Dec 2014
185 KernelVersion: 4.0
186 Description: Full speed streaming class descriptors
187
188 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/color_matching
189 Date: Dec 2014
190 KernelVersion: 4.0
191 Description: Color matching descriptors
192
193 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/color_matching/default
194 Date: Dec 2014
195 KernelVersion: 4.0
196 Description: Default color matching descriptors
197
198 All attributes read/write:
199
200 ======================== ======================================
201 bMatrixCoefficients matrix used to compute luma and
202 chroma values from the color primaries
203 bTransferCharacteristics optoelectronic transfer
204 characteristic of the source picture,
205 also called the gamma function
206 bColorPrimaries color primaries and the reference
207 white
208 ======================== ======================================
209
210 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/color_matching/name
211 Date: Dec 2022
212 KernelVersion: 6.3
213 Description: Additional color matching descriptors
214
215 All attributes read/write:
216
217 ======================== ======================================
218 bMatrixCoefficients matrix used to compute luma and
219 chroma values from the color primaries
220 bTransferCharacteristics optoelectronic transfer
221 characteristic of the source picture,
222 also called the gamma function
223 bColorPrimaries color primaries and the reference
224 white
225 ======================== ======================================
226
227 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/mjpeg
228 Date: Dec 2014
229 KernelVersion: 4.0
230 Description: MJPEG format descriptors
231
232 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/mjpeg/name
233 Date: Dec 2014
234 KernelVersion: 4.0
235 Description: Specific MJPEG format descriptors
236
237 All attributes read only,
238 except bmaControls and bDefaultFrameIndex:
239
240 =================== =====================================
241 bFormatIndex unique id for this format descriptor;
242 only defined after parent header is
243 linked into the streaming class;
244 read-only
245 bmaControls this format's data for bmaControls in
246 the streaming header
247 bmInterlaceFlags specifies interlace information,
248 read-only
249 bAspectRatioY the X dimension of the picture aspect
250 ratio, read-only
251 bAspectRatioX the Y dimension of the picture aspect
252 ratio, read-only
253 bmFlags characteristics of this format,
254 read-only
255 bDefaultFrameIndex optimum frame index for this stream
256 =================== =====================================
257
258 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/mjpeg/name/name
259 Date: Dec 2014
260 KernelVersion: 4.0
261 Description: Specific MJPEG frame descriptors
262
263 ========================= =====================================
264 bFrameIndex unique id for this framedescriptor;
265 only defined after parent format is
266 linked into the streaming header;
267 read-only
268 dwFrameInterval indicates how frame interval can be
269 programmed; a number of values
270 separated by newline can be specified
271 dwDefaultFrameInterval the frame interval the device would
272 like to use as default
273 dwMaxVideoFrameBufferSize the maximum number of bytes the
274 compressor will produce for a video
275 frame or still image
276 dwMaxBitRate the maximum bit rate at the shortest
277 frame interval in bps
278 dwMinBitRate the minimum bit rate at the longest
279 frame interval in bps
280 wHeight height of decoded bitmap frame in px
281 wWidth width of decoded bitmam frame in px
282 bmCapabilities still image support, fixed frame-rate
283 support
284 ========================= =====================================
285
286 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/uncompressed
287 Date: Dec 2014
288 KernelVersion: 4.0
289 Description: Uncompressed format descriptors
290
291 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/uncompressed/name
292 Date: Dec 2014
293 KernelVersion: 4.0
294 Description: Specific uncompressed format descriptors
295
296 ================== =======================================
297 bFormatIndex unique id for this format descriptor;
298 only defined after parent header is
299 linked into the streaming class;
300 read-only
301 bmaControls this format's data for bmaControls in
302 the streaming header
303 bmInterlaceFlags specifies interlace information,
304 read-only
305 bAspectRatioY the X dimension of the picture aspect
306 ratio, read-only
307 bAspectRatioX the Y dimension of the picture aspect
308 ratio, read-only
309 bDefaultFrameIndex optimum frame index for this stream
310 bBitsPerPixel number of bits per pixel used to
311 specify color in the decoded video
312 frame
313 guidFormat globally unique id used to identify
314 stream-encoding format
315 ================== =======================================
316
317 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/uncompressed/name/name
318 Date: Dec 2014
319 KernelVersion: 4.0
320 Description: Specific uncompressed frame descriptors
321
322 ========================= =====================================
323 bFrameIndex unique id for this framedescriptor;
324 only defined after parent format is
325 linked into the streaming header;
326 read-only
327 dwFrameInterval indicates how frame interval can be
328 programmed; a number of values
329 separated by newline can be specified
330 dwDefaultFrameInterval the frame interval the device would
331 like to use as default
332 dwMaxVideoFrameBufferSize the maximum number of bytes the
333 compressor will produce for a video
334 frame or still image
335 dwMaxBitRate the maximum bit rate at the shortest
336 frame interval in bps
337 dwMinBitRate the minimum bit rate at the longest
338 frame interval in bps
339 wHeight height of decoded bitmap frame in px
340 wWidth width of decoded bitmam frame in px
341 bmCapabilities still image support, fixed frame-rate
342 support
343 ========================= =====================================
344
345 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/framebased
346 Date: Sept 2024
347 KernelVersion: 5.15
348 Description: Framebased format descriptors
349
350 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/framebased/name
351 Date: Sept 2024
352 KernelVersion: 5.15
353 Description: Specific framebased format descriptors
354
355 ================== =======================================
356 bFormatIndex unique id for this format descriptor;
357 only defined after parent header is
358 linked into the streaming class;
359 read-only
360 bmaControls this format's data for bmaControls in
361 the streaming header
362 bmInterlaceFlags specifies interlace information,
363 read-only
364 bAspectRatioY the X dimension of the picture aspect
365 ratio, read-only
366 bAspectRatioX the Y dimension of the picture aspect
367 ratio, read-only
368 bDefaultFrameIndex optimum frame index for this stream
369 bBitsPerPixel number of bits per pixel used to
370 specify color in the decoded video
371 frame
372 guidFormat globally unique id used to identify
373 stream-encoding format
374 ================== =======================================
375
376 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/framebased/name/name
377 Date: Sept 2024
378 KernelVersion: 5.15
379 Description: Specific framebased frame descriptors
380
381 ========================= =====================================
382 bFrameIndex unique id for this framedescriptor;
383 only defined after parent format is
384 linked into the streaming header;
385 read-only
386 dwFrameInterval indicates how frame interval can be
387 programmed; a number of values
388 separated by newline can be specified
389 dwDefaultFrameInterval the frame interval the device would
390 like to use as default
391 dwBytesPerLine Specifies the number of bytes per line
392 of video for packed fixed frame size
393 formats, allowing the receiver to
394 perform stride alignment of the video.
395 If the bVariableSize value (above) is
396 TRUE (1), or if the format does not
397 permit such alignment, this value shall
398 be set to zero (0).
399 dwMaxBitRate the maximum bit rate at the shortest
400 frame interval in bps
401 dwMinBitRate the minimum bit rate at the longest
402 frame interval in bps
403 wHeight height of decoded bitmap frame in px
404 wWidth width of decoded bitmam frame in px
405 bmCapabilities still image support, fixed frame-rate
406 support
407 ========================= =====================================
408
409 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/header
410 Date: Dec 2014
411 KernelVersion: 4.0
412 Description: Streaming header descriptors
413
414 What: /config/usb-gadget/gadget/functions/uvc.name/streaming/header/name
415 Date: Dec 2014
416 KernelVersion: 4.0
417 Description: Specific streaming header descriptors
418
419 All attributes read only:
420
421 ==================== =====================================
422 bTriggerUsage how the host software will respond to
423 a hardware trigger interrupt event
424 bTriggerSupport flag specifying if hardware
425 triggering is supported
426 bStillCaptureMethod method of still image capture
427 supported
428 bTerminalLink id of the output terminal to which
429 the video endpoint of this interface
430 is connected
431 bmInfo capabilities of this video streaming
432 interface
433 ==================== =====================================
434
435 What: /sys/class/udc/udc.name/device/gadget/video4linux/video.name/function_name
436 Date: May 2018
437 KernelVersion: 4.19
438 Description: UVC configfs function instance name
439

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

UVC function directory와 control class

1-40
WhatDate / KernelVersion설명
/config/usb-gadget/gadget/functions/uvc.name2014년 12월 / 4.0UVC function directory
/config/usb-gadget/gadget/functions/uvc.name/control2014년 12월 / 4.0Control descriptors
/config/usb-gadget/gadget/functions/uvc.name/control/class2014년 12월 / 4.0Class descriptors
/config/usb-gadget/gadget/functions/uvc.name/control/class/ss2014년 12월 / 4.0SuperSpeed control class descriptors
/config/usb-gadget/gadget/functions/uvc.name/control/class/fs2014년 12월 / 4.0Full-Speed control class descriptors
Function attribute값 또는 설명
streaming_maxburst0..15, SuperSpeed에서만 사용
streaming_maxpacketFull-Speed에서는 1..1023, High/SuperSpeed에서는 1..3072
streaming_interval1..16
function_name최대 32자의 문자열

Control directory에서는 enable_interrupt_ep만 쓸 수 있고 나머지 attribute는 모두 읽기 전용입니다.

Control attribute설명
bInterfaceNumber이 streaming interface에 할당된 USB interface number, 읽기 전용
enable_interrupt_epVC interface의 interrupt endpoint를 활성화하는 flag, 읽기·쓰기

Output·camera terminal과 processing unit

42-114
WhatDate / KernelVersion설명
/config/usb-gadget/gadget/functions/uvc.name/control/terminal2014년 12월 / 4.0Terminal descriptors
/config/usb-gadget/gadget/functions/uvc.name/control/terminal/output2014년 12월 / 4.0Output terminal descriptors
/config/usb-gadget/gadget/functions/uvc.name/control/terminal/output/default2014년 12월 / 4.0Default output terminal descriptors
/config/usb-gadget/gadget/functions/uvc.name/control/terminal/camera2014년 12월 / 4.0Camera terminal descriptors
/config/usb-gadget/gadget/functions/uvc.name/control/terminal/camera/default2014년 12월 / 4.0Default camera terminal descriptors
/config/usb-gadget/gadget/functions/uvc.name/control/processing2014년 12월 / 4.0Processing unit descriptors
/config/usb-gadget/gadget/functions/uvc.name/control/processing/default2014년 12월 / 4.0Default processing unit descriptors

Default output terminal에서는 bSourceID만 읽기·쓰기이고 나머지는 읽기 전용입니다.

Output terminal attribute설명
iTerminalString descriptor index
bSourceID이 terminal이 연결되는 terminal ID, 읽기·쓰기
bAssocTerminal이 output terminal과 연관된 input terminal ID
wTerminalTypeTerminal type
bTerminalID이 terminal의 0이 아닌 ID

Default camera terminal에서는 bmControls만 읽기·쓰기이고 나머지는 읽기 전용입니다.

Camera terminal attribute설명
bmControlsVideo stream이 지원하는 controls를 나타내는 bitmap, 읽기·쓰기
wOcularFocalLengthLocular 값. 원문의 식별자와 설명 표기를 그대로 보존
wObjectiveFocalLengthMaxLmin 값. 원문에서 Max attribute를 Lmin에 대응시킴
wObjectiveFocalLengthMinLmax 값. 원문에서 Min attribute를 Lmax에 대응시킴
iTerminalString descriptor index
bAssocTerminal이 terminal이 연결되는 output terminal ID
wTerminalTypeTerminal type
bTerminalID이 terminal의 0이 아닌 ID

Default processing unit에서는 bmControls만 읽기·쓰기이고 나머지는 읽기 전용입니다.

Processing unit attribute설명
iProcessingString descriptor index
bmControlsVideo stream이 지원하는 controls를 나타내는 bitmap, 읽기·쓰기
wMaxMultiplier최대 digital magnification에 100을 곱한 값
bSourceID이 unit이 연결되는 terminal ID
bUnitID이 unit의 0이 아닌 ID

Extension unit와 control header

116-155
WhatDate / KernelVersion설명
/config/usb-gadget/gadget/functions/uvc.name/control/extensions2022년 11월 / 6.1Extension unit descriptors
/config/usb-gadget/gadget/functions/uvc.name/control/extensions/name2022년 11월 / 6.1Extension Unit(XU) Descriptor
/config/usb-gadget/gadget/functions/uvc.name/control/header2014년 12월 / 4.0Control header descriptors
/config/usb-gadget/gadget/functions/uvc.name/control/header/name2014년 12월 / 4.0특정 control header descriptors

Extension unit의 bLength, bUnitID, iExtension은 읽기 전용이고 나머지는 모두 읽기·쓰기입니다.

Extension unit attribute설명
bLengthDescriptor 크기, 단위는 byte
bUnitID이 unit의 0이 아닌 ID
guidExtensionCodeXU를 식별하는 vendor-specific code
bNumControls이 XU의 control 수
bNrInPins이 unit의 input pin 수
baSourceID이 XU가 연결되는 units 또는 terminals의 ID 목록
bControlSizebmControls field의 크기, 단위는 byte
bmControls지원하는 vendor-specific controls를 나타내는 bitmap 목록
iExtension이 extension unit을 설명하는 string descriptor index
Control header attribute원문 설명
dwClockFrequency원문은 attribute 이름만 제시하며 추가 설명은 없음
bcdUVC원문은 attribute 이름만 제시하며 추가 설명은 없음
UVC VideoControl descriptor topology
Camera input terminalbTerminalIDProcessing unit bSourceIDProcessing unit bUnitIDOutput terminal bSourceIDOutput terminal bTerminalID
Terminal or unit IDsExtension Unit baSourceIDXU bUnitIDVendor controls
Control headerbcdUVC / dwClockFrequencycontrol/class/fs
Control headerbcdUVC / dwClockFrequencycontrol/class/ss

Descriptor ID와 source ID가 camera terminal, processing·extension units, output terminal을 연결하고 control header가 speed별 VC class descriptor에 결합된다.

Streaming class와 color matching descriptors

156-225
WhatDate / KernelVersion설명
/config/usb-gadget/gadget/functions/uvc.name/streaming2014년 12월 / 4.0Streaming descriptors
/config/usb-gadget/gadget/functions/uvc.name/streaming/class2014년 12월 / 4.0Streaming class descriptors
/config/usb-gadget/gadget/functions/uvc.name/streaming/class/ss2014년 12월 / 4.0SuperSpeed streaming class descriptors
/config/usb-gadget/gadget/functions/uvc.name/streaming/class/hs2014년 12월 / 4.0High-Speed streaming class descriptors
/config/usb-gadget/gadget/functions/uvc.name/streaming/class/fs2014년 12월 / 4.0Full-Speed streaming class descriptors
/config/usb-gadget/gadget/functions/uvc.name/streaming/color_matching2014년 12월 / 4.0Color matching descriptors
/config/usb-gadget/gadget/functions/uvc.name/streaming/color_matching/default2014년 12월 / 4.0Default color matching descriptors
/config/usb-gadget/gadget/functions/uvc.name/streaming/color_matching/name2022년 12월 / 6.3추가 color matching descriptors

Streaming directory의 bInterfaceNumber는 이 streaming interface의 USB interface number이며 읽기 전용입니다. 기본 및 추가 color matching descriptor의 아래 attributes는 모두 읽기·쓰기입니다.

Color matching attribute설명
bMatrixCoefficientsColor primaries로부터 luma와 chroma 값을 계산할 때 사용하는 matrix
bTransferCharacteristicsSource picture의 optoelectronic transfer characteristic, 즉 gamma function
bColorPrimariesColor primaries와 reference white

MJPEG format과 frame descriptors

227-284
WhatDate / KernelVersion설명
/config/usb-gadget/gadget/functions/uvc.name/streaming/mjpeg2014년 12월 / 4.0MJPEG format descriptors
/config/usb-gadget/gadget/functions/uvc.name/streaming/mjpeg/name2014년 12월 / 4.0특정 MJPEG format descriptors
/config/usb-gadget/gadget/functions/uvc.name/streaming/mjpeg/name/name2014년 12월 / 4.0특정 MJPEG frame descriptors

MJPEG format에서는 bmaControls와 bDefaultFrameIndex만 읽기·쓰기이고 나머지 format attributes는 읽기 전용입니다.

MJPEG format attribute설명
bFormatIndex이 format descriptor의 고유 ID. Parent header가 streaming class에 연결된 뒤에만 정의됨
bmaControlsStreaming header의 bmaControls에 들어갈 이 format의 data
bmInterlaceFlagsInterlace 정보를 지정, 읽기 전용
bAspectRatioYPicture aspect ratio의 X dimension, 읽기 전용. 원문 대응을 보존
bAspectRatioXPicture aspect ratio의 Y dimension, 읽기 전용. 원문 대응을 보존
bmFlags이 format의 특성, 읽기 전용
bDefaultFrameIndex이 stream에 가장 적합한 frame index
MJPEG frame attribute설명
bFrameIndex이 frame descriptor의 고유 ID. Parent format이 streaming header에 연결된 뒤에만 정의되는 읽기 전용 값
dwFrameIntervalFrame interval을 program하는 방법. 줄바꿈으로 구분한 여러 값을 지정할 수 있음
dwDefaultFrameIntervalDevice가 기본으로 사용하려는 frame interval
dwMaxVideoFrameBufferSizeCompressor가 video frame 또는 still image 하나에 생성할 최대 byte 수
dwMaxBitRate가장 짧은 frame interval에서의 최대 bit rate, 단위는 bps
dwMinBitRate가장 긴 frame interval에서의 최소 bit rate, 단위는 bps
wHeightDecoded bitmap frame의 높이, 단위는 px
wWidthDecoded bitmap frame의 너비, 단위는 px
bmCapabilitiesStill image 지원과 fixed frame-rate 지원

Uncompressed format과 frame descriptors

286-343
WhatDate / KernelVersion설명
/config/usb-gadget/gadget/functions/uvc.name/streaming/uncompressed2014년 12월 / 4.0Uncompressed format descriptors
/config/usb-gadget/gadget/functions/uvc.name/streaming/uncompressed/name2014년 12월 / 4.0특정 uncompressed format descriptors
/config/usb-gadget/gadget/functions/uvc.name/streaming/uncompressed/name/name2014년 12월 / 4.0특정 uncompressed frame descriptors
Uncompressed format attribute설명
bFormatIndex이 format descriptor의 고유 ID. Parent header가 streaming class에 연결된 뒤에만 정의되는 읽기 전용 값
bmaControlsStreaming header의 bmaControls에 들어갈 이 format의 data
bmInterlaceFlagsInterlace 정보를 지정, 읽기 전용
bAspectRatioYPicture aspect ratio의 X dimension, 읽기 전용. 원문 대응을 보존
bAspectRatioXPicture aspect ratio의 Y dimension, 읽기 전용. 원문 대응을 보존
bDefaultFrameIndex이 stream에 가장 적합한 frame index
bBitsPerPixelDecoded video frame에서 color를 지정하는 bits per pixel
guidFormatStream encoding format을 식별하는 globally unique ID
Uncompressed frame attribute설명
bFrameIndex이 frame descriptor의 고유 ID. Parent format이 streaming header에 연결된 뒤에만 정의되는 읽기 전용 값
dwFrameIntervalFrame interval을 program하는 방법. 줄바꿈으로 구분한 여러 값을 지정할 수 있음
dwDefaultFrameIntervalDevice가 기본으로 사용하려는 frame interval
dwMaxVideoFrameBufferSizeCompressor가 video frame 또는 still image 하나에 생성할 최대 byte 수
dwMaxBitRate가장 짧은 frame interval에서의 최대 bit rate, 단위는 bps
dwMinBitRate가장 긴 frame interval에서의 최소 bit rate, 단위는 bps
wHeightDecoded bitmap frame의 높이, 단위는 px
wWidthDecoded bitmap frame의 너비, 단위는 px
bmCapabilitiesStill image 지원과 fixed frame-rate 지원

Frame-based format과 frame descriptors

345-407
WhatDate / KernelVersion설명
/config/usb-gadget/gadget/functions/uvc.name/streaming/framebased2024년 9월 / 5.15Frame-based format descriptors
/config/usb-gadget/gadget/functions/uvc.name/streaming/framebased/name2024년 9월 / 5.15특정 frame-based format descriptors
/config/usb-gadget/gadget/functions/uvc.name/streaming/framebased/name/name2024년 9월 / 5.15특정 frame-based frame descriptors
Frame-based format attribute설명
bFormatIndex이 format descriptor의 고유 ID. Parent header가 streaming class에 연결된 뒤에만 정의되는 읽기 전용 값
bmaControlsStreaming header의 bmaControls에 들어갈 이 format의 data
bmInterlaceFlagsInterlace 정보를 지정, 읽기 전용
bAspectRatioYPicture aspect ratio의 X dimension, 읽기 전용. 원문 대응을 보존
bAspectRatioXPicture aspect ratio의 Y dimension, 읽기 전용. 원문 대응을 보존
bDefaultFrameIndex이 stream에 가장 적합한 frame index
bBitsPerPixelDecoded video frame에서 color를 지정하는 bits per pixel
guidFormatStream encoding format을 식별하는 globally unique ID
Frame-based frame attribute설명
bFrameIndex이 frame descriptor의 고유 ID. Parent format이 streaming header에 연결된 뒤에만 정의되는 읽기 전용 값
dwFrameIntervalFrame interval을 program하는 방법. 줄바꿈으로 구분한 여러 값을 지정할 수 있음
dwDefaultFrameIntervalDevice가 기본으로 사용하려는 frame interval
dwBytesPerLinePacked fixed-frame-size format의 video 한 줄당 byte 수. Receiver가 stride alignment를 수행할 수 있게 한다. bVariableSize가 TRUE(1)이거나 format이 이런 alignment를 허용하지 않으면 0으로 설정해야 함
dwMaxBitRate가장 짧은 frame interval에서의 최대 bit rate, 단위는 bps
dwMinBitRate가장 긴 frame interval에서의 최소 bit rate, 단위는 bps
wHeightDecoded bitmap frame의 높이, 단위는 px
wWidthDecoded bitmap frame의 너비, 단위는 px
bmCapabilitiesStill image 지원과 fixed frame-rate 지원
UVC VideoStreaming descriptor 계층
Streaming headerMJPEG formatMJPEG frameInterval / buffer / bitrate / size
Streaming headerUncompressed formatUncompressed frameInterval / buffer / bitrate / size
Streaming headerFrame-based formatFrame-based framedwBytesPerLine / bitrate / size
Color matchingMatrix / transfer / primariesStreaming descriptor setclass/fs · class/hs · class/ss

Streaming header가 format descriptors를 묶고 각 format 아래 frame descriptors가 interval·크기·bitrate를 정의한다. Color matching과 speed별 class link가 host에 노출할 descriptor set을 완성한다.

Streaming header와 V4L2 function instance name

409-438
WhatDate / KernelVersion설명
/config/usb-gadget/gadget/functions/uvc.name/streaming/header2014년 12월 / 4.0Streaming header descriptors
/config/usb-gadget/gadget/functions/uvc.name/streaming/header/name2014년 12월 / 4.0특정 streaming header descriptors
/sys/class/udc/udc.name/device/gadget/video4linux/video.name/function_name2018년 5월 / 4.19UVC configfs function instance name

Streaming header의 모든 attributes는 읽기 전용입니다.

Streaming header attribute설명
bTriggerUsageHardware trigger interrupt event에 host software가 응답하는 방법
bTriggerSupportHardware triggering 지원 여부를 나타내는 flag
bStillCaptureMethod지원하는 still image capture 방법
bTerminalLink이 interface의 video endpoint가 연결되는 output terminal ID
bmInfo이 video streaming interface의 capabilities

/sys/class/udc/udc.name/device/gadget/video4linux/video.name/function_name에서는 해당 video4linux device를 만든 UVC configfs function instance 이름을 읽습니다.