Received: by 10.213.65.68 with SMTP id h4csp920097imn; Tue, 27 Mar 2018 11:12:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+JXlJOc9WBqQIx5ehonafKLxdkd6b5IdsG/20h15PcFYNGqJq4kdHJ6+oXy4ThQlgshMkE X-Received: by 2002:a17:902:b901:: with SMTP id bf1-v6mr378154plb.74.1522174356730; Tue, 27 Mar 2018 11:12:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522174356; cv=none; d=google.com; s=arc-20160816; b=SJJ6/nBgE9A59Ze1qwsoqVRnoCpyOIxoUgtij4eW4LataclD3meQNpSYBcsvshtL/e XvOfgfEnHPVX/nSSgo1dSd7qkhtWOkq0KIk0UFYEV629dPmAgMJRXB3KDwUaLjpP5+4G SM5jTDmH/wt2NkB+l3ZPOdWf8HSP958GMNi6Kk41tr8t082fIrThj69KYPbBeBMiBIqQ w6+ACKPaEERqPeH8vUBZJAXBdhTApo33SQWm114/Pqu2GZlJLjUv/5unmGZckvQH6MRy eORof4gxBTBIKDnM7p26QDCCXNm9tn7SqismRKa81cxgl2kUwF74iUuXIqXzWyI9rkwK Ac1w== 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=yoz920NDlS2VHNQYWTOboxGluIMSEysA6fnVr40PUJc=; b=OTh7dy126PreYc1Dvc8kTAKOtSkpctqDpO18lmrVRvBOKyDu60afSgkeJqsSDkxSHD bUW3IZ1gfOaPGuBlRUaUYewrT0HkWCAJqJU77AIWISnF7pjtakkyOS9tuIvmE+Y2aV4J Kol+Jg/CUhLd6u3KyR1y7v2Ou77slmLO/prmXtchXK0kv8Lqnhk6nfn3CvuqeitkBAwB 5l3wIHGcLsPH1tYbJwF2dzvc+oX70289NbDLaPyuQOthedSXBFzuTyyuvhj43FYhTdfd 6G8RsILWZ2o/yxGwTJPSzGADHb2XB4TelEtFXXXd7OvADWx0kl2kyncq0LM2dbQciLM3 NlOQ== 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 b11-v6si1880161plk.688.2018.03.27.11.12.22; Tue, 27 Mar 2018 11:12:36 -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 S1752724AbeC0SKw (ORCPT + 99 others); Tue, 27 Mar 2018 14:10:52 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:40936 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751964AbeC0Q2o (ORCPT ); Tue, 27 Mar 2018 12:28:44 -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 92F5B103A; Tue, 27 Mar 2018 16:28:43 +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.4 03/43] ALSA: usb-audio: Fix parsing descriptor of UAC2 processing unit Date: Tue, 27 Mar 2018 18:27:07 +0200 Message-Id: <20180327162716.590782270@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180327162716.407986916@linuxfoundation.org> References: <20180327162716.407986916@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.4-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 @@ -369,7 +369,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, @@ -377,7 +377,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,