ALSA: usb-audio: Fix parsing descriptor of UAC2 processing unit
PATCH 1/1 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.
--- include/uapi/linux/usb/audio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/usb/audio.h +2 -2
@@ -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,
Signature · 1 line
2.13.6
Greg Kroah-Hartman
maintainerQuoted 22 lines · Kirill Marinushkin
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 5e1ddb481776 ("UAPI: (Scripted) Disintegrate include/linux/usb")Signed-off-by Kirill Marinushkin <[email protected]>Cc Mark Brown <[email protected]>Cc Jaroslav Kysela <[email protected]>Cc Takashi Iwai <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Felipe Balbi <[email protected]>Cc Philippe Ombredanne <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Ruslan Bilovol <[email protected]>
Quoted 3 lines
--- include/uapi/linux/usb/audio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Cc: stable <[email protected]>
perhaps?
Quoted 28 lines · Greg Kroah-Hartman
Quoted 22 lines · Kirill Marinushkin
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 5e1ddb481776 ("UAPI: (Scripted) Disintegrate include/linux/usb")Signed-off-by Kirill Marinushkin <[email protected]>Cc Mark Brown <[email protected]>Cc Jaroslav Kysela <[email protected]>Cc Takashi Iwai <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Felipe Balbi <[email protected]>Cc Philippe Ombredanne <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Ruslan Bilovol <[email protected]>Quoted 3 lines
--- include/uapi/linux/usb/audio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 2 lines
Cc: stable <[email protected]>
perhaps?
Yes, it deserves. But I'd need to double-check the UAC2 specification. It's interesting that such a basic thing hasn't hit until now. Maybe just because it's a fairly minor feature.
thanks,
Takashi
Quoted 31 lines · Takashi Iwai
Quoted 28 lines · Greg Kroah-Hartman
Quoted 25 lines · Kirill Marinushkin
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 5e1ddb481776 ("UAPI: (Scripted) Disintegrate include/linux/usb")Signed-off-by Kirill Marinushkin <[email protected]>Cc Mark Brown <[email protected]>Cc Jaroslav Kysela <[email protected]>Cc Takashi Iwai <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Felipe Balbi <[email protected]>Cc Philippe Ombredanne <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Ruslan Bilovol <[email protected]>--- include/uapi/linux/usb/audio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 6 lines
Quoted 2 lines
Cc: stable <[email protected]>
perhaps?Yes, it deserves. But I'd need to double-check the UAC2 specification. It's interesting that such a basic thing hasn't hit until now. Maybe just because it's a fairly minor feature.
... and the patch looks correct, after confirming the UAC2 spec. Now I applied it, with a minor correction of Fixes tag, which actually was introduced by 23caaf19b11e ("ALSA: usb-mixer: Add support for Audio Class v2.0"), and adding Cc to stable.
Thanks!
Takashi
Quoted 36 lines · Takashi Iwai
Quoted 34 lines · Takashi Iwai
Quoted 30 lines · Greg Kroah-Hartman
Quoted 22 lines · Kirill Marinushkin
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 5e1ddb481776 ("UAPI: (Scripted) Disintegrate include/linux/usb")Signed-off-by Kirill Marinushkin <[email protected]>Cc Mark Brown <[email protected]>Cc Jaroslav Kysela <[email protected]>Cc Takashi Iwai <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Felipe Balbi <[email protected]>Cc Philippe Ombredanne <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc Ruslan Bilovol <[email protected]>Quoted 3 lines
--- include/uapi/linux/usb/audio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Cc: stable <[email protected]>
perhaps?
Quoted 9 lines
Quoted 3 lines
Yes, it deserves. But I'd need to double-check the UAC2 specification. It's interesting that such a basic thing hasn't hit until now. Maybe just because it's a fairly minor feature.
... and the patch looks correct, after confirming the UAC2 spec. Now I applied it, with a minor correction of Fixes tag, which actually was introduced by
23caaf19b11e("ALSA: usb-mixer: Add support for Audio Class v2.0"), and adding Cc to stable.
I also checked UAC1/UAC2 spec and the patch looks good. What's interesting it seems nobody faced this issue (after searching ower Internet can't find any mention) which was present from the beginning of UAC2 driver implementation.
Thanks,
Ruslan