Received: by 10.213.65.68 with SMTP id h4csp770662imn; Fri, 6 Apr 2018 08:37:00 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/Opl1VhuMCUIdU8tJuySRHnUT39H6DXcgXhx71jOA/WFxLYukXSlsFsMQ1k153dbvsD/qb X-Received: by 10.98.159.129 with SMTP id v1mr20449211pfk.25.1523029020800; Fri, 06 Apr 2018 08:37:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523029020; cv=none; d=google.com; s=arc-20160816; b=c5GX4x/Px7n94xs7pgNAqhEXxVVitw4MpeUoF8UJ59Cb9JM1rRIqKlk0XQnFy9WOwj PGF3U5Fff0kiM47g5HcQLpnqmygK7qABa74wLOUmJ0A/ERaym6VE1bcympQ/hkxbbyLV W9KDmEjCgEhh7UyUOO4f0S/L0WPC6SSkrUVqKr1JnLWa7uLLo1pYDnM+viRV5sg85olw 0HCvAtivKXon3p48SA0Lo7dqcj8ChvRcq8wiFNqIB4Ki4nydWbzwhnYgZUBJswfagC+b qv2yvevZP+7jN1gU1HPnOtGdszdRP8OIFmv74OnkzjIhaB84+nDqL9bZQ/4QihNg5jxe Dm2g== 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=w6doEwUz0e0tiMRE/sj2xjFIXDHN4n+lhXn5USPQ9b4=; b=zZhsHNZbPf0JE2lYddC1YMcyUMAfYv+U6RbaHvuY80+tqJNIWKcOOJ5pcqphkMCkK4 uKCzz5Pug0N1cynxC1WcPOA/JSWXzZwZDQ8v0P5mBvI+ckVT0MBg+nj1RFq4XK+ftNXw 200rpIgFoZ7xig44LjkCcKQ7dJ7V/G5QglG9N5Z5pbQa4maWXrqUNSxVnfdoEZSTyeIs sd/u1oFuBuKb0WtyTYWHcAPoLIZVibKRD83G8qPmXK/qMvoW6jC4dv6GSSsS2Arin/tB cTTpJ10LPncVF8NaYlq9mlKbtNM9cmyRqop90GAlTAt1a0fdv9jimgE+M9jRsqXqVez1 ULUw== 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 d8si7073062pgv.138.2018.04.06.08.36.47; Fri, 06 Apr 2018 08:37:00 -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 S1753238AbeDFNZG (ORCPT + 99 others); Fri, 6 Apr 2018 09:25:06 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:53934 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753096AbeDFNZE (ORCPT ); Fri, 6 Apr 2018 09:25:04 -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 73783DC5; Fri, 6 Apr 2018 13:25:03 +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 3.18 01/93] ALSA: usb-audio: Fix parsing descriptor of UAC2 processing unit Date: Fri, 6 Apr 2018 15:22:30 +0200 Message-Id: <20180406084225.029537157@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180406084224.918716300@linuxfoundation.org> References: <20180406084224.918716300@linuxfoundation.org> User-Agent: quilt/0.65 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 3.18-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,