Received: by 10.213.65.68 with SMTP id h4csp864289imn; Tue, 27 Mar 2018 10:10:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx48V8SajCTESHoaffme1p7iEKR+u0UPro73cGuDeP25/hoKbFRUYvQFjj5+s2tjN0GdhOjcL X-Received: by 2002:a17:902:264:: with SMTP id 91-v6mr168461plc.178.1522170603150; Tue, 27 Mar 2018 10:10:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522170603; cv=none; d=google.com; s=arc-20160816; b=RzFNJVZQkqSEQ1GjypdamuaDxB/f4cKJzxRGzpoXl1h/yhEuf27m1n3S3qbiUPcz81 uATKP5a5C84MGEE9O8O7vorHnpGpgroZukSTg2yxl65DIT1H5huq3vjFqJOiII4OfKt2 EgAPW0epJgPDwR6YMxDm9VJtKOLRLUJKRAmgNwtVAuChrBX+yaokbz6GXePHlZIkZNiH XBp8W8cL4raIiLoO3pfhfwLM0TMwCFI0rRK2uEbtV0bj1kZe80Qow9Gw2dtQEEW4vUcS ytiIaGiO2aMIoSix4GLYyCoP0I1+ddQc8pQVtPairwpzbjAWrMQfY54zdrfpEGl/2KsT hDTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Go33aKfL4lIF198pmKmM7hhN6NmLNUC5QOqR4vsTsTY=; b=clyIVlT7WrRGqVmvRJfOIbTKMX/4b4AI7KG9qkNZWc7igtMmyrVsE/WK6xVKuvM9IM KJ8UkqhXivp6845bC24l3ooGNiLQIXmabdsLZ9Rxh8eoeXEWASlYctKu8BkMl11cktEa 5Z17ZFAFLXj+paa85MGlTTXi21k5adNLi3edsl5EOto3Azu5QtvZ+YuwM4BEqj0K1JCm yyZq54WkK4ffoVl9sUHMULuZ02u2zqewQYimO1/XB+SAh/EV/Nylif+B5UaZzcyetrTl 3Ia79kDWQYLFvpBh4a7X/dAxLzDPFEIUvxF2nmuynaEngiVwQCzbqS0ioB06Qc3/lbX0 02YQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l8si1181418pff.237.2018.03.27.10.09.48; Tue, 27 Mar 2018 10:10:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754198AbeC0RIG (ORCPT + 99 others); Tue, 27 Mar 2018 13:08:06 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:47550 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754896AbeC0QkL (ORCPT ); Tue, 27 Mar 2018 12:40:11 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 3E09D1130; Tue, 27 Mar 2018 16:40:11 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kirill Marinushkin , Takashi Iwai Subject: [PATCH 4.15 009/105] ALSA: usb-audio: Fix parsing descriptor of UAC2 processing unit Date: Tue, 27 Mar 2018 18:26:49 +0200 Message-Id: <20180327162758.234163852@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180327162757.813009222@linuxfoundation.org> References: <20180327162757.813009222@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kirill Marinushkin commit a6618f4aedb2b60932d766bd82ae7ce866e842aa upstream. 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 Cc: Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman --- include/uapi/linux/usb/audio.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/include/uapi/linux/usb/audio.h +++ b/include/uapi/linux/usb/audio.h @@ -370,7 +370,7 @@ static inline __u8 uac_processing_unit_b { 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_ { 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,