• Kirill Marinushkin's avatar
    ALSA: usb-audio: Fix UAC2 get_ctl request with a RANGE attribute · 447cae58
    Kirill Marinushkin authored
    The layout of the UAC2 Control request and response varies depending on
    the request type. With the current implementation, only the Layout 2
    Parameter Block (with the 2-byte sized RANGE attribute) is handled
    properly. For the Control requests with the 1-byte sized RANGE attribute
    (Bass Control, Mid Control, Tremble Control), the response is parsed
    incorrectly.
    
    This commit:
    * fixes the wLength field value in the request
    * fixes parsing the range values from the response
    
    Fixes: 23caaf19 ("ALSA: usb-mixer: Add support for Audio Class v2.0")
    Signed-off-by: default avatarKirill Marinushkin <k.marinushkin@gmail.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    447cae58
mixer.c 71.4 KB