Currently, the offsets in the UAC2 processing unit descriptor are calculated incorrectly. It causes an issue when connecting the device which provides such a feature: ~~~~ [84126.724420] usb 1-1.3.1: invalid Processing Unit descriptor (id 18) ~~~~ After this patch is applied, the UAC2 processing unit inits w/o this error.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -370,7 +370,7 @@ static inline __u8 uac_processing_unit_bControlSize(struct uac_processing_unit_d · 369 unmodified lines | ||
| 370 | 370 | { |
| 371 | 371 | return (protocol == UAC_VERSION_1) ? |
| 372 | 372 | desc->baSourceID[desc->bNrInPins + 4] : |
| 373 | − desc->baSourceID[desc->bNrInPins + 6]; | |
| 373 | + 2; /* in UAC2, this value is constant */ | |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | static inline __u8 *uac_processing_unit_bmControls(struct uac_processing_unit_descriptor *desc, |
| @@ -378,7 +378,7 @@ static inline __u8 *uac_processing_unit_bmControls(struct uac_processing_unit_de · 1 unmodified line | ||
| 378 | 378 | { |
| 379 | 379 | return (protocol == UAC_VERSION_1) ? |
| 380 | 380 | &desc->baSourceID[desc->bNrInPins + 5] : |
| 381 | − &desc->baSourceID[desc->bNrInPins + 7]; | |
| 381 | + &desc->baSourceID[desc->bNrInPins + 6]; | |
| 382 | 382 | } |
| 383 | 383 | |
| 384 | 384 | static inline __u8 uac_processing_unit_iProcessing(struct uac_processing_unit_descriptor *desc, |