Received: by 10.213.65.68 with SMTP id h4csp890472imn; Tue, 27 Mar 2018 10:39:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx48efI3na04HGA+tf55xvITSpzzl1j5NkmUitJFh18AAyBin0HRXmZVoxr6NL7z4HxzFC/g7 X-Received: by 10.99.117.86 with SMTP id f22mr172362pgn.180.1522172391354; Tue, 27 Mar 2018 10:39:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522172391; cv=none; d=google.com; s=arc-20160816; b=ARtB9w/b2GL4nP8bZf/uSiN0g4l/NysYxBl6YE+wJoMxPKdQTnazhR+fw4FZOhpn46 SqE/kOoh1lxHqYsVhxSjvuwZgLlBI6KiRVcSAVwhPj0aLOHANOuFPciD7W7S8JvTOHS1 0uZ68jYIwgqu7MDi8c0FL6cwk/4Gtco350J8tfvYvDOIVLHwYLIiPUTjcSnxvoyRCHs5 QuyG5XmkwcYg7yMMyThrrcuOHVzFdEV2VYJkyv40GbeO61MomApgc85jxPNZOr8cmv/0 m+WMxAKDY5fKVahUdGuonbGYK8olLImNRZR+MDoWdRjhDVLdErYzUJ/GPQ6kisJvmv0e br2w== 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=a/9Hr6LLR1JRpgij0FgeEbZsa43cNy8PC8+yzhfHtbM=; b=SqHs3llB3HTbU55LshRF4rgfYO5ohbwaHUVZXATiMeoQPlFF4bFrPpcIymOZBBqth0 /qeAQGnKLTLRaUfwwMCl301ruzMLYTT0CAi60VlZ2cdUBeamcO4z45wIttyaOYe6Fdlt 2v6U8uYNDDQq1SpLjUE0VbU+GsLdUYcZRw8PR+VpKTvIBg4iWKthraaPk1SVOQU0qUwH kYbMhv4BlRDIlFbvg9SMRe1xo5PXThIfpp7NliVT1lEN1xRRAFKVqn4avZn/YOdAzky5 H2q1akgzQo/GPRzHvMYAooR4YrvHT3LH1xBgV/F1gFmsixvkQ+oyjgRk2gnaGao8m6se S8Tw== 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 m11-v6si1554512pls.337.2018.03.27.10.39.36; Tue, 27 Mar 2018 10:39:51 -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 S1754310AbeC0Qeo (ORCPT + 99 others); Tue, 27 Mar 2018 12:34:44 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44494 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754297AbeC0Qel (ORCPT ); Tue, 27 Mar 2018 12:34:41 -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 BCCC01225; Tue, 27 Mar 2018 16:34:40 +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.14 009/101] ALSA: usb-audio: Fix parsing descriptor of UAC2 processing unit Date: Tue, 27 Mar 2018 18:26:41 +0200 Message-Id: <20180327162750.586090865@linuxfoundation.org> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180327162749.993880276@linuxfoundation.org> References: <20180327162749.993880276@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.14-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,