summaryrefslogtreecommitdiff
path: root/include/uapi/linux/usb/audio.h
diff options
context:
space:
mode:
authorKirill Marinushkin <k.marinushkin@gmail.com>2018-03-19 09:11:08 +0300
committerTakashi Iwai <tiwai@suse.de>2018-03-19 18:43:41 +0300
commita6618f4aedb2b60932d766bd82ae7ce866e842aa (patch)
tree52c29818ea4929144265c47146029864ba5c7be8 /include/uapi/linux/usb/audio.h
parente40bdb03d3cd7da66bd0bc1e40cbcfb49351265c (diff)
downloadlinux-a6618f4aedb2b60932d766bd82ae7ce866e842aa.tar.xz
ALSA: usb-audio: Fix parsing descriptor of UAC2 processing unit
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. Fixes: 23caaf19b11e ("ALSA: usb-mixer: Add support for Audio Class v2.0") Signed-off-by: Kirill Marinushkin <k.marinushkin@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/uapi/linux/usb/audio.h')
-rw-r--r--include/uapi/linux/usb/audio.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/uapi/linux/usb/audio.h b/include/uapi/linux/usb/audio.h
index 17a022c5b414..da3315ed1bcd 100644
--- a/include/uapi/linux/usb/audio.h
+++ b/include/uapi/linux/usb/audio.h
@@ -370,7 +370,7 @@ static inline __u8 uac_processing_unit_bControlSize(struct uac_processing_unit_d
{
return (protocol == UAC_VERSION_1) ?
desc->baSourceID[desc->bNrInPins + 4] :
- desc->baSourceID[desc->bNrInPins + 6];
+ 2; /* in UAC2, this value is constant */
}
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
{
return (protocol == UAC_VERSION_1) ?
&desc->baSourceID[desc->bNrInPins + 5] :
- &desc->baSourceID[desc->bNrInPins + 7];
+ &desc->baSourceID[desc->bNrInPins + 6];
}
static inline __u8 uac_processing_unit_iProcessing(struct uac_processing_unit_descriptor *desc,