Received: by 10.213.65.68 with SMTP id h4csp907350imn; Tue, 27 Mar 2018 10:59:02 -0700 (PDT) X-Google-Smtp-Source: AIpwx49r7hIo4FKkFPcO1OK2F4XVdhlcSutPMdQVMTj58IBpnOwsjpT+hM2EJRp0OlXkSZOlYxmA X-Received: by 2002:a17:902:9308:: with SMTP id bc8-v6mr281538plb.189.1522173542753; Tue, 27 Mar 2018 10:59:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522173542; cv=none; d=google.com; s=arc-20160816; b=viJMNhu0iwV40NOR9AfV5fglC2a8NrMRpSV7iEEWPIjHuXzI318oTWe2VhZPh+JnDP rOw0GBL+7CWgb9vdop5AoCXyZmFpqiyJJhbQu31mU0N5xZSioEHg8xsYaw2swUSbfLvL yG0UrhVfrULe/etcT8QhObt6wyN3aQyq2s3Xf8m+bqQZbwb1pjUUF8w3hDn7UI7LHNhD GmGIUEqinUUu/1lZO2scRhmpFAuidhKKKW6/fAGKnC3uaCkKT/f3B0KjlXVQgVwop5La Do5M39X48UMpLcs4XqXY/V/qMNv9uCSHhQxfQy9q99he6JvLfHgRnA1RdAV8N2h7vpXn gY5Q== 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=slsUZ8xooCUY0vdmDANDxqSVpXDAainAZeJlC3OWBYI=; b=a8RtNQ/4BAz/4tqhbyH+kzK/MmSWb58rMHzcSNicn/4c+PtMQGK2pu4noIDrOVlTnn wpoG1W1P5JMblpjWihhAqRBXlch++tuoMcAoSWZPe6qcX/QmO/OskTkaQ0GPMYrD5HVj 9KcBfii24CDcF6kELAwJytDkkZYmbzdBlsdIz6EMYMoG6Fxd5xAEs0e2mnaMCHtox3qK 0+m6oIxT/hp9PJjtFfvCcQTvLvfsBBCnSIderpPlwFKN5JN5ObBbTeZPtwum6gTILNjZ mrdlGJEC5bCRjetnu3CvsN8ERC6zTffcHqn4ShkKGOpuVzWm1nNY7zvbiA7c9PPLXXiK cwpA== 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 l8si1175557pgr.187.2018.03.27.10.58.48; Tue, 27 Mar 2018 10:59:02 -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 S1753198AbeC0Qay (ORCPT + 99 others); Tue, 27 Mar 2018 12:30:54 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:42706 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752125AbeC0Qaw (ORCPT ); Tue, 27 Mar 2018 12:30:52 -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 6520CBCF; Tue, 27 Mar 2018 16:30:51 +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.9 03/67] ALSA: usb-audio: Fix parsing descriptor of UAC2 processing unit Date: Tue, 27 Mar 2018 18:26:55 +0200 Message-Id: <20180327162726.875732341@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180327162726.702411083@linuxfoundation.org> References: <20180327162726.702411083@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.9-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,